Mathematical Analysis of Dynamic Process Models
Transcription
Mathematical Analysis of Dynamic Process Models
Mathematical Analysis of Dynamic Process Models Index, inputs and interconnectivity Mathematical Analysis of Dynamic Process Models Index, inputs and interconnectivity PROEFSCHRIFT ter verkrijging van de graad doctor aan de Technische Universiteit Delft, op gezag van de Rector Magnificus Prof.dr.ir. J.T. Fokkema, voorzitter van het College voor Promoties, in het openbaar te verdedigen op maandag 4 december 2006 om 12:30 uur door Aloysius Thomas More Judi SOETJAHJO geboren te Malang, Indonesia werktuigbouwkundige ingenieur Dit proefschrift is goedgekeurd door de promotoren: Prof. ir. O.H. Bosgra Prof. ir. J. Grievink Toegevoegd promotor: Dr.S. Dijkstra Samenstelling promotiecommissie: Rector Magnificus, Prof. ir. O.H. Bosgra, Prof. ir. J. Grievink, Dr. S. Dijkstra, Prof. dr. ir. P.M.J. Van den Hof, Prof. dr. ir. G. van Straten, Prof. dr. ir. A.C.P.M. Backx, Dr. ir. P.J.T. Verheijen, Published and distributed by: Optima Grafische Communicatie Pearl Buckplaats 37 Postbus 84115, 3009 CC Rotterdam The Netherlands Telephone Telefax e-mail : +31-(0)10 2201149 : +31-(0)10 4566354 : [email protected] ISBN: 90 – 8559 – 255 – 0 voorzitter Technische Universiteit Delft, promotor Technische Universiteit Delft, promotor Technische Universiteit Delft, toegevoegd promotor Technische Universiteit Delft Universiteit Wageningen Technische Universiteit Eindhoven Technische Universiteit Delft Dedicated to my mother : Lia Indriawati Terima kasih atas doa-doamu, Tuhan beserta kita Ya Bapaku dalam surga, aku bersyukur padaMu Pimpinlah aku selalu untuk membagi kasihMu, kebijaksanaanMu and pengetahuanMu Preface This thesis is the result of my research experiences during the period of 1992 to 1997 at the Delft University of Technology, on dynamic modelling of a complex interconnected DAE (differential Algebraic Equations) of a Coal Gasification Combined Cycle Plant using Speed-Up (Aspen Tech). This thesis describes specific mathematical problems, namely a high index problem and consistent (re-) initialisation problem that I have encountered during modelling of a process and during interconnecting of process sub models. The literature references used are dated until year 2003. At this time, I wish to express my gratitude to all the people who have contributed to this thesis, although unfortunately I am able to mention just a few! Firstly I would like to thank my promoters Prof. O.H. Bosgra and Prof. J. Grievink, and my co-promoter, Dr. S. Dijkstra for providing a valuable research project. Their support, advice & encouragement even after my resignation from university, ensured that I did not give up on completing this book. Thank you for opening the door to an incredible educational journey for which I am thankful! I am grateful to Dr. P.J.T.Verheijen for our discussions and his critical remarks regarding the presentation of my work. Thank you also to Prof. P.M.J. van den Hof, Prof. G. van Straten, and Prof. A.C.P.M. Backx for serving on the thesis committee and for their valuable comments. Secondly, I would like to thank SBM (Single Buoy Mooring) Chief Operating Officer, Dick van der Zee and GustoMSC Head of the System Engineering Department, Bertus Bernhard, both of whom have always supported me and actively encouraged me to finish this thesis in conjunction with my daily work and responsibilities at GustoMSC. Thank you to Andries Mastenbroek and Paul Spoeltman for their understanding and support. Thirdly, I would like to thank for all my colleagues and students at the Delft University of Technology, all of whom supported me during my research period; Peter Valk, Arie Korving, Gideon Go, Agung Hermawan, Habieb, Trias Hermanu, and Folmer de Haan. My special thanks to Angela Hernandez from GustoMSC for her assistance with linguistic and layout corrections. Finally, thank you to my dearest friend Ton Peters. Thank you for your unconditional support and your everlasting care. Delft, December 2006 A.T.M. Judi Soetjahjo i Summary Process modelling plays an important role in process engineering and operation. The process models are to be used for: designing of process equipment and process control, prediction of process behaviour and optimisation of product properties during the process operation. Usually, a complex process model consists of interconnected sub models, i.e. as a composite network of sub models in different layers with increasing detail of model components. Modelling of each sub system as a lumped system described with first principles equations, i.e. balance and constitutive equations, gives a set of first order non-linear DAE (Differential Algebraic Equations) model. A consequence of modelling with DAE is the possibility to get a high index and/or a consistent (re-) initialisation problem. An (differential) index of DAE model can be easily defined as the number of differentiations required to transform the original DAE model to an explicit ODE model. A high index occurs if this required differentiation has to be done more than once. A high index problem can be caused by: the wrong choice of input variables, internal state constraint equations (e.g. reaction equilibrium, phase equilibrium), or sub models interconnection. A consistent (re-) initialisation problem means that it is not possible to set arbitrary values of the accumulation/storage variables at any time. A high index model and a low index model with non minimum differential variables always pose a consistent (re-) initialisation problem. Basically, solving a high index problem needs differentiation, instead of integration only. Besides that most numerical algorithms do not cover a differentiation algorithm, it is not practical to solve an interconnected high index DAE models, because a high index DAE poses also a consistent (re-) initialisation problem. A modeller can get unexpected behaviour on the defined/chosen accumulation/storage variables; i.e. these storage variables can ‘jump’ in their time response. When modelling a large scale interconnected system one should avoid a high index DAE model. There have been many researches carried out to solve a high index DAE model. The distinction of the work in this thesis compared with others is that the detection of a high index problem and an index reduction techniques is developed from the original theory of Kronecker and Rosenbrock [107], i.e. a strict system equivalence operation. A strict system equivalence operation performs the required differentiations while maintaining the input-output behaviour of the system. The theory of Kronecker and Rosenbrock [107] is extended for a first order nonlinear DAE model by using the structural information of the equations, rather than the exact numerical value. This thesis shows, for a first order DAE process model, that it is possible to find a procedure (based on a strict system equivalence operation) for a high index reduction, which does not apply complicated non-linear algebraic manipulations. With this procedure the original model equations and variables will not be destroyed. ii Moreover for a given DAE model it is possible to detect which input variables set will not raise a high index problem, provided that there are no state constraints equations. These state constraints equations can be detected by any choice of an input variables set which give the maximum number of state variables of the model. Interconnection of DAE sub models requires information on possible input variables of each sub model. This input variables set does not have to be unique. Interconnection of sub models will not raise a high index problem, when there is no state constraint equation arising due to the interconnection, i.e. the interconnected low index models resulting to a low index composite model. Despite of advantage on applicability of the structural method, for a rare case it is possible to have an analytical cancellation problem on a high index detection; i.e. the structural algorithm shows that the DAE has a high index; but analytically the DAE does not have a high index. A combination of symbolic and structural approaches can solve this problem and the theory in this thesis can be expanded to such application. Moreover the extension of the high index theory for a distributed system, PDAE (Partial Differential Algebraic Equations) is necessary, since a state constraint problems can arise either in a time domain, or in a spatial domain or a combination of them. iii Table of Contents Preface ……………………………………………………………….. Summary …………………………………………………………….. i ii Chapter 1: Introduction 1.1. 1.2. 1.3. 1.4. 1.5. Background .………………………………………………… Motivation ..………………………………………………… Related works ………………………………………… …… Problem definition and scope ………………………………… Approach and outline of the thesis …………………………… 1 2 7 9 10 Chapter 2: Mathematical Properties of a First Order DAE model 2.1. 2.2. 2.3. 2.4. 2.5. 2.6. 2.7. Introduction ………………………………………………….. Kronecker Canonical Form …………………………………... Low index criterion of a DAE model …………………………. Calculation of the index of a DAE model ……………….……. Solving a consistent initialisation and a re-initialisation problem Index reduction of a DAE model ……………………………… Conclusions …………………………………………………… 13 14 18 19 21 27 38 Chapter 3: Structural Properties of a First Order DAE model 3.1. 3.2. 3.3. 3.4. 3.5. 3.6. Introduction ………………………………………………….. −1 ………………. Structure of system matrices E , T ( s ), T ( s ) Structural properties of a first order non linear DAE model …. Genericity of structural properties …………………………… Examples …………………………………………………….. Conclusions ………………………………………………….. 39 40 44 49 54 61 Chapter 4: Application of Low Index Detection and High Index Reduction of Non-linear DAE Process models 4.1. 4.2. 4.3. 4.4. 4.5. 4.6. Introduction ………………………………………………….. High index reduction through variables differentiation ………. High index reduction through equations differentiation ………. Consistent re-initialisation problem ………………………….. High index problem due to interconnection ………………….. Conclusions ………………………………………………….. 63 65 77 84 89 94 Chapter 5: Input Variables Assignments of a DAE Model 5.1. 5.2. 5.3. Introduction …………………………………………………... 95 Model entities and variables classification …………………… 98 Low index input variables assignment …………………….….. 105 iv Table of Contents 5.4. 5.5. Maximum dynamic degree input variables assignment ………………... 118 Conclusions ……………………………………………………………. 126 Chapter 6: Interconnection of DAE Models 6.1. 6.2. 6.3. 6.4. 6.5. Introduction ……………………………………………………………. Process model ports ……………………………………………………. Process model connectors ……………………………………………… Interconnection of sub models …………………………………………. Conclusions ……………………………………………………………. 127 128 133 138 152 Chapter 7: Conclusions and Recommendations 7.1. 7.2. Conclusions ……………………………………………………………. 153 Recommendations ……………………………………………………… 155 Appendix A: Structural Frame Work ………………………………………… 157 Appendix B: Graph Algorithm ……………………………………………….. 161 Appendix C: Modelling of an ICGCC Plant …………………………………. 171 List of symbols and abbreviations …………………………………………….. 183 References ……………………………………………………………………… 185 Samenvatting …………………………………………………………………… vi Curriculum vitae ……………………………………………………………….. viii v Chapter 1: Introduction Design engineering practices always require process models as a predicting and calculation tool. The model modularisation, interconnectivity and transparency are essential in model building and model re-use. The mathematical models of process result mostly into a set of interconnected Differential Algebraic Equations (DAE). The research motivation of this thesis is analysis of the mathematical process model structure and its interconnectivity. “A system is our ‘projection’ of a structure or an ordering of ‘mechanisms’” 1.1. Background Mathematical models are used in many areas of science or engineering to understand the system’s behaviour and/or design of specific system behaviour. This model represents internal behaviour of a system subject to the purpose, assumptions, and simplifications of the modeller. The system internal behaviour is generally described with balances and other constitutive equations. A system can be anything of a single part, organ, or mechanism or a set of interconnected parts, organs, and/or any physical process, that may perform a particular function or composite functions. A dynamic system is a system where its internal properties or quantities undergo a progress of change in time. A mathematical description of a dynamic system is called a mathematical (dynamic) model. A mathematical (dynamic) model (Willems [131]) is a mathematical description of a dynamic system (for a given boundary) that consists of aspects: time and behaviour equations. Behaviour B of a dynamic system manifests to a set of signal trajectories z (t ) ∈ R n on some time interval t ∈ (a b); a, b ∈ R , satisfied behaviour equations, { } B = z (t ) : R → R n Behaviour equations are satisfied (1.1) Modelling of a complex process consists of interconnection of sub-models each represented by a set of behaviour equations (1.1). Prior to 1960 – 1980’s, it was common practice for modelling of a system behaviour by a set of Ordinary Differential Equations (ODE) with fixed chosen input variables, x = f ( x , u, t ) , (1.2) where f : R n + k +1 → R n , x , x ∈ R n are the model solutions, u ∈ R k are the input variables, and t ∈ T denotes the time at some interval T ⊂ R . 1 Chapter 1 : Introduction Simulation of an ODE model was done by translating it into a Computer Language as interconnection of mathematical library operations, from which it was difficult to recognise the original set of equations, difficult to modify the model, and difficult to re-use the model for other purposes. Nowadays mathematical process modelling and simulation are based on balance equations and constitutive equations resulting into a set of Differential Algebraic Equations (DAE), given by : F ( z(t ), z (t ), t ) = 0 , (1.3a) or F ( z (t ), z (t ), u (t ), t ) = 0 , (1.3b) where F : V → R m , V is open in R 2 n +1 is a vector defining the model; z : T → R n denotes its solution, with m ≤ n and t ∈ T denoting the time at some interval T ⊂ R , is a common approach, where the modeller always has the transparent original DAEs model in the simulation engine. This has many advantages for re-usability or model modification. 1.2. Motivation 1.2.1. Industrial needs The development of numerical solving methods and computer hardware in the last decennium make it possible to do large-scale mathematical model simulation/calculation even with a personal computer. Process model simulation on the process industry consists of two main items, namely: the process model building and the process model re-use. On the process model building the modeller needs to make the model equations. For the process model re-use the modeller uses the existing made models and interconnect them with other models when it is necessary. Commercial software such as Aspen [5] and Hysis [61] built a lot of standard model libraries, which can be re-used and interconnected for designing complex processes. Also there is a tendency to migrate the software programmes to open concepts, where different model libraries built in different programmes can be re-used and interconnected. Nowadays engineering design activities include integration of processes from different physical domains, e.g.: electrical, chemical, physical, and mechanical processes. Engineers need to be able to build, re-use and interconnect mathematical models from different physical domains into one common simulation platform. Despite the fast developments in different fields of software programming and hardware availability, industrial practice shows that there are still several problems to be solved on dynamic model building and model interconnection. The available 2 Chapter 1 : Introduction simulation tools on the market give different ways for model representations, model aggregation and model interconnectivity of processes from different physical domains. The dynamic modelling process and representation should be standardised in universal-ways. The standardisation in this context also brings a ‘bridge’ between Conceptual Modelling Process and its translation into Computer Language for solving the problems (see Figure 1.1.). Dynamic process model becomes transparent when the ‘gap’ between conceptual and simulation language is not too large, which makes life easier for a lot of engineers to communicate with each other, re-using models from different sources/authors, and doing maintenance or modification of the model when required. On the computation level the computer model should be translated to be able to solve with a numerical engine. Conceptual Mathematical Dynamic Model Model building Computer/Simulation Language Translation Simulation Numerical Language Translation And Computation Figure 1.1 Modelling and Simulation stages. In conclusion, the industries application fields need: - an open modelling platform, - universal modelling standardisation, - flexibility on model modularisation, and interconnectivity, - flexibility on model re-use and modification (model transparency), and - easy use and fast model building. 1.2.2. Academic research The mathematical modelling of physical systems consists of the decomposition of complex systems and composition/interconnection of sub-models. This topological decomposition (see figure 1.2) is necessary for several reasons: 1. The real physical processes exist of interconnected sub-systems. 2. The decomposition and composition of sub systems are human tools to ‘create’ a new system. 3 Chapter 1 : Introduction Model Topological structure assumptions Topology Decomposition Interconnection Sub-model Sub-sub-model Elementary model Elementary behaviour Interconnection Interconnection Behaviour assumptions Figure 1.2. Model decomposition Preisig [104] defines that an elementary model/system is a finite volume body or a finite volume single-phase system. If the elementary model/system has spatial uniform physical properties then this system is called a lumped model/system. If the physical properties are not uniform then it is called a distributed model/system. Figure 1.3. shows an example of a topological decomposition of a distillation system. Part A of this figure gives schematically that this distillation system is a composite of interconnected models (a distillation column, a condenser, a reboiler, several control valves, and controllers). Part B gives schematically that the distillation column consists of interconnected distillation trays sub-model and finally part C shows that a tray submodel consists of interconnected two elementary phases (liquid and vapour phase), where mass and energy are transferred through the interface. 4 Chapter 1 : Introduction Condensor Distilation Column Vapour flow Liquid flow Interface mass & energy transfer N i,L FIC Ni,V EL,exc E V,exc Control Valve vapour phase liquid phase Reboiler interface A. Interconnected models of a distillation system B. Interconnected tray submodels of a distillation column C. Interconnected elementary liquid & vapour phases in a distillation tray Figure 1.3. A topological decomposition of a distillation model Basically the modeller will make two kinds of assumptions during the modelling of a dynamic system, namely: - the topological assumptions - the behavioural assumptions The topological assumption on the process model decomposition or composition of lumped models describe: - the interconnection structure of the elementary models, and - the geometry of the elementary models. The set up of the behavioural equations within an elementary model depends on the behavioural assumptions made by the modeller. Basically there are two types of behavioural assumptions (Marquardt [85]), namely: 1. The primitive behavioural assumptions: The primitive behavioural assumptions are the first assumptions that should be made by the modeller to decide the relevant physical balance equations or balance mechanisms within the system, e.g. component mass balances and energy balance. These must form independent balance equations; therefore the accumulation or storage terms in these balance equations should be also independent. The primitive balance/storage variables are principally the state variables of the model. 2. The constitutive behavioural assumptions: The second behavioural assumptions, made after the set up of the primitive balance equations, are the constitutive behavioural assumptions. These assumptions describe e.g.: 5 Chapter 1 : Introduction - the transport behaviour assumptions the reaction behaviour assumptions the physical properties behaviour assumptions other behavioural simplification assumptions The constitutive assumptions must also include the validity range of the used equations. A sub set of behaviour equations (1.1) for a mathematical model representation based on the balance equations and constitutive equations are given on a set of first order differential algebraic equations (DAE (1.3a), (1.3b)). In the last decade it is has been realised that DAEs have two essential different properties than sets of Ordinary Differential Equations (ODEs), namely the term ‘high index’ and ‘consistent (re-) initialisation problem’ of DAE model. A high index DAE model What is a high index DAE model ? A high index DAE model is, roughly speaking, if in the model equations there are (hidden) state constraint equations or better to say, constrained differential variables equations. A high index DAE process model may cause conflict with the primitive assumptions of the modeller about the choice of storage variables and related model equations. These storage variables are no longer independent. In some cases the reaction rate, or the mass transfer rate, or the energy transfer rate are not known or to be considered as the phases or the components are in equilibrium, examples: applying a thermodynamic equilibrium or reaction equilibrium assumptions. These assumptions will result to non-independency of the phases or the components. Basically there are three causes of a high index DAE, namely: a) internal states constraints, e.g.: - introduction of behavioural constraint equation, e.g.: reaction or phase equilibrium - introduction of geometrical constraint equation, e.g.: volume constraint on multiphase fluid system - choice of coordinate system, e.g. pendulum with cartesian coordinate (Mattsson [86]) b) non causal relation of the chosen ‘input’ variables of the model, c) interconnection of DAE sub models Finding an input variables set for a given DAE model (1.3a), which result to a low index DAE model is sometimes not easy. The wrong choice of input variables set can result in a high index model (A.Lefkopoulos [74,75]). It is known that a high index DAE model is numerically difficult to solve. The problems on numerical solving of a high index model are: - break down of the numerical solver error control, e.g. the error control of implicit numerical solver backward formula (Brenan, Petzold, Campbell [17], Bujakiewicz [21]) increases for a high index DAE model. 6 Chapter 1 : Introduction - finding consistent initial conditions and solving a consistent re-initialisation problem (B. Leimkuhler et.al [76], C.C. Pantelides [98]) DAE models interconnection A complex mathematical model consists of interconnection of sub-models. The interconnection is the way of ‘transferring goods’ between sub models, ‘the goods’ herein are e.g.: information, material, energy, and momentum. These are generally given in the interconnected sub models variables, e.g.: mass flow, pressure, mass fraction, specific enthalpy, heat flow, temperature, entropy, position, speed, force, electric current, and electric voltage. The interconnection equations can act as constraint equations for the state variables such that the interconnected DAE sub-models gives a high index model. The interconnections between DAE sub-models are important during model building and a model replacement. The questions here are how to interconnect DAE sub-models and to find the external input signals, such that the interconnected DAE model does not have a high index structure. Thus it is important to recognize whether a DAE model has a high index and to detect what is the cause of this high index problem, i.e.: - to detect if the state variables constraints are due to internal constraint equations within the model, or due to the choice of input variables, or due to the interconnection of sub models, - to detect which equations result in state variables constraints, - to know if the pre-assumed storage variables are independent, - to look for the solving method for the high index model, either by symbolic ‘index’ reduction or special numerical handling Moreover for interconnecting for DAE sub models, it is important to know: - which input variables sets will not result in a high index model, and - how to interconnect DAE sub models that it will not result in a high index composite model. 1.3. Related works A lot of research has been done to explore properties of a DAE model (1.3b). The related works are briefly described in this section. 1.3.1. The index of a DAE model The index property of a linear DAE model was analysed by Rosenbrock [107], G.C. Verghesse, B.C. Levy and T. Kailath [127], Van Dooren [32], J. Demmel and B. Kagstrom [31]. The theory of Rosenbrock [107] is very nice, since it is based on an equivalence system operation. This system operation performs manipulation on the internal variables and equations of the model, but resulting to an equivalent inputs outputs behaviour. The equivalent system operations are done by algebraic manipulations and differentiations on the model equations and/or variables. These are 7 Chapter 1 : Introduction to calculate the index and reduce the index of a linear DAE model. The disadvantages of these operations are practically difficult to perform and destroy the original variables and equations of the model. Luenberger [81] did an attempt to perform an index reduction of a linear DAE model which includes only row manipulations, i.e. model equations differentiation and variables elimination and substitution. The works of C.W. Gear, L.R. Petzold [44], and Unger, et.al [125, 126] on index detection of non linear DAE model have the root from the work of Luenberger [81]. These algebraic manipulations usually difficult to apply for non linear DAE model and destroy the original character of the equations. The Gear’s algorithm and Unger’s algorithm are practically suitable to calculate the index of a DAE model. The work of Pantelides [98] is based on the solving of a consistent initialisation problem of a DAE model. This algorithm does not involve the structural eliminations and substitutions of variables on the equations. It determines only the minimal subset of the model equations that must be differentiated of which impose constraints on the initial conditions. The disadvantage of this algorithm is possible introducing unnecessary equation differentiation. Mattsson and Söderlind [86] developed a symbolic index reduction technique base on the algorithm of Pantelides for finding the necessary equations to be differentiated. Bujakiewics [21] proposed a numerical solution of a high index model by numerical scaling of the error control using the information from the DAE model structure, without performing any change on the original model equations. The index of a DAE model can be calculated using the structural information of the model. Since a high index and a consistent initialisation problems are different, we want to have an algorithm that can detect a high index and a consistent initialisation problem, calculates the index of the model, and gives proposals to perform an index reduction. The index reduction procedure shall result in an equivalent model. This algorithm should not perform complicated non linear algebraic manipulations, which can destroy the original form of the model equations and model variables. 1.3.2. The interconnection of DAE sub models The work on the linear models interconnection was done by H.H. Rosenbrock, A.C. Pugh [109]. This work is limited to linear state space models with fixed input and output variables. Breedveld [15, 16] gives the concept of bilaterally coupled models interconnection, i.e. that sub models are interconnected through pair of ‘effort’ and ‘flow’ variables. Marquardt [89] uses almost the same concept with bilaterally coupled connection, i.e. the interconnection between sub models is given by the fluxing relations. This fluxing relation calculates the ‘flow’ variable as result of the differences of the ‘flux’ or ‘effort’ variables values. The extension of this work is recently done by B.Maschke, A. van der Schaft [90] for the interconnection of mechanical systems. The new concept of the work of Maschke and A. van der Schaft is formulation of interconnection 8 Chapter 1 : Introduction equations without pre knowledge of the directionality of the input and outputs variables on the interconnected sub models. In the process modelling, the interconnected sub models can consists of model equations and/or encapsulated sub-routines (e.g. physical properties routines). Moreover the interconnected variables can be bilaterally coupled variables and/or non bilaterally coupled variables. Due to the complexity of interconnected DAE sub models in process modelling, we want to avoid a high index problem due to interconnection. Therefore we need to examine what is the necessary condition to get interconnected low index sub models. 1.3.3. Other related works of a DAE model a. Numerical solving methods of a DAE model Research on the numerical solving methods of DAE are done for example by: K.E. Brenan, S.L. Campbell and L.R. Petzold [17], E. Hairer, C. Lubich, and M. Roche [54], Wijckmans [133]. b. Process modelling and simulation using DAE models Research on the process modelling and simulation using DAE are done for example by: P.I. Barton [6] and C.C. Pantelides [99], Mattsson and Söderlind [86], Nilsson [93], Marquardt [85]. 1.4. Problem definition and scope Despite the work that has been done around properties of a DAE model, in my opinion the following academic items are still ongoing discussion: 1. How to detect a high index, calculate the index and perform index reduction of a DAE model based only on the DAE model structure ? 2. How to assign input variables to a DAE model and what is the necessary conditions to avoid a high index model as a result of the interconnections of low index DAE sub-models ? These questions give motivation for my research of: Mathematical analysis of dynamic process models – Index, inputs and interconnectivity with main contributions being: - to clarify the index detection, index calculation, and proposing index reduction based on the mathematical structure of DAE model, - to find input variables for a DAE model, and - to avoid a high index problem due to interconnection of DAE sub-models. M.R. Westerweele [135] works emphasize on the process modelling process, i.e. how to avoid a high index in modelling process. Additional equations (restrictive type) 9 Chapter 1 : Introduction might be necessary to be added, when during modelling a high index structure arises. The work presented in this thesis comes from different view, namely how to analyze a given mathematical model structure of a process model and to reduce a high index from a generic system theoritical approach. This thesis forms an extension of the works that have been done by H.H. Rosenbrock [107] and Bujakiewics [21], i.e. derived a method to detect high index, perform index reduction, finding input variables based on Kronecker form for non linear first order DAE model. The scope will be limited to analyse the structural properties of a first order DAE model for a lumped system description. The DAE model here is the result of modelling using the balance and constitutive equations. The issue of a first order DAE solvability is also outside the scope of this thesis; since the structural approach can not detect independency of DAE equations. The existence of a local consistent initial conditions, as it will be described in Chapter 2, gives only a local necessary condition for an existence of a solution. 1.5. Approach and outline of the thesis The first question in my thesis will be answered in Chapter 2 and Chapter 3. Chapter 4 will describe several examples of high index model detection and reduction, based on the theory developed in Chapter 2 and Chapter 3. The second question in my thesis will be answered in Chapter 5 and Chapter 6, namely it describes a method for finding input variables of a DAE model and gives a sub-models interconnect ability condition. A model diagnosis tool is developed by use of a structural approach to help the modeller during the model building phase to avoid a high index problem. The outline of this thesis is as follows: Chapter 2: Mathematical properties of a first order DAE model This chapter gives as a short description of equivalence system operations to calculate the index of a DAE model and to reduce the index of a DAE model. Further easier methods are derived for a low index detection, index calculation and detection of a consistent (re-) initialisation problem. Moreover this chapter also presents the conjunctures of high index reduction techniques on a non linear first order DAE model and strict system equivalence operation on a linear DAE model. Chapter 3: Structural properties of a first order DAE model This chapter describes the structural properties of a first order non linear DAE model based on the theory developed in Chapter 2. Some definitions of mathematical structure are given, where properties such as structural determinant, structural rank, structural low index criterion, and structural index calculation are derived. The structural theory is used to analyse the properties of a first order non linear DAE model. 10 Chapter 1 : Introduction Chapter 4: Application of low index detection and high index reduction of nonlinear DAE process models This chapter describes several examples of high index dynamic process models. The high index detection and the high index reduction techniques derived in Chapter 2 are applied in this chapter. Moreover this chapter also gives the difference between a DAE model with a consistent (re-) initialisation problem and the high index DAE. Chapter 5: Input variables assignment of a first order DAE model Modelling with a DAE allows different input sets assignment, which result in low index systems. This chapter describes a structural approach of modelling diagnose tool / algorithm for finding a low index inputs assignments or for detection of state constraint equations. Chapter 6: Interconnection of DAE models This chapter includes definition of model ports, model connector, interconnection, and interconnect ability structure between sub-models. Based on the previous chapters, it will be derived a necessary condition for interconnection of low index sub models that result to a low index interconnected model. Chapter 7: Conclusions and recommendations This chapter includes the main conclusions of my research and recommendations for future work. Appendix A : Structural frame work This appendix describes the structural frame work for development of the theories in Chapter 3. Appendix B : Graph algorithm This appendix describes the principal of a graph algorithm for implementations on the theories in Chapter 3 and Chapter 5. Appendix C : Modelling of an ICGCC plant 11 Chapter 1 : Introduction 12 Chapter 2: Mathematical Properties of a First Order DAE model The system matrices E, ( Es − A) , and ( Es − A) −1 of a DAE model, F ( z (t ), z (t ), u (t ), t ) = 0 , with E = ∂F ∂F and A = contain all system ∂ z ∂z properties of the DAE, i.e.: index, consistent re-initialisation, state and nonstate variables. ‘A change of a physical system structure may result in ‘an impulsive behaviour’” 2.1. Introduction In Chapter 1 we have seen that mathematical modelling of a physical system leads into interconnected independent first order differential algebraic equations with the general form (1.3b): F ( z (t ), z (t ), u (t ), t ) = 0 (1.3b) In the last decade much research has been carried out into the properties of differential algebraic equations. Historically the properties of linear time invariant DAE models have been analysed (e.g.: Rosenbrock [107], Verghese et.al [127], Van den Weiden [128]). In the 1980’s analysis of a non-linear DAE began as a research topic in modelling and numerical solving areas (e.g.: Brenan, Petzold, Campbell [17], Gear [44], Marquardt [87],[88], Pantelides [97],[98]). Rosenbrock [107] shows the important properties of a linear DAE model (i.e. index of DAE, consistent initialisation, index reduction) via equivalence system operations to transform the DAE into a Kronecker Canonical Form. Practically this transformation is difficult to carry out. The objectives of this chapter are to derive easier methods for detecting a high index problem, calculating the index, and detecting a consistent (re-) initialisation problem based on the information of the system matrices of a DAE model (1.3b), F ( z , z , u , t ) = 0 . Those system matrices are E , ( Es − A) , and (Es − A) −1 , where E= ∂F ∂F and A = . ∂ z ∂z Further this chapter describes proposals of index reduction techniques of a DAE model without performing non linear algebraic manipulations. This is to retain the original form of the model equations and model variables. The index reduction techniques will be derived in conjunction with an equivalence system operation (Rosenbrock [107]). 13 Chapter 2 : Mathematical properties of first order DAE model This chapter consists of seven sections. Section 2.2 briefly describes the Kronecker Canonical From (KCF) transformation, to know the index of a DAE model and to perform an index reduction. Section 2.3 describes methods to detect if a DAE model has a high index problem. Section 2.4 gives a method to calculate the index of a DAE model. Section 2.5 describes a consistent (re-) initialisation problem of a DAE model. Section 2.6. gives procedures to reduce the index of a DAE model and finally, section 2.7 gives some conclusions. 2.2. Kronecker Canonical Form Let a non-linear input-output DAE model be given by the equations: F ( z (t ), z (t ), u , t ) = 0 y = g ( z, t) (2.1a, 2.1b) where t ∈ I denotes the time on some interval I ⊂ R ; the function F : V → R m , V is open in R 2 m + k +1 is a vector space defining the model; the solution variables and the input variables z : I → R m , u : I → R k . Moreover the output functions g : W → Y , where W and Y ⊆ R m +1 with the output variables y : I → R n . The index of DAE model (2.1) is defined as follows: Definition 2.1A. Index κ of a DAE model (Brenan, Campbell, Petzold [17], Bujakiewicz [21]) Given a DAE (2.1a): F ( z (t ), z (t ), u (t ), t ) = 0 The index κ of a DAE is the minimum number of times that the complete or a part of equation (2.1a) must be differentiated with respect to t, such that the system equations: F ( z (t ), z (t ), u (t ), t ) = 0 d F ( z (t ), z (t ), u (t ), t ) = 0 dt # d (κ ) F ( z (t ), z (t ), u (t ), t ) = 0 dt (κ ) can be transformed into an explicit ODE, i.e. z as a continuous function of z , u, u1 ,..., u ( l ) and t, by algebraic manipulations. (note: l ≤ κ ). A DAE model with a (differential) index greater than one is called a high index DAE otherwise it is a low index DAE. 14 Chapter 2 : Mathematical properties of first order DAE model Definition 2.1B. Perturbation Index p of a DAE model (Hairer et.al [54]) Equation (2.1a) has a perturbation index p if p is the smallest integer such that, for all functions z p (t ) being solutions of the DAE perturbed by δ u (t ) F ( z p (t ), z p (t ), u (t ), t ) = δ u (t ) (2.1c) There exists a bound on the difference between z (t ) and z p (t ) : ( ) z (t ) − z p (t ) ≤ C z (0) − z p (0) + max δ u (ξ ) + " + max δ u ( p −1) (ξ ) (2.1d) 0 ≤ξ ≤t 0 ≤ξ ≤ t whenever the expression on the right-hand side is sufficient small. Gear [46] has shown that κ ≤ p ≤ κ + 1 . Moreover Gear derived that κ = p for DAE having an integral form of: F ( z , z , u ) = df ( z ) dt − g ( z ) − h (u ) = 0 (2.1e) which includes also DAE of the form (2.2). Since in this thesis, we will analyse the properties of a DAE based on the form of (2.2), then we will not make difference between differential index and perturbation index. We call only the ‘index’ of a DAE (2.2). The definition (2.1) is closely related with a strict system equivalence operations of a linear implicit DAE (Rosenbrock [107]). To understand, suppose ξ 0 = ( z 0 , z 0 , u 0 , t0 )T lies on a solution manifold of (2.1a) at time t0 ∈ I and suppose (2.1a) is locally time independent. Without losing generality for analysis purpose we choose ( z 0 , z 0 ) = (0, 0) . Linearisation of (2.1a) at ξ gives: 0 E z(t ) = Az (t ) + Bu(t ) (2.2) where: E= ∂F ξ , ∂ z o e j ∂F ξ , ∂z o e j A=− B=− ∂F ξ ∂u 0 e j After Laplace transformation we get the solution of (2.2): b g bE z z ( s ) = T ( s) where: T ( s ) = ⎡⎣t ( s )ij ⎤⎦ m 1 [107]). Matrix −1 0 + Bu( s) g (2.3) = [ Es − A] is called the system matrix of (2.2) (Rosenbrock ( Eλ − A) is called pencil of (2.2) (Brenan, Campbell and Petzold [17]). Let T(s) be non-singular, then there is a constant pre-multiplying matrix M and a constant post-multiplying matrix N (i.e. algebraic manipulations on the DAE model equations and variables) that transform (2.2) to a Kronecker Canonical Form (KCF). 15 Chapter 2 : Mathematical properties of first order DAE model This equivalence system operation is also called a restricted system equivalence operation, (Rosenbrock [107]). This is given as follows: MT ( s ) NN −1 z ( s ) = MENN −1 z 0 + MBu ( s ) (2.4a) ⇒ MT ( s) N zˆ ( s) = MEN zˆ 0 + uˆ ( s ) where MT ( s) N = LMsI − A N 0 r r OP Q LM N Ir 0 , MEN = I m− r + sJ 0 u( s) = MBu( s) 0 J m− r OP, Q z( s) = N −1 z ( s), with J = block diag( J1 ,..., J q ) ; where: LM0 1 % J =M MM N0 " LsI − A ⇒M N 0 i r r OP P 1P P 0Q 0 % 0 0 I m− r + sJ , i = 1,2,..., q (2.4b) OPFG z (s)IJ = LM I 0 OPFG z IJ + FG u (s)IJ QH z (s)K N 0 J QH z K H u (s)K 1 r 2 10 1 20 2 (2.5) Each of Ji has a size ji and the largest max( ji ) = j is called the degree or index of nilpotency (J). For j ≥ 1 the DAE (2.4) is called a high index DAE, otherwise it has a low index. For j = 0 the DAE (2.2) is called an index one DAE. In the time domain the first row of (2.5), the ordinary state space part, can be written as: zˆ1 (t ) = Ar zˆ1 (t ) + uˆ1 (t ) , zˆ1 (t0 ) = zˆ10 (2.6) The solution of the second row can be done by pre- or post-multiplication with unimodulair polynomial matrix M(s) or N(s) (i.e. algebraic manipulations and differentiations on model equations and variables). This equivalence system operation is called as a strict system equivalence operation (Rosenbrock [107]): M ( s) I m− r + sJ z 2 ( s) = M ( s) J z 20 + M ( s)u 2 ( s) or I m− r + sJ N ( s) z 2 ( s) = N ( s) J z 20 + N ( s)u 2 ( s) where M ( s) = N ( s) = Diag [ I + sJi ]−1 and every block entry of M ( s), N ( s) has a form of: 16 (2.7a) Chapter 2 : Mathematical properties of first order DAE model [ I + sJi ]−1 LM1 =M MM # N0 − s " ( −1) ji −1 s ji −1 % % −s 0 1 " 1 OP PP PQ (2.7b) in the time domain this can be written as: j −1 j −1 i =0 i =0 j j i =0 i =0 ⇒ z 2 (t ) = ∑ ( −1) i J iδ ( i ) J z 20 + ∑ ( −1) i J i u 2 (t ) (i ) (2.8a) and (i ) ⇒ z 2 (t ) = ∑ ( −1) i J iδ ( i ) J z 20 + ∑ ( −1) i J i u 2 (t ) (2.8b) Where : δ (i ) = i-th time derivate of impulse function. The formulas (2.7a,b) show that for j ≥ 1 , the solution of the second row of (2.5) requires row or column differentiations, where this solution (2.8a,b) may introduce impulsive behaviour in case of z 20 ≠ 0 and may require differentiation of ‘input’ variables if u 2 (t ) ≠ 0 . Thus for j ≥ 1 the DAE (2.2) requires j times differentiations to be able to transform (2.2) into an ODE with zˆ1 (t ), zˆ 2 (t ) as functions of j (i ) zˆ1 (t ), uˆ1 (t ) and ∑ (−1)i J i uˆ 2 (t ) (see definition 2.1). i =0 For j=0, i.e. an index one DAE, the solution (2.2) becomes: zˆ1 (t ) = Ar zˆ1 (t ) + uˆ1 (t ) , zˆ1 (t0 ) = zˆ10 zˆ 2 (t ) = uˆ 2 (t ) Lemma 2.2 Consider (2.4a,b); then j- degree of nilpotency of J equals to the (differential) index κ. Proof: to solve (2.5) it needs ( j − 1) differentiations (see 2.7b), and one extra differentiation to calculate z( t ) (see: (2.8a,b)). It follows that the (differential) index κ of (2.2) equals to j-degree of nilpotency of J. With this KCF transformation, we can calculate the index of a DAE model as given on (2.5) and perform an index reduction through a strict system equivalence operation as given on (2.7). The problems on these equivalence system operations are: - difficult to get the transformation matrices M and N to bring to Kronecker Canonical Form - the model equations and variables are changed 17 Chapter 2 : Mathematical properties of first order DAE model 2.3. Low index criterion of a DAE model In case if we only want to know if a DAE model has a low index, the following Lemmas 2.3 or 2.4 give an easy computation procedure: Lemma 2.3 Low Index Criterion - 1 Consider a DAE model (2.2): T ( s) z ( s) = Bu( s) (2.3) where T ( s ) = [ Es − A] and let det T ( s) ≠ 0 ,i.e. non singular, then the DAE (2.3) has a low index if and only if deg det T ( s) = rank E (2.9) Proof: Given a DAE (2.3), T(s) and E by a restricted system equivalence operation transformed to (2.5), T '( s), E ' ; where: ⎡ sI − Ar T '( s ) = ⎢ r ⎣ 0 ⎤ , I m − r + sJ ⎥⎦ 0 ⎡I E'= ⎢ r ⎣0 0⎤ J ⎥⎦ J is defined as in (2.7b). Since deg det I n − r + sJ = 0 , we have deg det T ( s) ≡ deg det T '( s) = deg det sI r − Ar = r. Further rank E ≡ rank E ' = rank LM I 0 OP = r + rank J , but since DAE model has a N 0 JQ r low index if and only if rank J = 0 , we have rank E = r if and only if the DAE model has a low index. When the system matrix T(s) is not in KCF, then r can be calculated from deg det T ( s) , as follows : S is the set of all )ij ⎥⎦ ⎢⎣( permutation σ of numbers 1, 2,..., m , then the determinant of T ( s ) , det T ( s ) is Given a square matrix T ( s ) = ⎡ tij ( s ) ⎤ ∈ R m×m [ s ] and defined (J.G. Broida [18], P. Lancaster [72]) as: det T ( s ) := ∑ sign(σ )t1σ1 ( s )t2σ 2 ( s )...tmσ m ( s ) σ ∈S m = ∑ sign(σ )∏ tiσ i ( s ) σ ∈S i =1 where sign(σ ) equals –1 for σ odd and 1 for σ even. 18 (2.10a) Chapter 2 : Mathematical properties of first order DAE model Then r = deg det T ( s ) m (2.10b) = deg( ∑ sign(σ )∏ tiσ i ( s )) σ ∈S i =1 Lemma 2.4. Low Index Criterion – 2 Consider a DAE model with the following equations: z1 (t ) = A11 z1 (t ) + A12 z2 (t ) + B1u1 (t ) (2.11) 0 = A21 z1 (t ) + A22 z2 (t ) + B2 u2 (t ) This means that: ⎡I E=⎢ r ⎣0 0⎤ , and 0 ⎥⎦ ⎡A A = ⎢ 11 ⎣ A21 A12 ⎤ A22 ⎥⎦ then (2.11) has a low index if and only if A22 is non-singular. Proof: rank E = r and deg det T ( s) ≡ deg det LMsI − A N A r 11 21 A22 is non-singular. OP Q A12 = deg sI r − A11 A22 equals to r if only if A22 b g 2.4. Calculation of the index of a DAE model The index of a DAE (2.2) can be calculated more simply with the following Lemma 2.5, 2.6. Lemma 2.5 Consider a DAE (2.2) after KCF transformation is represented as DAE (2.5) then the index of the DAE (2.2) is max ij {0, (power of s of ( I m−r + sJ ) −1 ) + 1} Proof: from (2.5) and (2.7b), we see after a KCF transformation that the max power of s in Es − A −1 is s j−1 determined by the largest : 19 Chapter 2 : Mathematical properties of first order DAE model [ I + sJ ]−1 LM1 =M MM # N0 − s " ( −1) j −1 s j −1 % % 0 1 −s " 1 OP PP PQ where det I + sJ = 1 and j is the degree of nilpotency or index of DAE (2.2). The following Lemma 2.6 is derived to calculate the index of DAE (2.2) from its fractional system matrix inverse, since in most cases transformation of a DAE (2.2) into a KCF is not easy. Lemma 2.6. Consider a DAE (2.2) with its system matrix T ( s) = Es − A and its fractional polynomial matrix inverse: ( ) ⎡ ⎤ = ⎢ tij−1 ( s ) ⎥ ij ⎦ ⎣ ⎡⎛ det S ( s ) ⎞ ⎤ ji = ⎢⎜ ⎟ ⎥ ⎢⎝ det T ( s ) ⎠ij ⎥ ⎣ ⎦ i, j = 1,..., m −1 T −1 ( s ) = [ Es − A] (2.12) where sub-matrix Sij ( x ) of matrix T ∈ R m×m [ s ] is m × m matrix obtained by placing zeros in the i-th row and in j-th column of T ( s ) and replacing the ij-th element with 1 (J.G. Broida [18], P. Lancaster [72]): ⎛ t11 ( s ) " 0 " t1m ( s ) ⎞ ⎜ ⎟ # # ⎟ ⎜ # Sij ( s ) = ⎜ 0 0 ⎟ " 1ij " ⎜ ⎟ # # ⎟ ⎜ # ⎜ t ( s) " 0 " t ( s) ⎟ mm ⎝ m1 ⎠ then the index of DAE (2.2) or the index of T ( s) is given by: index (T ( s)) = maxij {0,(deg det S ji ( s) − deg det T ( s) + 1)} Proof. From Kronecker Canonical Form transformation we get: −1 0 ⎡ sI r − Ar ⎤ = Nˆ Es − A −1 Mˆ , [ ] I m − r + sJ ⎥⎦ ⎢⎣ 0 20 N −1 = Nˆ , M −1 = Mˆ (2.13) Chapter 2 : Mathematical properties of first order DAE model ⇒ [ Es − A] = N ⎡ ⎣⎢ −1 −1 sI r − Ar 0 ⎤ M 0 I m − r + sJ ⎦⎥ ⎡⎛ det S ji ⎞ ⎤ −1 −1 ⇒ ⎢⎜ ⎟ ⎥ = N1 ( sI r − Ar ) M 1 + N 2 ( I m −r + sJ ) M 2 , ⎢⎣⎝ det( Es − A) ⎠ij ⎥⎦ M M = ⎡ 1⎤ ⎢⎣ M 2 ⎥⎦ −1 ⇒ ⎡⎢( det S ji ( s) ) ⎤⎥ = P( s) + det( Es − A) −1.N 2 ( I m − r + sJ ) M 2 ij ⎦ ⎣ N = [ N1 N 2 ] , ⇒ ⎡⎢( det S ji ( s ) ) ⎤⎥ = ⎡⎢( pij ( s ) ) ⎤⎥ + det( Es − A) −1. ⎡⎢( kij ( s) ) ⎤⎥ ij ⎦ ij ⎦ ij ⎦ ⎣ ⎣ ⎣ where: deg pij ( s) < deg det ( sE − A) it follows: { } deg det S ji ( s ) = max deg pij ( s ), deg det( Es − A) + deg kij ( s ) ⇒ deg det S ji ( s ) = deg det( Es − A) + deg kij ( s ) ⇒ deg kij ( s ) = deg det S ji ( s ) − deg det( Es − A) Since the index of DAE (2.2) is equal to max ij {0, (power of s of ( I m−r + sJ ) −1 ) + 1} (Lemma 2.5), then it follows: index (T ( s)) = maxij {0,(deg det S ji ( s) − deg det T ( s) + 1)} 2.5. Solving a consistent initialisation and a re-initialisation problem Initial conditions and input variables are required to solve a DAE (2.2). The following gives a definition of consistent initial conditions and solving of a consistent reinitialisation problem. In this section we will that a DAE model will have a problem for the solving a consistent (re-) initialisation, when it has a high index or it has non minimum state variables. Moreover, we will see also that a low index DAE model can have non minimum state variables, which results to a problem for solving a consistent (re-) initialisation. 2.5.1. Solving a consistent initialisation problem Definition 2.7 Consistent Initial Conditions Given a DAE (2.2) and its input signals u (t0 ) , then ( z (t0 ), z (t0 )) is a Consistent Initial Conditions of (2.2) if and only if it satisfies: 21 Chapter 2 : Mathematical properties of first order DAE model a) E z (t0 ) = Az (t0 ) + Bu (t0 ) (2.14a) b) z (t 0 ) lies on the solution trajectories of DAE (2.2). (2.14b) or The Kronecker Canonical Form transformation of DAE model (2.2) (see equation 2.5) decomposes the system into a r-dimensional ordinary state space part and a (m-r) dimensional algebraic part, such that the system has r-arbitrary initial conditions z10 and (m-r) fixed initial conditions of z 20 = 0 to avoid impulsive behaviour. In other words, the original differential variables z (t ) are transformed and decomposed into r- state variables z1 (t ) and (m-r) algebraic variables (non-state) z 2 (t ) . For given input variables u (t0 ) at time t = t0 the m equations (2.14a) have m+r’ variables ( z (t0 ), z (t0 )) , where r’ is the column rank of E. The column rank of E gives the number of differential variables on the DAE (2.2). From the KCF it follows, Corollary 2.8 model (2.2) with r ' differential variables, where r ' = column rank ( E ) . There are only r-variables of ( z (t0 )) that can be assigned For a given DAE arbitrarily to compute a set of consistent initialisation values ( z (t0 ), z (t0 )) of DAE (2.2), where r = deg det T ( s ) and r ≤ r ' . This number r is called the ‘dynamic degree of freedom’ or the ‘system order’ of the DAE (2.2). Proof: See the KCF transformation, where : r = deg det T ( s ) = deg det ⎡ ⎢⎣ = deg det [ sI r − Ar ] ≡r sI r − Ar 0 ⎤ 0 I m − r + sJ ⎥⎦ ⎡ Ir ⎣0 and column rank of E ≡ r ' = column rank ⎢ 0⎤ = r + rank ( J ) ≥ r J ⎥⎦ For a given low index DAE with a minimum state variables, i.e. Column rank( E ) = r ' = r , then this gives: 22 Chapter 2 : Mathematical properties of first order DAE model Corollary 2.9 Given a low index DAE of the form (2.2) with colum rank ( E ) = rank ( E ) , r ' = r , then there are r-differential variables of ( z (t0 )) that can be assigned arbitrarily to compute a set of consistent initialisation values ( z (t0 ), z (t0 )) of DAE (2.2), where r = deg det T ( s ) . We see from Corollary 2.8 and 2.9 that the degree of freedom to assign initial values z (to ) arbitrarily is given by r = deg det T ( s ) . This means that not all of the variables z (to ) can be assigned arbitrarily to calculate consistent initial values ( z (t0 ), z (t0 )) for a high index DAE model or a low index DAE model with non minimum state variables. Solving Consistent Initialisation Problem (P.I. Barton [7]) Usually a Consistent Initialisation Problem is solved as an algebraic problem to satisfy criterion (2.14a) on definition 2.7, i.e. for the existence of a solution. The following gives a sufficient condition for solving of a consistent initialisation problem. Consider a DAE of the form: z1 (t ) = A11 z1 (t ) + A12 z2 (t ) + B1u1 (t ) 0 = A21 z1 (t ) + A22 z2 (t ) + B2 u2 (t ) (2.11) Solving of a general consistent initialisation problem of (2.11) at a given time t = t0 ∈ I ⊂ R and given input variables u (t0 ) ∈ R k is formulated as a solving set of algebraic non-linear equations for the unknown vector ( z1 (t0 ), z1 (t0 ), z 2 (t0 ) ) : z1 (t0 ) = A11 z1 (t0 ) + A12 z2 (t0 ) + B1u1 (t0 ) 0 = A21 z1 (t0 ) + A22 z2 (t0 ) + B2 u2 (t0 ) (2.15a,b,c) A30 z1 (t0 ) = A31 z1 (t0 ) + A32 z2 (t0 ) + B13u1 (t0 ) + B23u2 (t0 ) Where: A30 z1 (t0 ) = A31 z1 (t0 ) + A32 z2 (t0 ) + B13u1 (t0 ) + B23 u2 (t0 ) are r independent initial equations. ⎡ −I ⎢ 0 If the matrix ⎢ ⎢⎣ − A30 A11 A21 A31 A12 ⎤ A22 ⎥⎥ is non singular then a set of initial A32 ⎥⎦ ( m + r *) x ( m + r *) conditions ( z1 (t0 ), z1 (t0 ), z 2 (t0 ) ) can be calculated. 23 Chapter 2 : Mathematical properties of first order DAE model Specific case 1 Usually one gives a set of z1i (t0 ) = z1i 0 , i = 1,..., r to compute initial condition vector ( z1 (t0 ), z1 (t0 ), z 2 (t0 ) ) . This is a special case of an initialisation equations set (2.15c) and the consistent initialisation problem is formulated as algebraic solving of the following equations: z1 (t0 ) = A11 z1 (t0 ) + A12 z2 (t0 ) + B1u1 (t0 ) 0 = A21 z1 (t0 ) + A22 z2 (t0 ) + B2 u2 (t0 ) z1i (t0 ) = z1i 0 , i = 1,..., r ⎡ − I A11 A12 ⎤ ⎢0 A if the matrix A22 ⎥⎥ or A22 is non-singular, then a set of initial 21 ⎢ ⎢⎣ 0 0 ⎥⎦ I conditions ( z1 (t0 ), z1 (t0 ), z 2 (t0 ) ) can be calculated. We see here (as given on Lemma 2.4 and Corollary 2.9) that solving a consistent initialisation problem by specifying r-independent initial conditions ( z (t0 )) can be only applied for a low index DAE model with minimum state variables. Specific case 2: Corollary 2.10. Steady state solution is a consistent initial condition (Kroner et.al [68]): Given a DAE (2.10) with a given input variables u s . The DAE (2.10) will have a b g b g L A A OP is non-singular ≡M NA A Q steady state solution of z s , z s = 0, z s if and only if: T ( s) s= 0 11 12 21 22 Since a steady state solution of a DAE lies on the solution trajectory, then a steady state solution, z s , z s = 0, z s , is a consistent initial condition of a given b g b g DAE for the given input variable values u s . 2.5.2. Solving a consistent re-initialisation problem Obviously system behaviour can be subjected to discontinuities of non-state variables or input signals. Below we define a consistent re-initialisation condition. 24 Chapter 2 : Mathematical properties of first order DAE model Definition 2.11. Consistent Re-initialisation Condition Given a DAE (2.11) of the form : z1 (t ) = A11 z1 (t ) + A12 z2 (t ) + B1u1 (t ) 0 = A21 z1 (t ) + A22 z2 (t ) + B2 u2 (t ) at t + = lim t 0 + ε , for given non-state variable (discontinuities) as: ε →0 u( t ) = RS u(t ), Tu(t ), 0 + t = t0 t = t + = t0 + ε ⎧ z 2 (t0 ), ⎩ z 2 (t+ ), and/or z 2 (t ) = ⎨ t = t0 t = t + = t0 + ε (note u (t ), z 2 (t ) do not need to be continuous and differentiable) then vector ( z1 (t+ ), z1 (t+ ), z 2 (t+ ) ) is called Consistent Re-initialisation Condition of (2.11) for given input signals ( u (t+ ) ) under the condition of C 1 continuity of the state variables, i.e.: z1 (t0 ) = z1 (t+ ) if and only if it satisfies: z1 (t+ ) = A11 z1 (t+ ) + A12 z2 (t+ ) + B1u1 (t+ ) 0 = A21 z1 (t+ ) + A22 z2 (t+ ) + B2 u2 (t+ ) From definition 2.11, it follows : Corollary 2.12. Consistent Re-initialisation Criterion - 1 DAE (2.11) has the property of consistent re-initialisation if and only if: A22 is non-singular or the DAE model (2.11) has a low index with minimum state variables. From corollary 2.9, it follows: Corollary 2.13. Consistent Re-initialisation Criterion – 2 Consider a DAE with given matrices E and T ( s) has the property of consistent reinitialisation if and only if : The column rank of E (or number of differential variables) = deg det T ( s) 25 Chapter 2 : Mathematical properties of first order DAE model For a high index DAE the number of differential variables (the column rank (E)) is greater than deg det T ( s) . This means that a high index does not have a consistent reinitialisation property. Note: In some cases an index one DAE model does not have a consistent re-initialisation property, since the column rank of E (or number of differential variables) > deg det T ( s) . This is called a low index DAE model with non minimum state variables. Process modelling based on the balance and constitutive equations always gives a DAE model which has the integral form, i.e.: F ( z , z , u ) = df ( z ) dt − g ( z ) − h (u ) = 0 (2.16a) These equations are usually represented as non minimal state variables and can be transformed/written into a minimal state representation as follows: x = g ( z ) + h (u ) (2.16b) 0 = x − f (z) An index one DAE model given with non minimum states representation can be transformed into an index one DAE model with minimum state representation, without performing additional differentiation. Brull and Pallaske [20] give an example of an index one DAE, which does not satisfy consistent re-initialisation criterion, given in the following: Consider an index one DAE of the form: T11 ( x1 , x 2 ) x 1 + T12 ( x1 , x 2 ) x 2 = f ( x1 , x 2 , u) 0 = g ( x1 , x 2 , u) (2.17a) can be written on an index one DAE , and satisfies consistent re-initialisation criterion as follows: z = f ( x1 , x 2 , u) 0 = g ( x1 , x 2 , u) (2.17b) 0 = p( x 1 , x 2 ) − z where: p ( x1 , x 2 ) = T11 ( x1 , x 2 ) x 1 + T12 ( x1 , x 2 ) x 2 and ∂p ∂ x1 26 = T11 ( x1 , x 2 ); ∂p ∂ x2 = T12 ( x1 , x 2 ) Chapter 2 : Mathematical properties of first order DAE model 2.6. Index reduction of a DAE model There are 3 main difficulties in solving a high index DAE: 1. it may require differentiation operators (see 2.8.a,b), 2. the algebraic solving consistent (re-) initialisation problem (see corollary 2.13), 3. the break down of error control on standard multistep implicit numerical methods (Brenan, et.al. [17]) Besides that, the degree of freedom of the state variables having C 1 continuity in a high index model is less than the primitive state variable or ‘storage’ variables as assumed by the modeller. Bujakiewicz [21] proposed a modified multistep implicit Backward Difference Formulae (BDF), where ‘numerical differentiation’ is implemented for the error control. This is done by ‘scaling’ of error control by the information from the matrix ( Es − A) −1 . The drawbacks of this method are: 1. We do not know the numerical stability and performance of the method for large scale DAE models. 2. This numerical solving technique may not be easy and can be time consuming for a large scale DAE model. 3. Solving algebraic consistent (re-) initialisation problem remains problematic. Another method to solve high index DAE models is through symbolic index reduction to find a low index DAE model representation. Several advantages why we want to get low index DAE models, are: 1. the problem on algebraic solving of a consistent (re-) initialisation does not exist 2. to be able to use a standard (multistep) implicit numerical solving method 3. to know information about the state variables in the model The extra information is obtained from the index reduction steps, namely: 1. the (hidden) states constraint equations and 2. to alert the modeller in case the chosen ‘inputs’ variables imply non causal behaviour In the following we give two methods of index reduction namely: modified row strict system equivalence and modified column strict system equivalence operation, but first we are going to examine the strict system equivalence operation for an input output linear DAE model that is given as follows: E z = Az + Bu y = Cz (2.18a) or in Laplace domain with zero initial values gives: T ( s) z ( s) = Bu( s) y ( s) = Cz ( s) where: T ( s) = ( Es − A) (2.18b) 27 Chapter 2 : Mathematical properties of first order DAE model Rosenbrock [107], Van Den Weiden [128] transform (2.18b) into a Kronecker Canonical Form (see also (2.4a)): MT ( s) N z( s) = MBu( s) y ( s) = CN z( s) (2.19) where: z = N z and: MT ( s ) N = ⎡ ⎢⎣ sI r − Ar 0 ⎤ 0 I m − r + sJ ⎥⎦ The relation (2.18b) can be written as: 0 − B1 ⎤ ⎡ zˆ1 ( s ) ⎤ ⎡ 0 ⎤ ⎡ sI r − Ar I m − r + sJ − B2 ⎥ ⎢ zˆ 2 ( s ) ⎥ = ⎢ 0 ⎥ ⎢ 0 ⎢⎣ C1 C2 0 ⎥⎦ ⎣⎢ u ( s ) ⎦⎥ ⎢⎣ y ( s ) ⎥⎦ where: MB = LM B OP, NB Q 1 (2.20) CN = C1 C2 2 Moreover Rosenbrock [107] and Van der Weiden [128] introduced the term “input decoupling zeros at infinity”, when B2 = 0 and “ output decoupling zeros at infinity”, when C2 = 0 . On the “input decoupling zeros at infinity” the strict system equivalence operation can be performed with the equations/rows differentiation and algebraic manipulation, without introducing differentiation on the input variables. On the “output decoupling zeros at infinity” the strict system equivalence operation can be performed with columns/variables differentiation and algebraic manipulation, without introducing unnecessary differentiation on the input variables. To test if there exists “input and/or output decoupling zeros at infinity” we can examine the maximum power of s on the entries of the following matrix: i ) p1 = max{0, power of s in ( Es − A) −1} ii ) p2 = max{0, power of s in ( Es − A) −1 B} (2.21) iii ) p3 = max{0, power of s in C( Es − A) −1} when p2 < p1 then we have “input decoupling zeros at infinity” and for p3 < p1 we have “output decoupling zeros at infinity” 2.6.1. Index reductions through equation differentiations/modified row strict system equivalence operation In this section we will give an index reduction technique based on the analysis of KCF transformation properties (see 2.4 to 2.8). Figure 2.1 again schematically shows the 28 Chapter 2 : Mathematical properties of first order DAE model KCF transformation and required differentiations to get a low index presentation of a DAE model: Given DAE KCF algebraic manipulations ( Es − A) (r.s.e) (2.4) LMsI − A N 0 r A low index DAE 0 I + sJ OP ‘differentiations’ LMsI − A 0OP N 0 IQ Q (s.s.e) r (2.7) Figure 2.1 A schematic of an index reduction via a KCF transformation r.s.e = restricted system equivalence operation s.s.e = strict system equivalence operation Generally it is not easy to bring a DAE to a Kronecker Canonical Form and for a nonlinear DAE practically it is even more difficult. Thus we prefer to perform index reduction in original DAE structure, schematically given on figure 2.2. Given DAE differentiations ( Es − A) algebraic Extended manipulations DAE model extracting: - A low index DAE state & non-state var Figure 2.2. A schematic of an index reduction without a KCF transformation The idea on figure 2.2 is to minimize changes on the model equations by first performing the required differentiation and last algebraic manipulations to extract state and non-state variables. To perform this transformation, there are two questions: 1. How to find the required differentiation based on information of the system matrix Es − A ? 2. How to abstract state and non-state variables ? Answer question 1: See (2.12) the required row differentiations are given on column-wise power of s on the matrix: ⎡ nij ( s ) ⎤ ( Es − A)−1 = ⎢ ⎥ , where nij ( s ) = det S ji ( s ) ⎣ det( Es − A) ⎦ 29 Chapter 2 : Mathematical properties of first order DAE model which is equivalent (2.7b) of abstracting required differentiation from the column of matrix: I + sJ −1 Example 2.1: Given an index 3 DAE : z1 (t ) + z2 (t ) = 0 z2 (t ) + z3 (t ) = 0 (2.22) z3 ( t ) = 0 LM1 with system matrix b Es − Ag = 0 MM N0 OP PP Q s 0 1 s and det( Es − A) = 1 0 1 Information of the required differentiations are abstracted from the column of the ⎡1 − s s 2 ⎤ n ( s ) ⎢ ⎥ ⎡ ⎤ ij −1 matrix: ( Es − A ) = ⎢ ⎥ = ⎢0 1 − s ⎥ ⎣ 1 ⎦ ⎢0 0 1 ⎥ ⎢⎣ ⎥⎦ namely: 2-times differentiation of 3-rd equation (given on the power of s on 3-rd column) and once differentiation of 2-nd equation (given on the power of s on 2 column). The strict system equivalence operation, results in a low index DAE, and is schematically given as follows: - (a) subtract from the first row the once differentiated second row - (b) add to result of (a) the twice differentiated third row - (c) subtract from the second row the once differentiated third row LM1 MM0 N0 OP LM1 s P ~ M0 1PQ MN0 OP L1 s P ~ MM0 1 PQ MN0 OP 0P 1PQ s 0 0 − s2 0 0 1 0 1 0 1 0 (2.23) or the operation (a),(b),(c) can be done by first performing differentiations then algebraic manipulation, schematically given as follows: 30 Chapter 2 : Mathematical properties of first order DAE model (1) ( 2) 1 s 0 0 1 s (3) (3 ) 0 0 1 -1 1 -1 0 0 s (2 ) (3) 0 s s 2 (2.24) 0 0 s2 where: (2 ) = once differentiation of equation 2 = once differentiation of equation 3 (3) = twice differentiation of equation 3 (3) Answer question 2: From the strict system equivalence operation above, we can make a conjuncture that non-state variables can be deduced from differentiated parts of the DAE, resulting in a low index DAE. The following gives a rule of extracting non-state variables for index reduction based on how a strict system equivalence operation works. Conjuncture 2.14a: Extracting non-state variables Given a high index DAE model : F ( z, z , u , t ) = 0 denotes with F and its extended high index DAE model of the form: LM F MM D # f MM D f N (1) 1 (k) where: k OP PP = 0 PP Q (2.25) F = original high index DAE model D ( k ) f k = a partition of extended set (2.25) formed by differentiation of part of the equations of F . These partitions are ordered from the lowest degree of differentiation required of the sub-set of equations on F to the highest one. The information of required equations to be differentiated is from the columns of the matrix [T ( s )]−1 = ( Es − A) −1 31 Chapter 2 : Mathematical properties of first order DAE model e.g.: on the example 2.1: ch F 2 I 0 :G J → H 3K 0 D (1) f 1: 3 → 0 0 s D( 2) f 2 s s2 0 s2 Suppose each partition of extended DAE equations, D ( k ) f k , has p equations and contains q variables (size ( pxq ) ), where qi ≤ q are differentiated variables, then from this differentiated partition p non-state variables can be chosen from qi L ∂( D f with M MN ∂z (k ) variables z d k d ) OP is non-singular. PQ The resulting extended DAE equations with chosen non-state variables are strict system equivalence with the original DAE, since algebraic manipulation on the strict system equivalence operation equals to the elimination of these non-state variables from extended DAE equations. Application of the operation above on example 2.1 is given as follows: (a) from : D ( 2 ) f 2 : F 2 I → 0 GH 3JK 0 state variables : ch (b) from D (1) f : 3 → 0 0 1 s s2 0 s2 z2′d , z3′′d s we choose : second and third variables as non- we choose : third variable as non-state variable: z3′d Thus an extended equivalent low index model is: z1 + z2′ d = 0 z2 + z3′d = 0 z3 = 0 z3′d = 0 z2′ d + z3′′d = 0 z3′′d = 0 (2.26) and elimination of all non-state variables will give: z1 = 0 z2 = 0 z3 = 0 (2.27) as expected from a strict system equivalence operation. More examples of high index problem and reduction are given in the Chapter 4. 32 Chapter 2 : Mathematical properties of first order DAE model Notes: 1. The difference in the result given above with the algorithm as proposed by Mattsson and Soderlind [86] is: a. the required differentiations are directly derived from information of the −1 system matrix, Es − A . b. the result above gives the direct conjuncture with strict system equivalence operation for index reduction as described in section 2.2. 2. Since strict system equivalence is not unique the choice of non-state variables from extended DAE equations may also not be unique. 3. The advantages of the DAE index reduction above are: a. variables elimination is not required, where for a non-linear DAE system variables elimination is not easy b. physical DAE equations structure does not change 4. Index reductions through equations differentiation is recommended if we have “input decoupling zeros at infinity” 2.6.2. Index reductions through variables differentiation/modified column strict system equivalence operation In some cases we have a DAE with “output decoupling zeros at infinity”, Example 2.2: z1 = − z1 + z2 − 2 z3 + u z2 = z1 − 2 z2 + z3 0 = z1 + z2 + u (2.28) y1 = z1 y2 = z2 if the DAE (2.28) contains variable z3 , which is not of interest or does not appear in the output of the system, we can write (2.28) in: LMs + 1 MM −−11 MM 1 MN 0 OPL PPMM PPMM PQN LM MM MM MN OP PP PP PQ 0 −1 2 −1 z1 s + 2 −1 0 0 z2 0 −1 −1 = 0 , z3 0 0 0 y1 u 1 0 0 y2 OP PP PQ LMs + 1 T ( s ) = M −1 MN −1 OP PP Q −1 2 s + 2 −1 −1 0 (2.29) with: 33 Chapter 2 : Mathematical properties of first order DAE model ( Es − A) −1 and LM− 1 s+4 M 1 =M MM ss ++ 43 MN s + 4 2 s+4 2 s+4 s+2 s+4 − ⎡ 2s + 4 ⎤ ⎢ ⎥ ⎢ s+4 ⎥ −s ⎢ ⎥ ( Es − A)−1 B = ⎢ , s+4 ⎥ ⎢ ⎥ ⎢ s 2 + 2s − 2 ⎥ ⎢ ⎥ ⎣ s+4 ⎦ ⎡ 2s + 4 ⎤ ⎢ s+4 ⎥ C ( Es − A)−1 B = ⎢ ⎥ ⎢ −s ⎥ ⎣⎢ s + 4 ⎦⎥ 3 + 2s s+4 s −1 s+4 s2 + 3s + 1 s+4 − OP PP PP PQ ⎡ −1 ⎢s + 4 C ( Es − A)−1 = ⎢ ⎢ 1 ⎢⎣ s + 4 −2 s+4 2 s+4 −3 − 2s ⎤ s+4 ⎥ ⎥ s −1 ⎥ s + 4 ⎥⎦ (2.30) The DAE (2.28) has a system order (a dynamic degree of freedom) = 1, index = 2 and 1 “output decoupling zero at infinity”. We can perform restricted system equivalence operation with matrices: ⎡1 2 0 ⎤ M = ⎢⎢ 0 1 0 ⎥⎥ , ⎢⎣ 0 0 1 ⎥⎦ N = I3×3 (2.31) this transforms(2.29) into: LMs − 1 MM −−11 MM 1 MN 0 OPL z O LM 0 OP PPMMz PP = MM 00 PP, PPMMz PP MM y PP PQN u Q MN y PQ 3 + 2 s 0 −1 s + 2 −1 0 −1 0 −1 0 0 0 1 0 0 1 2 3 1 2 LMs + 2 −1OP N −1 0 Q This has a form as the left side lower part of KCF s A strict system equivalence operation can be performed by multiplying the 3rd column with s and by adding to the 2nd column, this resulting in: 34 Chapter 2 : Mathematical properties of first order DAE model LMs − 1 MM −−11 MM 1 MN 0 OPL z O LM 0 OP PPMMz PP = MM 00 PP, PPMMz PP MM y PP PQN u Q MN y PQ 3 + 2 s 0 −1 −1 0 2 −1 0 −1 0 0 0 1 0 0 or: 1 2 C ( sE − A) −1 3 1 LM 2s + 4 OP B = M s+4 P MN s−+s4 PQ (2.32) 2 z4 = z1 − 3z2 + u z1 + 2 z2 = z1 − 3z2 + u 0 = z1 − 2 z2 + z3 0 = z1 − 2 z2 + z3 or 0 = z1 + z2 + u 0 = z1 + z2 + u 0 = z1 + 2 z2 − z4 (2.33) y1 = z1 y2 = z2 The DAE equation set (2.32), (2.33) are strictly system equivalent with (2.28). The DAE (2.33) has index one. Application of a high index reduction of DAE (2.28) using the method from section 2.6.1 will give unnecessary differentiation of the input variables, since it requires differentiating the 3rd equation of (2.28). Again figure 2.3 gives schematically the steps on the high index reduction, and example 2.2 shows how this operates. Given DAE algebraic manipulations ( Es − A) DAE with some variables transformation ‘differentiation’ A low index DAE extracting: - state & - non-state var Figure 2.3. A schematic of an index reduction without a KCF transformation The question that arises is: - How to find the transformation matrix M ? 35 Chapter 2 : Mathematical properties of first order DAE model Conjucture 2.14b: Consider a high index input output DAE model of the form: z1 = A11 z1 + A12 z2 + A13 z3 + B1u 0 = A21 z1 + A22 z2 + B2 u 0 = A31 z1 + B3 u y = C1 C2 0 z1 z2 z3 LM(sI − A ) T ( s) = M − A MN − A n×n 11 21 T 31 − A12 − A13 − A22 0 0 0 OP PP is non - singular Q (2.34) with variables z 3 as “output decoupling zeros at infinity”, then there exists a constant matrix M , which performs a restricted system equivalence operation on T ( s) resulting in: LM P (s) P ( s) B =M MM − A N −A P12 ( s) 0 11 P22 ( s) I − A22 0 21 M T ( s) 21 0 31 0 OP B P B P P B Q B11* * 12 * 2 * 3 n B m (2.35) s P11 ( s), P12 ( s), P21 ( s), P22 ( s) are first order polynomials in s and MB = B11* B12* B2* T B3* . The sizes of the rows of these polynomials are given with n and m. The column operation of a strict system equivalence are given with arrows (2.35), which transforms (2.35) to: LM P (s) MM Q MN −− AA 11 21 21 31 P12 ( s) 0 Q22 − A22 0 I 0 0 OP B P B P P B Q on B11* * 12 * 2 * 3 (2.36) The entries of constant matrix M can be constructed from identity matrix I having the same size as the system matrix T ( s) and replacing the first m-rows with column vector of Ker ( A13 ) , i.e.: 36 Chapter 2 : Mathematical properties of first order DAE model mb g b g b gr R|F a I F a I F a |G a J G a J G a = SG J , G J ,", G ||GG # JJ GG # JJ GG TH a K H a K H a Ker ( A13 ) = a1 , a 2 ,..., a m 11 21 m1 12 22 m2 1n 2n mn I U| JJ | JJ V| K |W (2.37) is given as follows: LM( Ker ( A )) 0 I " M =M MM # % 1 N0 " 0 T 13 LM a 0O M # 0P M a P= 0P M M 1PQ M MN 11 m1 OP PP PP PP Q (2.38) i = 1,..., m (2.39) " a1n " " " amn 0 0 0 0 I ( n−m )×( n−m ) 0 # % 1 0 0 " 0 1 Each new differential equation constructed of a linear combination from the entries of column vector Ker ( A13 ) will remove variables z 3 , i.e: ba g z = ba g ( A z + A T i T 1 i 11 1 z + B1 u), 12 2 Therefore a restricted system equivalence operation on the DAE (2.34) using matrix M as in (2.38) will result in (2.35), where the first m rows on the z 3 entries (3rd column) are zero. This makes it possible to eliminate the s terms on the following (nm) rows through a strict system equivalence operation (see (2.35) and (2.36)). In Chapter 4 we will use this kind of operations to do the high index reduction without performing unnecessary differentiation on the equations. Notes: 1. In case we have variables that have to be differentiated, that are in the differential equations and not in non-linear of the algebraic equations, we are able to apply the column wise strict system equivalence as described above. 2. Another advantage of this technique besides avoiding unnecessary equations differentiation is: only the first m equations are transformed by the restricted system equivalence and the other remaining equations are unchanged. The nm unchanged differential equations can easily be replaced by steady state equations, since the s term / differential variable will disappear through strict system equivalence operation. This implies that the method can be easily applied for non-linear DAE model as long as the given n-differential equations are linear and the remaining algebraic equations can be non-linear algebraic relations. 37 Chapter 2 : Mathematical properties of first order DAE model 2.7. Conclusions The objectives of this chapter are to derive easy methods: to detect a high index problem, to detect a consistent (re-) initialisation problem, to calculate index of a DAE model, and to propose index reduction techniques without non linear algebraic manipulations. The index reduction should not destroy the original model equations and variables. The method should not use complicated algebraic manipulations, e.g. by transformation to a Kronecker Canonical Form. Given DAE model, F ( z , z , u , t ) = 0 , with the matrices E = ∂F ∂F ,A= . The high ∂ z ∂z index problem of the DAE model can easily be detected by the use of information of the system matrices, ( Es − A), E only. A DAE model has a low index if rank ( E ) = deg det( Es − A) . The dynamic degree of freedom r of a DAE model, i.e. the number of state variables that can be set arbitrarily to solve a consistent (re-) initialisation problem, can be calculated from r = deg det( Es − A) . Problem on finding consistent (re-) initialisation condition means that it is not possible to set all values of the state variables arbitrarily to solve the consistent initial conditions of a given DAE model. This problem is caused by a high index problem or non minimum state variables on an index one problem. An index reduction of a DAE model can be performed using information from ( Es − A) −1 for the required differentiation and extracting non-state variables from the differentiated part of original DAE. It is demonstrated that this operation is a strict system equivalent. There are two kinds of the high index reduction techniques, namely strict system equivalence operation through equations differentiation (Conjuncture 2.14a) and strict system equivalence operation through variables differentiation (Conjuncture 2.14b). Both proposed methods will preserve the original model equations and variables. 38 Chapter 3: Structural Properties of a First Order DAE model The structural information of system matrices E , ( Es − A), ( Es − A) −1 can be used to analyse the structural properties (dynamic degree of freedom, index, and required differentiation for index reduction) of a first order non linear DAE model. ‘Every system has a structure’ 3.1. Introduction This chapter gives the notions of structural properties of a first order non-linear DAE model, F ( z (t ), z (t ), u (t ), t ) = 0 (1.3b) for the low index criterion, index calculation, and the required row/equations differentiations for index reduction. The objectives of this chapter are to analyse the properties of a DAE model based on the structural information on the matrices : struc( E ) , struc(( Es − A)) , struc( Es − A) −1 , instead of the exact numerical values of the system matrices. The ∂F and structural matrices struc( E ) and struc( A) contain structural information of ∂ z ∂F respectively. These structural properties will be described in conjunction with the ∂z properties of a DAE model derived in chapter 2. Moreover this chapter will explore the bounds of the exact numerical properties of a DAE model compared with its structural properties. The definitions of structural theory to be used in this chapter are adopted from ChingTai Lin [28] and Unger [126]. This is shortly described in Appendix A. The algorithm to implement the structural theory in this chapter is using the graph algorithm developed by Bujakiewics [21]. The principal of a graph algorithm is described in Appendix B. The structural approach chosen in this section is different with the structural approach done by C.C. Pantelides [98] and Unger et.al. [126]. Our structural approach is based on the structural analysis of matrices ( Es − A), ( Es − A) −1 and matrix E as given in Chapter 2. Pantelides’ algorithm [98] is used to determine the required differentiation to allow consistent initialisation of high index DAE. The drawback of Pantelides’ 39 Chapter 3 : Structural properties of first order DAE model algorithm is that it can give unnecessary differentiation (see example 3.3 in section 3.5). Unger et.al [126] developed structural index detection and calculation of structural dynamic degree of freedom based on the Gear index transformation algorithm (C.W. Gear [45]). The drawback of Gear’s approach is the algebraic row manipulation, where the required equation differentiation on the original equation set is difficult to recognize. This chapter consists of six sections. Section 3.2 describes the definitions of the structure of the system matrices E , ( Es − A), ( Es − A) −1 . Section 3.3 derives the structural properties of a DAE model. Section 3.4 examines the genericity of the structural properties. Section 3.5 gives several examples and section 3.6 gives the conclusions of this chapter. 3.2. Structure of system matrices E, T(s), T(s)-1 In this section first we will define and derive the structural properties of system matrices struc( E ), struc (T ( s )), struc (T −1 ( s )) in relation with the system matrices E , T ( s ), T −1 ( s ) of a DAE model (1.3b). Suppose a given DAE (1.3) F ( z (t ), z (t ), u (t ), t ) = 0 with its system matrices : E= ∂F ∂F and A = respectively. The following matrices are defined: ∂ z ∂z 3.2.1. Structure of system matrix E Definition 3.1. Structural rank of a matrix E Consider a constant matrix with struc E = ⎡⎣ ( struc eij )ij ⎤⎦ , E ∈ R m×m , and: ⎧ o , if eij ≡ 0 struc eij = ⎨ 0 ⎩ x , otherwise (3.1) Let S E ⊂ R m×m be the set of all possible numerical representation of Ei of struc E , then the maximum of all values rank Ei is called the structural rank of E , i.e: rank struc E := max Ei ∈SE rank Ei (3.2) Corollary 3.2. rank E ≤ rank struc E Note: Corollary 3.2. is the consequence of definition 3.1. 40 (3.3) Chapter 3 : Structural properties of first order DAE model Consider the definition of rank (see J.G. Broida [18]). Suppose Eγγ ∈ Rγ ×γ is a minor with order γ generated from E ∈ R m×m with 1 ≤ γ ≤ m and Sγ be the set of all permutation σ of {1,2,..., γ } , then a γ × γ minor Eγγ satisfies det Eγγ = ∑ σ ∈Sγ γ sign(σ )∏ eiσ i ≠ 0 (3.4) i =1 then follows, Corollary 3.3 rank E = η ⇔ ∃ Eηη with det Eηη ≠ 0 ∧ ∀ Eηη** with η *>η , det Eηη** = 0 Now if struc E is known then let Γγγ is it’s minor with order γ and satisfies det Γγγ ≠ o , then follows, Corollary 3.4 η η rank struc E = η ⇔ ∃ Γη with det Γη ≠o ∧ η* * ∀ Γη η * with η *>η , det Γη * = o 3.2.2. Structure of system matrix T(s) Definition 3.5. Structure of polynomial matrix T(s) The structure of polynomial matrix T ( s ) ∈ R m×m [ s ] is defined as strucT ( s ) = ⎡⎣( struc tij ( s ))ij ⎤⎦ i = 1, 2,..., m, j = 1, 2,..., m, ⎧ where : struc tij ( s ) := ⎨ k ⎩s (3.5) 0 if tij ( s ) ≡ 0 if tij ( s ) = a0 + a1s + ... + ak s k 41 Chapter 3 : Structural properties of first order DAE model Definition 3.6. Structural determinant of polynomial matrix T(s) ( )ij ⎦⎥ ⎣⎢ permutation σ of numbers 1, 2,..., m , then the determinant of T ( s ) , det T ( s ) is Consider a square matrix T ( s ) = ⎡ tij ( s ) ⎤ ∈ R m×m [ s ] and suppose S is the set of all defined (e.g. J.G. Broida [18], P. Lancaster [72]) as: det T ( s ) := ∑ sign(σ )t1σ1 ( s )t2σ 2 ( s )...tmσ m ( s ) σ ∈S (2.10a) m = ∑ sign(σ )∏ tiσ i ( s ) σ ∈S i =1 where sign(σ ) equals –1 if σ odd, and 1 if σ even. Then the determinant of the structure of matrix T ( s ) is defined as: m det strucT ( s ) = ∑ sign(σ )∏ struc tiσ i ( s ) σ ∈S (3.6a) i =1 Suppose that struc T ( s ) is given, T ( s ) ∈ R m×m [ s ] , where the zero polynomials T ( s ) are known. Since the terms of determinant containing zero polynomials must be zero also, we may use the set: Γ = {σ : struc tiσ i ( s ) ≠ o,i =1,2,...,m} instead of S. Further since struc(− a) = struc(+ a ) then (3.6a) can be written as: m det strucT ( s ) = ∑∏ struc tiσ i ( s ) (3.6b) σ ∈Γ i =1 As we know from Chapter 2 that the information of the degree of determinant of system matrix of a DAE model, i.e.: deg det T ( s ) is used for the low index criterion (2.9), to calculate the index of a DAE model (2.13), and to calculate the dynamic degree of freedom of a DAE model to solve a consistent re-initialisation problem (Corollary 2.8). Since we want to analyse the properties of the system matrix by using the information of struc T ( s ) , instead of the matrix T ( s ) itself, the following relations for deg det struc T ( s) are derived by using the Definition 3.6 and Corollary A.3 (see appendix A). Corollary 3.7. m deg det struc T ( s ) = maxσ ∈Γ ∑ deg tiσ i ( s ) i =1 Proof: 42 (3.7) Chapter 3 : Structural properties of first order DAE model det struc T ( s ) = m ∑ ∏ struc tiσ σ ∈Γ i =1 = m ∑ ∏s i (s) deg(tiσ i ( s )) σ ∈Γ i =1 = ∑ ⎛ m deg(t ( s )) ⎞ ⎜∑ ⎟ iσ i ⎠ s⎝ i =1 σ ∈Γ = ⎛m ⎞ maxσ ∈Γ ⎜ ∑ deg(tiσ i ( s )) ⎟ i = 1 ⎝ ⎠ s m ⇒ deg det struc T ( s ) = maxσ ∈Γ ∑ deg tiσ i ( s ) i =1 and the following Lemma 3.8. gives the relation between deg det T ( s ) and deg det struc T ( s) . Lemma 3.8. Let T ( s ) ∈ R m×m [ s ] be non-singular, then 0 ≤ deg det T ( s ) ≤ deg det struc T ( s ) (3.8) Proof: Since T ( s ) ∈ R m×m [ s ] is non-singular then det T ( s) ≠ 0 ⇒ deg det T ( s ) ≥ 0 , further from (A.5) it follows that : deg det T ( s ) = deg ∑ σ ∈Γ m sign(σ )∏ tiσ i ( s ) i =1 m ⎛ ⎞ ≤ deg ∑ struc ⎜ sign(σ )∏ tiσ i ( s ) ⎟ ⎜ ⎟ σ ∈Γ i =1 ⎝ ⎠ m ⎛ ⎞ = deg ∑ ⎜ sign(σ ) struc∏ tiσ i ( s ) ⎟ ⎜ ⎟ σ ∈Γ ⎝ i =1 ⎠ (since struc (p (s ).q ( s ))=struc p (s ).struc q (s ) then m ⎞ ⎛ σ sign ( ) struc t ( s ) ⎟ ⎜ ∑⎜ ∏ iσ i ⎟ σ ∈Γ ⎝ i =1 ⎠ = deg det struc T ( s ) = deg 43 Chapter 3 : Structural properties of first order DAE model 3.2.3. Structure of system matrix T-1(s) Definition 3.9. Structural matrix inverse ( struc T ( s )) −1 Consider T ( s ) ∈ R m×m [ s ] , the structural matrix inverse of T ( s ) is defined as: ( ( struc T ( s )) −1 := ( struc tij−1 ( s ))ij ) ⎛ ⎛ det struc S ( s ) ⎞ ⎞ ji = ⎜⎜ ⎟ ⎟, ⎜ ⎝ det struc T ( s ) ⎠ ⎟ ij ⎠ ⎝ i = 1, 2,..., m j = 1, 2,..., m (3.9) where the relation for the sub-matrix struc ( Sij ( s )) as given on (2.12), is obtained by placing zeros in the i-th row and in j-th column of struc(T ( s )) and replacing the ij-th element with xo or 1 : ⎛ struc(t11 ( s )) " 0 " struc(t1m ( s )) ⎞ ⎜ ⎟ # # # ⎜ ⎟ ⎟ " xij0 " struc( Sij ( s )) = ⎜ 0 0 ⎜ ⎟ # # # ⎜ ⎟ ⎜ struc(t ( s )) " 0 " struc(t ( s )) ⎟ m1 mm ⎝ ⎠ 3.3. Structural properties of a first order non linear DAE model 3.3.1. Structural low index criterion The following are given: A DAE model (1.3b) : F ( z (t ), z (t ), u (t ), t ) = 0 and its structural matrices ⎛ ∂F ⎞ struc( E ) = struc ⎜ ⎟, ⎝ ∂ z ⎠ ⎛ ∂F ∂F ⎞ struc(T ( s )) = struc( Es − A) = struc ⎜ s− as ∂z ⎟⎠ ⎝ ∂ z defined in (3.1) and (3.3). Suppose the deg det struc(T ( s )) can be calculated as given in Corollary 3.7. Further the rank ( struc( E )) can be calculated following Definition 3.1. It follows from the low index criterion –1 (Lemma 2.3); 44 Chapter 3 : Structural properties of first order DAE model Corollary 3.10. Structural Low Index Criterion The DAE (1.3) has a structurally low index if: deg det struc(T ( s )) = rank struc( E ) (3.10) 3.3.2. Structural system matrix inverse In Chapter 2 we see that the inverse of the system matrix of a DAE, −1 T −1 ( s ) = [ Es − A] , can be used to calculate the index of a DAE (section 2.4) and to know the required differentiations on the DAE equations for index reduction (section 2.6). In this section we will show the relation between the structural information of matrix inverse of a DAE ( struc (T ( s ) ) −1 and the inverse of the system matrix itself T −1 ( s ) . The following is given: A DAE model (1.3) : F ( z (t ), z (t ), u (t ), t ) = 0 and its structural matrices ⎛ ∂F ⎞ struc( E ) = struc ⎜ ⎟, ⎝ ∂ z ⎠ ⎛ ∂F ∂F ⎞ struc(T ( s )) = struc( Es − A) = struc ⎜ s− as ∂z ⎟⎠ ⎝ ∂ z defined in (3.1) and (3.3). Suppose: the matrices struc( Sij ( s )) can be constructed base on the Definition 3.9, each deg det struc( Sij ( s )) and deg det struc(T ( s )) can be calculated using Definition 3.6 and Corollary 3.7. Then with Lemma 2.6 (see Chapter 2), it follows : Corollary 3.11. Structural index of a DAE index( struc T ( s)) = max ij {0, (deg det struc S ji ( s ) − deg det struc T ( s ) + 1)} (3.11) The following will show the bounds for a fractional polynomial entry of matrix T −1 ( s ) and the index of a DAE model (1.3b). Given the fractional polynomial and the structural matrix inverse of the system matrix of a DAE model (1.3b): 45 Chapter 3 : Structural properties of first order DAE model ( ) ⎡ ⎤ = ⎢ tij−1 ( s ) ⎥ ij ⎦ ⎣ ⎡⎛ det S ( s ) ⎞ ⎤ ji = ⎢⎜ ⎟ ⎥, ⎢⎝ det T ( s ) ⎠ij ⎥ ⎣ ⎦ i, j = 1,..., m −1 T −1 ( s ) = [ Es − A] ( struc T −1 ( s ) := ( struc tij−1 ( s ))ij (2.12) ) ⎛ ⎛ det struc S ( s ) ⎞ ⎞ ji = ⎜⎜ ⎟ ⎟, ⎜ ⎝ det struc T ( s) ⎠ ⎟ ij ⎠ ⎝ (3.9) i, j = 1, 2,..., m From (2.12) and (3.9) we see that: deg(t −1 ( s )) ≡ (deg det S ji ( s ) − deg det T ( s )) ij and deg( struc t −1 ( s )) ≡ (deg det struc S ji ( s) − deg det struc T ( s )) ij Following Lemma 3.8, we have: 0 ≤ deg det S ji ( s) ≤ deg det struc S ji ( s ) and 0 ≤ deg det T ( s ) ≤ deg det struc T ( s ) Then this result in the following inequalities: − deg det struc T ( s ) < deg(tij−1 ( s )) ≤ deg det struc S ji ( s ) and − deg det struc T ( s ) < deg( struc tij−1 ( s )) ≤ deg det struc S ji ( s ) It follows, Corollary 3.12 a) The upper bound of degree of a polynomial entry of system matrix inverse deg(t −1 ( s )) is deg det struc S ji ( s ) , ij 46 Chapter 3 : Structural properties of first order DAE model b) deg( struc tij−1 ( s )) gives the ‘best’ estimate of deg(tij−1 ( s )) . Special cases: for deg det struc S ji ( s ) ≥ deg det struc T ( s ) From Lemma 3.8, we have: 0 ≤ deg det S ji ( s ) ≤ deg det struc S ji ( s ) and 0 ≤ deg det T ( s ) ≤ deg det struc T ( s ) since deg det struc S ji ( s ) ≥ deg det struc T ( s ) , for: a) deg det struc S ji ( s ) = deg det S ji ( s ) and deg det struc T ( s ) = deg det T ( s ) , then deg det S ji ( s ) − deg det T ( s ) = deg det struc S ji ( s ) − deg det struc T ( s ) or deg(t −1 ( s )) = deg( struc t −1 ( s )) . ij ij b) deg det struc S ji ( s ) > deg det S ji ( s ) and deg det struc T ( s ) > deg det T ( s ) then deg det S ji ( s ) − deg det T ( s ) < deg det struc S ji ( s ) − deg det struc T ( s ) or deg(t −1 ( s )) < deg( struc t −1 ( s )) . ij ij c) deg det struc S ji ( s ) > deg det S ji ( s ) and deg det struc T ( s ) = deg det T ( s ) then deg det S ji ( s ) − deg det T ( s ) < deg det struc S ji ( s ) − deg det struc T ( s ) or deg(t −1 ( s )) < deg( struc t −1 ( s )) . ij ij d) deg det struc S ji ( s ) = deg det S ji ( s ) and deg det struc T ( s ) > deg det T ( s ) then deg det S ji ( s ) − deg det T ( s ) > deg det struc S ji ( s ) − deg det struc T ( s ) or deg(t −1 ( s )) > deg( struc t −1 ( s )) . ij ij It seems that in most cases the degree of structural polynomial entry deg( struc t −1 ( s )) gives the upper bound of deg(t −1 ( s )) , except in the case (d). ij ij It follows, Corollary 3.13 The degree of a structural polynomial entry of system matrix inverse deg( struc t −1 ( s )) gives in the most cases the upper bound of the degree of the ij 47 Chapter 3 : Structural properties of first order DAE model polynomial entry deg(t −1 ( s )) for deg det struc T ( s ) ≥ deg det T ( s ) and ij deg det struc S ji ( s ) ≥ deg det struc T ( s ) . The index of a DAE model is given in the Lemma 2.6 (Chapter 2) as: index(T ( s )) = max ij {0, (deg det S ji ( s ) − deg det T ( s ) + 1)} , then from Corollary 3.12 and Corollary 3.13 it follows : Corollary 3.14 The upper bound of the index of a DAE model (1.3b) is index(T ( s )) ≤ max ij {0, (deg det struc S ji ( s ) + 1)} From Chapter 2, section 2.6.1, we see that the required equations differentiation to reduce the index of a DAE model are given on the maximum column-wise power of s on the polynomial matrix T −1 ( s ) = ⎡ (t −1 ( s ))ij ⎤ . ⎢⎣ ⎥⎦ ij The relation (2.12) gives that ⎛ det S ji ( s ) ⎞ tij−1 ( s) = ⎜ ⎟ . Here follows that an equation differentiation is only required ⎝ det T ( s ) ⎠ when deg det S ji ( s ) > deg det T ( s ) . It follows from the Corollary 3.12 and Corollary 3.13, that: Corollary 3.15. The column-wise maximum degree of the structural polynomial entries of system m matrix inverse, max ⎛⎜ deg( struc t −1 ( s )) ⎞⎟ i =1 j ⎝ ij ⎠ is the ‘best’ estimate for required amount of differentiation of j-th equation for index reduction of a DAE model. 3.3.3. Structural system order In Chapter 2, Corollary 2.8 gives that for a given DAE (2.2) with system matrix T ( s ) , there are only r-variables of ( z (t0 )) that can be assigned arbitrarily to compute a set of consistent initial values of the DAE, ( z (t0 ), z (t0 )) , where r = deg det T ( s ) .This is called the ‘dynamic degree of freedom’ or the ‘system order’ of the DAE. For a non-linear first order DAE model (1.3), where the structural information of the system matrix is given, struc(T ( s )) , the structural dynamic degree of freedom or structural system order of the DAE can be calculated (see Corollary 3.7.), as: r = deg det struc(T ( s)) . 48 Chapter 3 : Structural properties of first order DAE model From Lemma 3.8. is given that : 0 ≤ deg det T ( s ) ≤ deg det struc T ( s ) . Here follows, Corollary 3.16. Structural dynamic degree of freedom The structural system order or structural dynamic degree of freedom of a DAE (1.3) ( r ) gives the upper bound of the system order or dynamic degree of freedom of a DAE (1.3) ( r ), i.e.: 0 ≤ r ≤ r . 3.4. Genericity of structural properties Previous sections 3.1, 3.2, 3.3. show that the structural properties of system matrices, i.e. rank ( struc( E )) , structural index, degree of structural polynomial of system matrix inverse, and structural system order form the upper bounds of the exact values of corresponding properties of the system matrices. Since we deal with the properties of non-linear DAE models, in most cases the result of the structural analysis is the same as with the exact values, i.e. only for a few numerical coincidences or for a few model structures then the analysis from structural properties gives the upper bound values. Therefore in this section we introduce the structural definiteness and genericity aspects of the structural properties of a DAE model. The term ‘definiteness’ of a structural property is to be defined that this structural property is equal to the corresponding exact numerical property. The term ‘genericity’ is introduced by Wonham [134], where a property will only fail for limited cases. 3.4.1. Structural definiteness of system matrices Definition 3.17. Matrix rank structural definiteness Suppose E ∈ R m×m and rank struc E = γ , where γ ∈ ` + (positive integer) then the rank of E is said to be structurally definite: ⇔ rank E = rank struc E =γ Definition 3.18. System order structural definiteness Consider a DAE with m × m system matrix T ( s) with its structural system matrix struc T ( s) . This DAE has the system order r = deg det T ( s) and structural system order r = deg det struc T ( s ) . If r = r , the system order has a structurally definite system order. It follows from Corollary 3.11., Definition 3.17., Definition 3.18., Corollary 3.19. Low index structural definiteness Consider a DAE with m × m system matrices T ( s ) and E has a structurally definite low index if: 49 Chapter 3 : Structural properties of first order DAE model a) rank E is structurally definite and b) system order of T ( s) is structurally definite and c) deg det struc T ( s) = rank struc E Definition 3.20. System index structural definiteness Consider a DAE with m × m system matrix T ( s) and structural system matrix struc T ( s) , then the index of the DAE is said to be structurally definite if: index(T ( s )) = index( struc T ( s)) Definition 3.21. Structural definiteness of the degree of a fractional polynomial entry of T −1 ( s ) Consider a DAE with m × m system matrix inverse T −1 ( s ) and structural system matrix inverse struc T −1 ( s ) , where : ( ) ⎡ ⎤ = ⎢ tij−1 ( s ) ⎥ ij ⎦ ⎣ ⎡⎛ det S ( s ) ⎞ ⎤ ji = ⎢⎜ ⎟ ⎥, ⎢⎝ det T ( s ) ⎠ij ⎥ ⎣ ⎦ i, j = 1,..., m −1 T −1 ( s ) = [ Es − A] and ( struc T −1 ( s ) := ( struc tij−1 ( s ))ij (2.12) ) ⎛ ⎛ det struc S ( s ) ⎞ ⎞ ji = ⎜⎜ ⎟ ⎟, ⎜ ⎝ det struc T ( s) ⎠ ⎟ ij ⎠ ⎝ i, j = 1, 2,..., m (3.9) Then the degree of a fractional polynomial entry of T −1 ( s ) , i.e. deg(t −1 ( s )) , to be ij structurally definite if: deg(t −1 ( s )) = deg( struc t −1 ( s )) ij 50 ij Chapter 3 : Structural properties of first order DAE model Corollary 3.22. Suppose t ij−1 ( s ) and ( struc t −1 ( s )) is an inverse fractional polynomial entry matrix ij of T −1 ( s ) and struc T −1 ( s ) of a DAE (1.3) respectively, then this inverse fractional polynomial entry is structurally definite if: (deg det S ji ( s ) = deg det struc S ji ( s )) ∧ (deg det T ( s ) = deg det struc T ( s )) Proof: deg(t −1 ( s )) ≡ (deg det S ji ( s ) − deg det T ( s )) . ij Since 0 ≤ deg det Sij ( s ) ≤ deg det struc Sij ( s ) and 0 ≤ deg det T ( s ) ≤ deg det struc T ( s ) and, then (deg det S ji ( s ) − deg det struc T ( s )) ≤ deg(t −1 ( s)) ≤ (deg det struc S ji ( s ) − deg det T ( s )) ij where the equality sign is only applicable when : (deg det S ji ( s ) = deg det struc S ji ( s )) ∧ (deg det T ( s ) = deg det struc T ( s )) 3.4.2. Genericity aspects Definition 3.23. Genericity (Wonham [134]) Suppose that p ∈ R n is a vector of parameters of the problem we are interested in, and that a given property Π holds for large sets of values p . Further a variety V ∈ R n is defined as n s V = p : φ i ( p) = 0, i = i ,2,..., k , where φ i ( p) are a finite number of polynomial functions. V is called proper if V ≠ R n and nontrivial if V ≠ ∅ . Then property Π is called generic if there exists a proper variety V such that Π fails only for points p ∈V . In this section we will show that the structural definiteness properties of system order, system index, rank of a constant matrix, and low index criterion are generic. 51 Chapter 3 : Structural properties of first order DAE model Lemma 3.24. Genericity of structural system properties a) Structural definiteness of system order is a generic property b) Structural definiteness of the difference of the degrees of fractional polynomial entry of T −1 ( s) , i.e. deg tij−1 ( s ) is a generic property c) Structural definiteness of rank of a constant matrix is a generic property d) Structural definiteness of low index criterion is a generic property Proof: ( ⎣⎢ ) a) Consider T ( s ) = ⎡ tij ( s ) ⎤ ∈ R m×m [ s ] and let ij ⎦⎥ n Γr = {σ ∈ Γ:deg sign(σ )∏ tiσ i ( s) = r } and α ij be the coefficient of the i =1 highest order term of tij ( x ) . Further let A = {α iσ i :σ ∈ Γr } , and let α be a vector of element of A , then we can define a polynomial function: φ (α ) = ∑ σ ∈Γ r m sign(σ )∏ α iσ i i =1 From the definition of Γr we can distinguish two cases: i) Γr = 1, i.e. element of the set Γr is one, then there exists only one permutation result to the highest structural degree. ii) Γr ≥ 2, i.e. elements of the set Γr are more than one, then there exists more than one permutation result to the highest structural degree. ad i) It means: m sign(σ ) ∏ αiσ i i =1 ≠0 σ ∈Γ r m ⇔ deg sign(σ )∏ tiσ i ( s ) =r i =1 σ ∈Γ r from which follows that the system order is structurally definite. ad ii) Notice that φ (α ) = 0 if and only if ∑ σ ∈Γ r m sign(σ )∏ α iσ i = 0 ⇔ deg i =1 ∑ m sign(σ )∏ tiσ i ( s ) < r σ ∈Γ r i =1 from which follows that the system order is not structurally definite. Thus if we define V = {α : φ (α ) = 0} , (which is proper and non-trivial) then the structural system order definiteness property fails only for points α ∈V . This means for a given 52 Chapter 3 : Structural properties of first order DAE model struc T ( s ) ∈ R m×m [ s ] the structural system order definiteness fails only for “unlucky” coefficient values of the highest order of tij ( s) of the matrix set of T ( s ) ∈ R m×m [ s ] having the same structure as struc T ( s ) ∈ R m×m [ s ] . Therefore this property is a generic property. b) to prove that a fractional polynomial entry of structural matrix inverse is a generic property, we consider Corollary 3.11.: ( ) deg tij−1 ( s) := deg det S ji ( s ) − deg det T ( s ) and the same as in Lemma 3.24a for the polynomial matrix S ji ( s ) = ⎡⎢( s ji ( s ) ) ⎤⎥ ∈ R m×m [ s ] , we define set ij ⎦ ⎣ m Γ s = {σ ∈ Γ : deg sign(σ )∏ siσ i ( s ) = deg det struc S ji ( s )} and β ij be the i =1 coefficient of the highest order term of s ji ( s ) . Further let B = {β iσ i :σ ∈ Γs } , we can define a polynomial function: m m ⎞⎛ ⎜ ⎟ sign ( σ ) α sign ( σ ) ∑ ∏ iσ i ⎟ ⎜ ∑ ∏ βiσ i ⎜ σ ∈Γ i =1 i =1 r ⎝ ⎠⎝ σ ∈Γ s ⎛ φ (α , β ) = ⎜ ⎞ ⎟ ⎟ ⎠ The difference of degree of the fractional polynomial entries of T −1 ( s) is not structurally definite only for some points (α , β ) such that φ (α , β ) = 0 . This ⎛ m ⎞ sign ( σ ) α ∑ ∏ iσ i ⎟⎟ = 0 or ⎜ σ ∈Γ i =1 r ⎝ ⎠ polynomial φ (α , β ) shows that either ⎜ ⎛ m ⎜ ∑ sign(σ )∏ βiσ i ⎜ σ ∈Γ i =1 s ⎝ ( ⎞ ⎟ = 0 will give a structurally indefiniteness of the fractional ⎟ ⎠ ) polynomial deg tij−1 ( s ) as given in Corollary 3.22. c) the following gives the proof of the generic property of the rank of constant matrix. It resembles much to the proof of Lemma 3.24a. Consider a constant matrix E ∈ R m×m and let Γ((ηη)) is a set of largest minors of struc E have structural rank η with Γ((ηη)) = {Γηη :σ ∈ Γη ,det Γηη ≠ 0} . Further let A = {eiσ : σ ∈ Γη } and let e be i a vector of the elements of A (see (3.4)) then we can define a function: φ (e) = ∑ σ ∈Γη η sign(σ )∏ eiσ i i =1 again we can distinguish between: 53 Chapter 3 : Structural properties of first order DAE model i) Γ((ηη)) = 1 , there exists only one permutation which results in the largest minor Γηη , with det Γηη ≠ o ii) Γ((ηη)) ≥ 2 , there exists more than one permutation which results in the largest minor Γηη , with det Γηη ≠ o ad i) The rank is structurally definite ad ii) Notice that φ (e) = 0 if and only if ∑ σ ∈Γη η sign(σ )∏ eiσ i = 0 i =1 If we define V = {e : φ (e) = 0} , (which is proper and non trivial) then the rank of a constant matrix is not structurally definite only for some points e ∈ V . Again this means for a given struc E ∈ R m×m the structural rank definiteness fails only for “unlucky” values of the entries of the matrix E ∈ R m×m having the same structure as struc E ∈ R m×m . Therefore this property is a generic property. d) to prove the genericity property of structural low index criterion, let’s define a function : m ⎛ ⎜ φ (α , e) = ∑ sign(σ )∏ α iσ i ⎜ σ ∈Γ i =1 r ⎝ m ⎞⎛ ⎟ ⎜ ∑ sign(σ )∏ eiσ i ⎟ ⎜ σ ∈Γ i =1 η ⎠⎝ ⎞ ⎟ ⎟ ⎠ from the proof of Lemma 3.24a and Lemma 3.24c, it is obvious that the low index criterion is not structurally definite only for some points (α , e) such that φ (α , e) = 0 . 3.5. Examples The following examples give results of all 3 methods (structural method, Pantelides’s algorithm and Unger’s algorithm). Example 3.1: Consider the following DAE: z1 + z2 = − z1 + z2 0 = z1 − z2 + z3 0 = − z1 − 2 z2 + u with matrices: 54 where u = f (t ) is a given input variable Chapter 3 : Structural properties of first order DAE model L E=M MM N 1 1 0 0 0 0 0 0 0 LM OP PP, struc E = MM Q N x 0 x 0 o o o o o o o OP L PP, A = MMM Q N −1 1 0 1 −1 1 −1 −2 0 LM OP PP, struc A = MM Q N x 0 x 0 o x 0 x 0 0 x 0 x 0 x o OP PP Q and : ⎡s ⎡s +1 s −1 0 ⎤ ⎢ T ( s ) = [ Es − A] = ⎢⎢ −1 1 −1⎥⎥ , struc T ( s ) = ⎢ xo ⎢ o ⎢⎣ 1 2 0 ⎥⎦ ⎣⎢ x s xo xo 0⎤ ⎥ xo ⎥ ⎥ 0 ⎦⎥ A symbolic analysis using Maple 8 gives results: A1) det( sE − A) = s + 3 It means (following Corollary 2.8): r (dynamic degree of freedom)=deg det T ( s ) = deg det( Es − A) =1 rank ( E ) = 1 . It follows from Lemma 2.3 that the DAE has a low index. B1) ⎡ 2 ⎢ s+3 ⎢ 1 ( Es − A)−1 = ⎢ − ⎢ s+3 ⎢ 3 ⎢− ⎣ s+3 0 0 −1 ⎤ s + 3⎥ ⎥ s +1 ⎥ s+3 ⎥ ⎥ 2s ⎥ s+3 ⎦ − s It means (following Lemma 2.6) that the index of the DAE is 1. C1) Column rank (E) =2 and the DAE dynamic degree of freedom = 1; thus this DAE does not satisfy a consistent re-initialisation problem (see Chapter 2, Corollary 2.12). This DAE will be satisfy a consistent re-initialisation problem by algebraic manipulation or algebraic transformation given as follows: z4 = − z1 + z2 0 = z1 + z2 − z4 0 = z1 − z2 + z3 0 = − z1 − 2 z2 + u 55 Chapter 3 : Structural properties of first order DAE model The structural analysis gives the following results: A2) det struc( sE − A) = s It means (following Corollary 3.7): r (structural dynamic degree of freedom)=deg det struc T ( s ) = deg det struc( Es − A) =1 rank struc E = 1 . It follows from Corollary 3.10 that the DAE has a structural low index. B2) ⎡⎛ det struc S ( s ) ⎞ ⎤ ji struc T −1 ( s ) = ⎢⎜ ⎟ ⎥ , for i, j = 1,...,3 , where: ⎢⎝ det struc T ( s ) ⎠ij ⎥ ⎣ ⎦ ⎡1 o s ⎤ ⎡ det struc S ji ( s ) ⎤ = ⎢1 o s ⎥ , det struc T ( s ) = s , with xo ≡ 1 , ⎣ ⎦ ⎢ ⎥ ⎢⎣1 s s ⎥⎦ then follows: struc ( Es − A) −1 LM1s 1 =M MM1s Ns OP PP . PQ 0 1 0 1 1 1 This means that the DAE has a structurally index one. This results renders with the symbolic analysis above. Unger’s algorithm gives: a structural index = 1 and the number of dynamic degree of freedom = 1 Pantelides’ algorithm gives: the third equation needs to be differentiated, which also results in unnecessary required differentiation of the input signal u . Example 3.2: Consider the following DAE: z1 = − z1 + z2 − 2 z3 + u z2 = − z1 − 2 z2 + z3 + u where u = f (t ) is a given input variable 0 = z1 + z2 56 Chapter 3 : Structural properties of first order DAE model with matrices: ⎡1 E = ⎢0 ⎢ ⎣⎢ 0 0 1 0 ⎡ x0 ⎢ 0 ⎥ , struc E = ⎢ o ⎥ ⎢ ⎥ 0⎦ ⎢⎣ o 0⎤ o x 0 o o⎤ ⎥ o⎥ , ⎥ o ⎥⎦ ⎡ −1 A = ⎢ −1 ⎢ ⎣⎢ 1 1 ⎡ x0 ⎢ 0 1 ⎥ , struc A = ⎢ x ⎥ ⎢ 0 ⎥ 0⎦ ⎢⎣ x −2 ⎤ −2 1 x x x 0 0 0 ⎤ ⎥ 0 x ⎥ ⎥ o⎥ ⎦ x 0 and ⎡s 2⎤ ⎡ s + 1 −1 ⎢ ⎢ ⎥ T ( s ) = [ Es − A] = ⎢ 1 s + 2 −1⎥ , struc T ( s ) = ⎢ xo ⎢ ⎢⎣ −1 −1 0 ⎥⎦ ⎢ xo ⎣ xo s xo xo ⎤ ⎥ o⎥ x ⎥ 0⎥ ⎦ A symbolic analysis using Maple 8 gives results: A1) det( sE − A) = s It means (following Corollary 2.8): r (dynamic degree of freedom)=deg det T ( s ) = deg det( Es − A) =1 rank ( E ) = 2 . It follows from Lemma 2.3 that the DAE does not have a low index. B1) ⎡ −1 ⎢ s ⎢ −1 ⎢ 1 ( Es − A) = ⎢ s ⎢ ⎢s +1 ⎢⎣ s −2 s 2 s s+2 s ⎤ ⎥ s ⎥ s+3 ⎥ ⎥ s ⎥ 2 s + 3s + 3 ⎥ ⎥⎦ s − 2s + 3 It means (following Lemma 2.6) that the index of the DAE is 2. Following the Conjuncture 2.14a (Chapter 2, section 2.6.1) the 3rd equation needs to be differentiated once to reduce the index of the DAE and by choosing z2 as an algebraic variable, i.e. z2 → z '2 , then the following index one DAE can be constructed: 57 Chapter 3 : Structural properties of first order DAE model z1 = − z1 + z2 − 2 z3 + u z '2 = − z1 − 2 z2 + z3 + u 0 = z1 + z2 0 = z1 + z '2 The structural analysis gives the following results: A2) det struc ( sE − A) = s It means (following Corollary 3.7): r (structural dynamic degree of freedom)=deg det struc T ( s ) = deg det struc( Es − A) =1 rank struc E = 2 . It follows from Corollary 3.10 that the DAE does not have a structural low index. B2) ⎡⎛ det struc S ( s ) ⎞ ⎤ ji struc T −1 ( s ) = ⎢⎜ ⎟ ⎥ , for i, j = 1,...,3 , where: ⎢⎝ det struc T ( s ) ⎠ij ⎥ ⎣ ⎦ ⎡1 1 s ⎤ ⎢ ⎥ ⎡ det struc S ji ( s ) ⎤ = ⎢1 1 s ⎥ , det struc T ( s ) = s , with xo ≡ 1 , ⎣ ⎦ ⎢ 2⎥ ⎣s s s ⎦ then follows: ⎡1 ⎢s ⎢ 1 struc ( Es − A)−1 = ⎢ ⎢s ⎢1 ⎢ ⎣ 1 s 1 s 1 ⎤ ⎥ ⎥ 1⎥ . ⎥ ⎥ s ⎥ ⎦ 1 This means that the DAE has a structurally index two. This result renders with the symbolic analysis above and the 3rd equation need to be differentiated once to perform index reduction. Unger’s algorithm gives: the structural index = 2 and the number of dynamic degree of freedom = 1. 58 Chapter 3 : Structural properties of first order DAE model Pantelides’ algorithm gives: to allow a consistent initialisation problem the third equation needs to be differentiated once. The structural approach has the advantages of a more efficient computational effort than a symbolic approach (Bujakiewics [21], Unger et.al [126]), and in some cases symbolic analysis is not feasible, e.g. the models use external program routines. Despite the advantages of this structural approach it still fails for some “unlucky values” or indefiniteness of the properties. This case is shown by the following example 3.3. Example 3.3: (This example shows the difference between Pantelides’ algorithm [98] and our algorithm) Consider a DAE: z1 + z2 = − z1 z1 + z2 = − z2 + z3 0 = − z1 − 2 z2 + u where u = f (t ) is a given input variable and ⎡1 E = ⎢1 ⎢ ⎢⎣ 0 1 1 0 ⎡ x0 ⎢ 0 0 ⎥ , struc E = ⎢ x ⎥ ⎢ 0⎥ ⎦ ⎢⎣ o 0⎤ x x 0 0 o o⎤ ⎥ o⎥ , ⎥ o ⎥⎦ ⎡ −1 A=⎢0 ⎢ ⎢⎣ −1 0 −1 −2 ⎡ x0 ⎢ 1 ⎥ , struc A = ⎢ o ⎥ ⎢ 0 0⎥ ⎦ ⎢⎣ x 0⎤ o x x 0 0 ⎤ ⎥ 0 x ⎥ ⎥ o⎥ ⎦ o and ⎡s 0⎤ ⎡s +1 s ⎢ T ( s ) = [ Es − A] = ⎢⎢ s s + 1 −1⎥⎥ , struc T ( s ) = ⎢ s ⎢ o ⎢⎣ 1 2 0 ⎥⎦ ⎣⎢ x s s xo 0⎤ ⎥ xo ⎥ ⎥ 0 ⎦⎥ A symbolic analysis using Maple 8 gives the following results: A1) det( sE − A) = s + 2 It means (following Corollary 2.8): r (dynamic degree of freedom)=deg det T ( s ) = deg det( Es − A) =1 rank ( E ) = 1 . It follows from Lemma 2.3 that the DAE has a low index. 59 Chapter 3 : Structural properties of first order DAE model B1) ⎡ 2 ⎢s + 2 ⎢ −1 ( Es − A)−1 = ⎢ ⎢s + 2 ⎢ s −1 ⎢ ⎣s+3 0 ⎤ ⎥ ⎥ s +1 ⎥ s+2 ⎥ ⎥ 2s + 1 ⎥ s+2 ⎦ −s s+2 0 −1 It means (following Lemma 2.6) that the index of the DAE is 1. C1) Column rank (E) =2 and the DAE dynamic degree of freedom = 1; thus this DAE does not satisfy a consistent re-initialisation problem (see Chapter 2, Corollary 2.12). This DAE will satisfy a consistent re-initialisation problem by algebraic manipulation or algebraic transformation given as follows: z4 = − z1 z4 = − z2 + z3 0 = − z1 − 2 z2 + u 0 = z1 + z2 − z4 The structural analysis gives the following results: A2) det struc ( sE − A) = s It means (following Corollary 3.7): r (structural dynamic degree of freedom)=deg det struc T ( s ) = deg det struc( Es − A) =1 so the system order is structurally definite, but rank E is not structurally definite since rank struc E = 2 while rank E = 1 . The structural algorithm shows that the DAE does not have a structurally low index. B2) ⎡⎛ det struc S ( s ) ⎞ ⎤ ji struc T −1 ( s ) = ⎢⎜ ⎟ ⎥ , for i, j = 1,...,3 , where: ⎢⎝ det struc T ( s ) ⎠ij ⎥ ⎣ ⎦ ⎡1 o s ⎤ ⎢ ⎥ ⎡ det struc S ji ( s ) ⎤ = ⎢1 o s ⎥ , det struc T ( s ) = s , with xo ≡ 1 , ⎣ ⎦ ⎢ 2⎥ ⎣s s s ⎦ then follows: 60 Chapter 3 : Structural properties of first order DAE model ⎡1 ⎢s ⎢1 struc ( Es − A)−1 = ⎢ s ⎢ ⎢⎣ 1 0 0 1 1⎤ ⎥ ⎥ 1 . ⎥ ⎥ s ⎥⎦ This means that the DAE has a structurally index two and the third equation needs to be differentiated to perform index reduction. Unger’s algorithm gives results as structurally index two problem with one dynamic degree of freedom. Pantelides’ algorithm gives results to allow a consistent initialisation problem the third equation needs to be differentiated once. 3.6. Conclusions The objectives of this Chapter are to analyse the properties of a DAE model , F ( z , z , u , t ) = 0 , based on the structural information of the matrices struc( E ), struc( Es − A), struc( Es − A) −1 instead of the exact numerical values of these system matrices. This structural analysis results in a meaningful result based only on a ⎛ ∂F ⎞ ⎟, ⎝ ∂ z ⎠ priori pattern of the matrices E and A , i.e. struc( E ) = struc ⎜ ⎛ ∂F ⎞ struc( A) = struc ⎜ ⎟ , where it may be that the exact numerical values take more ⎝ ∂z ⎠ computational effort or as not even feasible. A high index problem of a DAE model can be detected from the structural information of the system matrices, struc( E ), struc( Es − A) . The DAE model has a low index if rank ( struc( E )) = deg det struc( Es − A) . The analysis of the dynamic degrees of freedom to allow a consistent (re-) initialisation of a DAE model based on the structural information, i.e. r = deg det struc( Es − A) , gives the upper bound of the exact values. The analysis of the index of a DAE model base on the structural information of the matrix struc( Es − A) −1 gives mostly the upper bound of the exact values. The required differentiations for an index reduction of a DAE model can also be derived from the information of the matrix struc( Es − A) −1 . 61 Chapter 3 : Structural properties of first order DAE model Analysis of the properties of a DAE model based on the structural information of the system matrix ( Es − A) and matrix E provides generic properties for the low index criterion, dynamic degree of freedom (system order), and the required equation differentiation for high index reduction. Despite of advantage on the applicability of the structural method, there is still a problem of analytical cancellation (the “unlucky values”), which cannot be detected. A possible combination of symbolic and structural analysis may form a solution in the future. 62 Chapter 4: Application of Low Index Detection and High Index Reduction of Non-linear DAE Process models The DAE model structure of a given system can be changed from a low index to a high index structure due to a change of its behavioural description, new assumption or interconnection. The high index structure arises due to constraint equations of its state variables. This states constraint can be caused by behavioural constraint, e.g. equilibrium and / or by topological constraint, e.g. interconnection. Strict system equivalence operation for a high index reduction shows that the internal representations of a physical system are nonunique for the same inputs outputs behaviour. “Any (complex) system is ‘controllable’ if its structure is recognized” 4.1. Introduction Mathematical modelling of a physical system is always subjected to assumptions. These assumptions are made to reduce complexity of a process modelling. The model assumptions can be distinguished in two types: behavioural assumptions and topological assumptions. The behavioural assumptions include “the unmodelled phenomena” and “the unmodelled quantities” within the system, when: - the contribution of some phenomena or quantities are negligible, e.g: contribution of potential and kinetic energy on the energy balance equations are neglected. - the dynamic change of some phenomena or quantities are negligible, e.g: (pseudo) steady state assumptions of some phenomena, ignoring dynamics of some quantities due to “fast” dynamic change of these quantities in comparison with other quantities, phase and/or reaction equilibrium - the information of some phenomena or quantities are not available, e.g: non availability of: the reaction rate relation, mass transfer rate coefficient. The topological assumptions include “the unmodelled structure/parts”, “the unmodelled geometry” of the system and the topological system decomposition itself, example: - ideally mixed fluid system - pipe connections between unit operations in a system are not modelled - three dimensional system is modelled as one dimensional system The behavioural assumptions can be closely related to the topological assumptions, see example in section 4.3. This example shows that a contradiction on system assumptions can result in a high index model. Our approach of physical modelling is based on the physical balance equations and its constitutive equations. The set up of balance equations assumes that “the accumulating/storage” quantities are independent state variables of the system. The independency of the state variables on the balance equations, we call the “primitive assumption” of the model. De Groot and Mazur [52, page 85] recommended 63 Chapter 4 : Application of a High Index Detection and Reduction describing the state variables of the system with the extensive variables (mass, energy, impulse, etc) rather than the intensive variables (concentration, temperature, pressure): “Extensive variables have been chosen to describe the states of the system because of the difficulties encountered if one tries to introduce from the start intensive thermodynamic state variables for non-equilibrium states”. The intensive variables of the system can be derived from extensive variable relations (as additional constitutive equations in the system description). The examples for the problem indicated by De Groot and Mazur [52] as a consistent re-initialisation problem will be given in the section 4.4. Sometimes the primitive assumption on the independency of the extensive state variables of the system is “disturbed” by behavioural and/or topological assumptions, which can lead to “states constraint / states dependency”. Mathematically we call this phenomenon a high index problem. The result of this “constraint” is that the original independency of given r number state variables is reduced to less than r number new state variables of the system. Mathematically we call the number independent state variables as the dynamic degree of freedom of the model. Section 4.5 shows that the interconnection between two subsystems can cause a high index problem. This chapter describes several examples of high index problems on the process modelling. We will use the mathematical theory derived on Chapter 2 and Chapter 3 for detection of a low index DAE model, the calculation of the structural index of a DAE model. We will also use index reduction techniques (see Chapter 2 section 2.6.1 and section 2.6.2.) to transform a high index to an index one model. Further the consistent re-initialisation criterion (see Chapter 2 section 2.5.2) is to be used to check if a DAE model has minimum state variables. Most of the models in this chapter are adopted from existing literature, some of them are made for example purposes only. A lot of constitute equations are presented only as “a function of variables”, example: a mass flow Fout through a valve is a function of its inlet pressure Pin and its outlet pressure Pout , presented as: Fin = f ( Pin , Pout ) , instead of: Fin = Cv Pin − Pout , where Cv is the valve parameter. This is done for two reasons, first our structural approach neither requires the exact analytical functions nor the numerical values, second, to reduce the complex presentation of a system description, where we need only its structural information. This chapter is divided into five sections. In section 4.2, examples for column wise/variable differentiation for high index reduction are presented through examples of a chemical and a phase equilibrium model. In section 4.3, examples for row wise/equation differentiation for high index reduction are given. Section 4.4 presents examples for a non-consistent re-initialisation problem and its solution. Section 4.5 shows an example for a high index problem due to interconnection. 64 Chapter 4 : Application of a High Index Detection and Reduction 4.2. High Index reduction through variables differentiation The high index reduction technique as described in section 2.6.2, i.e. Conjuncture 2.14b is mentioned for a high index reduction of a DAE model, where some of the internal variables are “not interested as outputs of the model” and can be removed from the model equations. The strict system equivalence operation is done by variable differentiations. It must be noted that the steady state equations as a result of the strict system equivalence operation through variables differentiation do not contribute the input-output behaviour. Therefore these equations may be removed from the final model equations. The value of the removed variables from the balance equations may not be derived from the steady state relations as the result of a strict system equivalence operation, the real value of this variable can only be derived from index reduction through equations differentiation, see example in section 4.4. The following examples of the steam-reforming reactor and the distillation tray model show the technique presented in Section 2.6.2., Conjuncture 2.14b. 4.2.1. Reaction equilibrium model (steam reforming reactor model) In a catalytic methane-steam reforming reactor synthese gas (mixture mainly of CO and H2) is produced, as the feedstock of a lot of chemical processes, e.g.: ammonia synthesis and hydro-cracking process or as feedstock for a fuel cell. Schematically such a catalytic methane-steam reforming reactor is shown in figure 5.1. The major feed of the reactor is methane and steam and the product is a mixture of CH4 , CO, CO2 , H2 , H2O . The main reactions are: a. methane-steam reaction (see reaction scheme 4.1a) b. water-gas shift reaction (see reaction scheme 4.1b) The system boundary in figure 4.1 given with dash line and model variables are: Fin, Fout = inlet and outlet mass flow Pin,Pout = inlet and outlet pressure hin, hout = inlet and outlet specific enthalpy xi,in,xi,out = inlet and outlet gas mass fraction with i=CH4,CO,CO2,H2,H2O Qadd,Qloss = additional and loss of heat P, T= gas pressure and temperature within the reactor Fout, Pout, hout, i = CH4,CO,CO2,H2,H2O Qadd Qloss Fin, Pin, hin, xi,in Figure 4.1. A catalytic methane-steam reforming reactor 65 Chapter 4 : Application of a High Index Detection and Reduction r CH4 CH4 + H2O ⎯ ⎯ → 3H2 + CO (4.1a, 4.1b) r shift CO + H2O ⎯ ⎯ → CO2 + H2 rCH4 = kCH4 F P. x GH CH4 ,out − I (T ) JK xCO ,out . xH2 ,out . P 3 xH2O . KCH 4 (4.1c, 4.1d) rshift = f1 ( xCO , xCO2 , xH2 , xH2O , T , P) The reaction rates of both reactions are given on the equations (4.1c) and (4.1d). The kinetic reaction rate (4.1c) is adopted from Take et.al [119] for methane-steam reforming reaction with a Ni-Al2O3 catalyst. In most cases the water-gas shift reaction rate relation is not available and is assumed to be taking place on equilibrium condition. Herewith this reaction is assumed as “fast” dynamic reaching its equilibrium condition. This replaces the reaction rates given in the reaction schemes (4.1a) and (4.1b) with the following reaction schemes ((4.1a) and (4.2a)): r CH4 CH4 + H2O ⎯ ⎯ → 3H2 + CO (4.1a, 4.2a) K shift CO + H2O ←⎯⎯ → CO2 + H2 where the equilibrium relation of water-gas shift is: Kshift (T ) = xCO2 ,out . xH2 ,out (4.2b) xCO ,out . xH2O ,out The model equations are given with the system’s assumptions: - one “well-mixed” gas phase in the reactor, neglecting contribution of kinetic and potential energy, When the component on the model are given with: i = CH4 , CO, CO2 , H2 , H2 O; j = CH4 , shift and stoichiometric reactions coefficient matrix ϑ ij L −1 =M N0 OP Q 1 0 3 −1 −1 1 1 −1 T (4.3) The component mass balance, energy balance and its constitutive system equations are given as follows: 66 Chapter 4 : Application of a High Index Detection and Reduction 2 dMi = Fin xi ,in − Fout xi ,out + Veff ∑ ϑ ij rj dt j =1 (4.4 - 4.8) dEh = Fin hin − Fout hout + Qadd − Qloss dt (4.9) 5 M T = ∑ Mi , Mi = xi ,out M T (4.10-4.15) i =1 M T = ρ.Veff , E = M T . hout − P.Veff ρ = f1 (T , P, xi ,out ), hout = f 2 (T , P, xi ,out ) (4.16,4.17) Fin = f3 ( Pin − P), Fout = f 4 ( P − Pout ) ⎛ xCO ,out .xH 2 ,out .P 3 ⎞ r1 := rCH 4 = kCH 4 ⎜ P.xCH 4 ,out − ⎟ ⎜ xH 2O .K CH 4 (T ) ⎟⎠ ⎝ xCO2 ,out . xH2 ,out Kshift (T ) = xCO ,out . x H2O ,out (4.20,4.21) (4.18,4.19) (4.1c) (4.2b) In this equations set r2 := rshift is replaced by (4.2b), hence a high index problem occurs. where: Mi , M T = components mass and total mass hold up Eh = thermodynamic energy hold up ρ = gas mixture density xi = mass fraction of component i kCH4 , KCH4 (T ) = kinetic rate constant / parameter and the temperature dependent equilibrium constant for methane-steam reaction Kshift (T ) = the temperature dependent equilibrium constant for water-gas shift reaction Veff = effective void volume of the reactor (as a model parameter) This model is given with 20 differential algebraic equations ((4.4 – 4.21), (4.1c) (4.2b)) with 20 unknowns, namely: M T , Eh , P, T , ρ , hout , Fin , Fout , rCH 4 , rshift , M i , xi, out , and the chosen input variables are: u = ( xi ,in , hin , Pin , Pout , Qadd , Qloss ) T , where i = CH4 , CO, CO2 , H2 , H2O . Consider the DAE model equations above as F ( z, z , u) = 0 with model variables: z = ( M i , Eh , xi,out , hout , rCH 4 , rshift , M T , T , ρ , P, Fin , Fout )T , then we can construct the structural system matrix struc ( Es − A) , where matrices E = struc ∂F ∂F and A = struc . ∂ z ∂z 67 Chapter 4 : Application of a High Index Detection and Reduction The result of structural analysis gives: a) rank struc E = 6 b) deg det struc( sE − A) = 5 , means that the number of dynamic degree of freedom of this model is 5 c) the maximum power of s on the structural matrix ( Es − A) −1 = 1 . This means that the DAE model has structural index = 2. The maximum power of s on the structural matrix ( Es − A) −1 = 1 are on the 14th row of ( Es − A) −1 with column numbers: 7,8,9,10,11,12,13,14,15,16,20. This means that if a high index reduction can be done by: i) the equations differentiation, where we need to differentiate once the equations: (4.10), (4.11), (4.12), (4.13), (4.14), (4.15), (4.16), (4.17), (4.18), (4.19), (4.2b) and then chose the state or non-state variables (as described in Chapter 2, section 2.6.1.), or ii) the variable differentiation, where we need to do restricted system equivalence operation on the DAE model such that the 14th variable (rshift ) is vanished from the differential equations and perform strict system equivalence operation. This operation can be chosen when we are not interested in the variable rshift as the output of system. If we choose the second possibility (ii) then we can apply a restricted system equivalence operation as described in Chapter 2 – section 2.6.2. The entry of premultiplying matrix M is as follows, Given the stoichiometric coefficients of the rshift on the balance equations, as uninterested variable of the system output is a = [ 0 −1 1 1 −1] ; then Ker (a) is: ⎧⎛ 1 ⎞ ⎛ 0 ⎞ ⎛ 0 ⎞ ⎛ 0 ⎞ ⎫ ⎪⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎪ ⎪⎪⎜ 0 ⎟ ⎜ 1 ⎟ ⎜ 0 ⎟ ⎜ 0 ⎟ ⎪⎪ Ker [ 0 −1 1 1 −1] = ⎨⎜ 0 ⎟ , ⎜ 0 ⎟ , ⎜ 1 ⎟ , ⎜ 0 ⎟ ⎬ ⎪⎜ 0 ⎟ ⎜ 0 ⎟ ⎜ 0 ⎟ ⎜ 1 ⎟ ⎪ ⎪⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎪ ⎪⎩⎜⎝ 0 ⎟⎠ ⎜⎝ −1⎟⎠ ⎜⎝ 1 ⎟⎠ ⎜⎝ 1 ⎟⎠ ⎪⎭ and the matrix M is: 68 Chapter 4 : Application of a High Index Detection and Reduction LM1 MM00 MM0 M= MM0 MM0 MM0# N OP PP P 0P 0P P 0P #P P 1PQ 1 0 0 0 " 0 0 0 −1 0 " 0 1 0 1 0 " 0 0 0 1 1 0 " 0 0 0 0 0 0 1 0 0 " 1 " 0 0 0 % " 0 (Ker [0 –1 1 1 –1])T 20× 20 Perform pre-multiplication of the model equations ((4.4 – 4.21), (4.1c) (4.2b)) with this matrix M (restricted system equivalence operation), gives the following set of equations: dM CH4 = Fin xCH4 ,in − Fout xCH4 ,out − Veff . rCH4 dt dM A = Fin ( xCO ,in − x H2 O ,in ) − Fout ( xCO ,out − x H2 O ,out ) + Veff .2rCH4 dt dM B = Fin ( xCO2 ,in + x H2 O ,in ) − Fout ( xCO2 ,out + x H2 O ,out ) − Veff . rCH4 dt dM C = Fin ( x H2 ,in + x H2 O ,in ) − Fout ( x H2 ,out + x H2 O ,out ) + Veff .2rCH4 dt dM H2 O = Fin x H2 O ,in − Fout x H2 O ,out − Veff . rCH4 − Veff . rshift dt dE = Fin hin − Fout hout + Qadd − Qloss dt (4.22 – 4.26a, 4.27) M A = M CO − M H2O ; M B = M CO2 + M H2 O ; M C = M H2 + M H 2 O (4.28 – 4.30) and equations ((4.10 – 4.21), (4.1c) (4.2b)). Since the variable rshift is not interesting as an output of the system, we can perform a strict system equivalence operation to remove dM H2O dt from equation (4.26a) (see Chapter 2 - Conjuncture 2.14b). Replace this equation (4.26a) with the new one (4.26b) for the new equivalent index one with 23 differential algebraic equations for the methane-steam reforming reactor, given as follows: 69 Chapter 4 : Application of a High Index Detection and Reduction dM CH4 = Fin xCH4 ,in − Fout xCH4 ,out − Veff . rCH4 dt dM A = Fin ( xCO ,in − x H2 O ,in ) − Fout ( xCO ,out − x H2 O ,out ) + Veff .2rCH4 dt dM B = Fin ( xCO2 ,in + x H2 O ,in ) − Fout ( xCO2 ,out + x H2 O ,out ) − Veff . rCH4 dt dM C = Fin ( x H2 ,in + x H2 O ,in ) − Fout ( x H2 ,out + x H2O ,out ) + Veff .2rCH4 dt 0 = Fin x H2 O ,in − Fout x H2 O ,out − Veff . rCH4 − Veff . rshift dE = Fin hin − Fout hout + Qadd − Qloss dt (4.22 – 4.26b,4.27) M A = M CO − M H2O ; M B = M CO2 + M H2 O ; M C = M H2 + M H 2 O (4.28 – 4.30) and equations (4.10 – 4.21), (4.1c), (4.2b). for 23 unknowns variables: M T , M A , M B , M C , E , P, T , ρ , hout , Fin , Fout , rCH4 , rshift , Mi , xi ,out , i = CH4 , CO, CO2 , H2 , H2O Moreover the equation (4.26b) can be removed from the model equations without any effect for model inputs-outputs behaviour, such that we also remove the variable rshift from the model description. The final model equations are given by 22 index one differential algebraic equations (4.22 – 4.25,4.27), (4.28 – 4.30), (4.10 – 4.21), (4.1c), (4.2b) for 22 unknowns variables: M T , M A , M B , M C , E , P, T , ρ , hout , Fin , Fout , rCH4 , Mi , xi ,out , i = CH4 , CO, CO2 , H2 , H2O having 5 dynamic degrees of freedom. The index one model equations also satisfy the consistent re-initialisation criterion (see Chapter 2 – Corollary 2.12). The number of differential variables are equals to the dynamic degrees of freedom. We may specify these 5 number dynamic degree of freedom variables, e.g: M CH4 (0), M A (0), M B (0), M C (0), E (0) to calculate the remaining variables: M T (0), P(0), T (0), ρ (0), hout (0), Fin (0), Fout (0), rCH4 (0), Mi (0), xi ,out (0), dM CH4 (0) dM A (0) dM B (0) dM C (0) dE (0) , , , , dt dt dt dt dt as consistent (re-)initialisation conditions of the model equations. 70 Chapter 4 : Application of a High Index Detection and Reduction 4.2.2. Non reacting phase equilibrium distillation tray model There have been a lot of works done on the dynamic modelling of phase equilibrium tray distillation column, e.g. Luyben [82], Gallun and Holland [42], Gani [43], Aspen Tech [5,118], Brooks [19]. Some of these models made by oversimplification of the physical behaviour within the system, e.g: equal vapour flow rate through all the trays, and/or steady state assumption of the energy balance equation. Ranzi et.al. [106] shows that model prediction using the steady state heat balance equation gives less accurate solution than using the dynamic heat balance equation. Pantelides [97] and Ponton [103] give a systematic approach for a phase equilibrium tray modelling to avoid a high index problem. Krishna, Taylor and Kooijman [64, 66,120] describe the modelling of non-equilibrium phase for a tray distillation column. In this section we will show the index reduction technique for a phase equilibrium distillation tray model in conjunction with a strict system equivalence operation as given in Chapter 2 section 2.6.2. In the following figure 4.2 (a) gives a schematic of a tray distillation column and figure 4.2 (b) presents a tray of this unit operation. entrainmen liquid vapour weepin (b) (a) Figure 4.2. A tray distillation column Moreover figure 4.3 (a) gives a schematic representation of a distillation tray model, with the following assumptions: - well mixed liquid phase and vapour phase - neglecting tray weeping and entraintment - only one vapour phase within system boundary - no heat loss through system boundary - neglecting contribution of kinetic and potential energy 71 Chapter 4 : Application of a High Index Detection and Reduction and figure 4.3 (b) gives a schematic mass transfer and energy transfer through phase interface. Vout,yi,out,hvout,P Lin,xi,in,hl,in Ni, Aef ZL Ni, EL,e Ev,e vapour phase liquid phase Vin,yi,in,hv,in,Pv,i Lout,xi,out,hl, (a) interface (b) Figure 4.3 where: Vin, Vout = vapour inlet and outlet mass flow rate yi,in, yi,out = inlet and outlet mass fraction of component i in vapour phase hv,in, hv,out = vapour inlet and outlet specific enthalpy Pv,in, Pv,out = vapour inlet and outlet pressure Lin, Lout = liquid inlet and outlet mass flow rate xi,in, xi,out = inlet and outlet mass fraction of componet i in liquid phase hl,in, hl,out = liquid inlet and outlet specific enthalpy Ni,L,Ni,V = mass transfer of component i from the liquid (vapour) phase to the vapour (liquid) phase EL,exc, EV,exc = interfacial energy transfer Non equilibrium model Krishna and Taylor [120] give the relations for interfacial mass and energy transfer: Ni , L = ki ,l ai ,l ( xi ,itf − xi ,out ) + N L xi ,out Ni ,V = ki ,v ai ,v ( yi ,out − yi ,itf ) + NV yi ,out i = 1,2,..., n (components) E L ,exc = α l al (Titf − Tl ,out ) + N Lhl ,out EV ,exc = α v av (Tv ,out − Titf ) + NV hv ,out (4.31 – 4.35) where the first part of the right hand side of the equations (4.31 – 4.35) are the transfer due to diffusion and the second one is due to convection. Further: 72 Chapter 4 : Application of a High Index Detection and Reduction n n N L = ∑ Ni , L ; i =1 Ni , L = Ni ,V NV = ∑ N i ,V (4.36, 4.37) i =1 ; i = 1,2,..., n (4.38, 4.39) E L ,exc = EV ,exc 0 = Ki ,itf ( xi ,itf , yi ,itf , Titf , P) i = 1,2,..., n ; (4.40) where: ki ,l ai ,l , ki ,v ai ,v ,α l al , α v av = mass and energy transfer coefficients N L , NV = total liquid / vapour mass transfer through the phase interface Ki ,itf = interface equilibrium relation xi ,itf , yi ,itf = liquid / vapour mass fraction of component i on phase interface Titf = temperature on phase interface. The interface transport behaviour is described with 4 N + 5 non-linear independent algebraic equations with 4 N + 5 unknowns, namely: Ni , L , N i ,V , E L ,exc , EV ,exc , N L , NV , xi ,itf , yi ,itf , Titf and the input variables of these algebraic equations are xi ,out , yi ,out , hl ,out , hv ,out , Tl ,out , Tv ,out , P . Equilibrium Model In some cases the interfacial transport parameters are not available or the interface transport phenomenon are modelled with N + 1 phase equilibrium equations given as follows: 0 = Ki ,eq ( xi ,out , yi ,out , Tv ,out , P ) ; i = 1,2,..., n(components) 0 = Tv ,out − Tl ,out (4.41, 4.42) The component mass balance and energy balance of a tray are given as: dMi , L = Lin xi ,in − Lout xi ,out + Ni , L dt dMi ,V = Vin yi ,in − Vout yi ,out + N i ,V dt i = 1,2,... n(components) (4.43 - 4.46) dE L = Linhl ,in − Lout hl ,out + E L ,exc dt dEV = VinhV ,in − Vout hV ,out + EV ,exc dt Since N i , L + N i ,V = 0 and E L ,exc + EV ,exc = 0 , then we can write (4.43 – 4.46) as: 73 Chapter 4 : Application of a High Index Detection and Reduction dMi , L = Lin xi ,in − Lout xi ,out + Ni , L dt dMi ,V = Vin yi ,in − Vout yi ,out − N i , L dt i = 1,2,... n(components) (4.47 – 4.50) dE L = Linhl ,in − Lout hl ,out + E L ,exc dt dEV = VinhV ,in − Vout hV ,out − E L ,exc dt and the constitutive equations are given as follows: n M L = ∑ Mi , L n MV = ∑ Mi ,V ; i =1 Mi , L = xi ,out M L (4.51, 4.52) i =1 ; Mi ,V = yi ,out MV ; i = 1,2,..., n (components) E L = M L hl ,out − PVL ; EV = MV hv ,out − PVV M L = ρ LVL ; VL = Aeff . Z L MV = ρVVV Vtray = VL + VV Pv ,out = P ; Pl ,out = P Lout = f1 ( Z L ) Vin = f 2 ( P, Pv ,in , Z L ) ρ L = f 3 (Tl ,out , Pl ,out , xi ,out ) ; ρV = f 4 (Tv ,out , Pv ,out , yi ,out ) hl ,out = f 5 (Tl ,out , Pl ,out , xi ,out ) ; hv ,out = f 6 (Tv ,out , Pv ,out , yi ,out ) (4.53, 4.54) (4.55, 4.56) (4.57, 4.58) (4.59) (4.60) (4.61, 4.62) (4.63) (4.64) (4.65, 4.66) (4.67, 4.68) the equations (4.63) and (4.64) give the mass transport relations through the system boundary. The phase equilibrium equations of the tray model are given by 5 N + 19 differential algebraic equations (4.47 – 4.68), with 5 N + 19 unknown variables: Mi , L , Mi ,V , E L , EV , xi ,out , yi ,out , N i , L , E L ,exc , M L , MV ,VL ,VV , P, Z L , Pv ,out , Pl ,out , Tl ,out , Tv ,out , hl ,out , hv ,out , ρ L , ρV where: Mi , L , Mi ,V = liquid / vapour phase mass hold up of component i M L , MV = total liquid / vapour phase mass hold up E L , EV = liquid / vapour phase energy hold up VL ,VV = liquid / vapour phase volume ρ L , ρV = liquid / vapour phase density 74 Chapter 4 : Application of a High Index Detection and Reduction P, Pl ,out = equilibrium pressure and liquid outlet pressure with the model parameters are: Vtray = total tray volume within the system boundary Aeff = tray area and the input variables are: Lin ,Vout , xi ,in , yi ,in , hl ,in , hv ,in , Pv ,in . The model parameters are the tray volume and tray area, Vtray , Aeff . Structural analysis of this tray model gives that this model forms an index two DAE model, with the number of the dynamic degree of freedom being N + 1 . The index reduction can be done through vanishing the variables N i , L from the component balance equations (4.47) and vanishing the variable E L ,exc from the energy balance equation (4.49). Again this operation can be done if these two variables are not interested as the outputs of the model. The operation performs through premultiplication of the system equations with the following matrix: LM1 MM0# MM0 MM0 M = M0 MM # MM0 MM0# MN0 " 0 −1 0 " 0 0 " 0 −1 0 % % % " 0 1 0 " 0 −1 0 0 1 0 " " " 0 1 0 " 0 1 % % % 0 1 " " 0 0 " " " 0 1 0 OP PP P 0P 0P P #P PP 0P 0P P 0P P IQ 0 # " −1 1 0 N N ( 5 N +19 ) × ( 5 N +19 ) Pre-multiplication of the system equations with the first N-rows of matrix M results in linear combinations of liquid phase and vapour phase mass balance, where the variables N i , L are removed. This is also done for the energy balance equation, see matrix M on the (2N+1)th row. Other equations are intact. After strict system equivalence operation to remove the remaining d (.) terms from dt the component balance equations (4.48) and the energy balance equation (4.50) through variable differentiation, results in the following equivalent set of index one differential algebraic equations: 75 Chapter 4 : Application of a High Index Detection and Reduction dMi , M = Lin xi ,in + Vin yi ,in − Lout xi ,out − Vout yi ,out dt 0 = Vin yi ,in − Vout yi ,out − Ni , L i = 1,2,... n(components) (4.69 – 4.72) dE M = Linhl ,in + Vinhv ,in − Lout hl ,out − Vout hv ,out dt 0 = VinhV ,in − Vout hV ,out − E L ,exc Mi , M = Mi , L + Mi ,V i = 1,2,..., n(components) ; E M = E L + EV (4.73,4.74) and equations (4.41,4.42,4.51 – 4.68). Analogue with the example in Section 4.2.1; the variables N i , L , E L ,exc are not interesting as outputs of the model so the equations (4.70) and (4.72) can be removed without any change in its inputs-outputs behaviour. This gives index one differential algebraic model equations, which satisfy the consistent (re-) initialisation criterion, since the number of differential variables is equal to the dynamic degrees of freedom, N + 1 . This gives the same result as proposed by Ponton [103]. The high index reduction for a high index problem on modelling of multiphase reactive equilibrium system can be done with the same procedure as presented above. Different to the approach presented above, Aspen Tech [5,118] gives a model relations / library for a distillation tray with further simplifications, namely: - neglecting of the change of vapour hold up, therefore the tray pressure dynamic is neglected neglecting the contribution of pressure and volume variation on the (thermodynamic) energy balance This gives the following index one set of 3 N + 14 differential algebraic equations: dMi , L = Lin xi ,in + Vin yi ,in − Lout xi ,out − Vout yi ,out dt i = 1,2,... n(components) dE L = Linhl ,in + Vinhv ,in − Lout hl ,out − Vout hv ,out dt n M L = ∑ Mi , L i =1 Mi , L = xi ,out M L , E L = M L hl ,out 76 (4.75, 4.76) n ; 1 = ∑ yi ,out (4.77, 4.78) i = 1,2,..., n (components) (4.79) i =1 (4.80) Chapter 4 : Application of a High Index Detection and Reduction M L = ρ LVL ; VL = Aeff . Z L Pv ,out = P ; Pl ,out = P (4.81) Lout = f1 ( Z L ) Vin = f 2 ( P, Pv ,in , Z L ) ρ L = f 3 (Tl ,out , Pl ,out , xi ,out ) hl ,out = f 4 (Tl ,out , Pl ,out , xi ,out ) (4.83) (4.84) (4.82) (4.85) hv ,out = f 5 (Tv ,out , Pv ,out , yi ,out ) ; 0 = Ki ,eq ( xi ,out , yi ,out , Tv ,out , P ) ; i = 1,2,..., n(components) 0 = Tv ,out − Tl ,out (4.86,4.87) (4.88,4.89) for 3 N + 14 unknown variables : Mi , L , xi ,out , yi ,out , M L , E L , hl ,out , hv ,out , ρ L ,VL , Z L , Tl ,out , Tv ,out , Pl ,out , Pv ,out , P, Lout ,Vin for the following input variables : Lin , xi ,in , yi ,in , hl ,in , hv ,in , Pv ,in ,Vout and the model parameter is the tray area Aeff . 4.3. High index reduction through equations differentiation In some cases a strict system equivalence operation through variable differentiation for a high index reduction is not possible, e.g.: the high index reduction on the pendulum model (Mattsson and Soderlind [86]). The following example also gives a case, where equation differentiations are required for the index reduction. 4.3.1. Two phases incompressible fluid system with volume constraint Consider two phases of incompressible liquid-liquid flows through a constant volume static mixer (figure 4.4). Phase-1 is denoted with “A” and phase-2 is denoted with “B”. Moreover the volume fractions of A and B are given by ε A , ε B . The mass balance equations and other constitutive equations are given as follows, Pin,mixer Pout,mixer Fin,A,Pin,A Fout,Pout Fin,B,Pin,B Figure 4.4 77 Chapter 4 : Application of a High Index Detection and Reduction dε A = Fin , A − Fout , A dt dε ρ B .Vmixer . B = Fin ,B − Fout ,B dt ρ A .Vmixer . εA +εB =1 Fout , A = ρ Aε A Ftot ; Fout ,B = ρ Bε B Ftot (4.90, 4.91a) (4.92) (4.93, 4.94) Fout = f1 ( Pout ,mixer , Pout ) Fin , A = f 2 ( Pin , A , Pin ,mixer ) ; Fin , B = f 3 ( Pin , B , Pin ,mixer ) 2 Pin ,mixer − Pout ,mixer = f 4 ( Fout ) (4.95 – 4.98) where: Fin,A, Fin,B = inlet mass flow rate of A and B FoutA, Fout,B = outlet mass flow rate of A and B Fout = total outlet mass flow rate Pin,A, Pin,B = inlet pressure of fluid A and fluid B Pin,mixer, Pout, mixer = inlet and outlet pressure of the mixer Pout = outlet pressure ρ A , ρ B = density of fluid A and fluid B ε A , ε B = volume fraction of fluid A and fluid B Vmixer = volume of the mixer This model consists of 9 differential algebraic equations set with 9 unknowns: ε A , ε B , Fin , A , Fin ,B , Fout , A , Fout ,B , Fout , Pin ,mixer , Pout ,mixer , with the input variables: Pin , A , Pin ,B , Pout and the model parameters: ρ A , ρ B ,Vmixer The structural analysis gives: a) rank struc E = 2 , deg det struc( sE − A) = 1 b) the maximum power of s in the structural matrix ( Es − A) −1 = 1 . It means that this DAE model has a structural index of two c) The 3rd column on the 3rd to 9th rows of matrix ( Es − A) −1 shows that the maximum power of s is one. This means that when we want to do a high index reduction then we need to differentiate the third equation. We may chose d d ε B → ε ′B or ε A → ε ′A as non-state variable. dt dt Suppose we chose the first one, then this gives results as an index one model with 10 differential algebraic equations: dε A = Fin , A − Fout , A dt ρ B .Vmixer .ε ′B = Fin ,B − Fout ,B ρ A .Vmixer . 78 (4.90, 4.91b) Chapter 4 : Application of a High Index Detection and Reduction εA +εB =1 Fout , A = ρ Aε A Ftot ; (4.92) (4.93, 4.94) Fout ,B = ρ Bε B Ftot Fout = f1 ( Pout ,mixer , Pout ) Fin , A = f 2 ( Pin , A , Pin ,mixer ) ; Fin ,B = f 3 ( Pin ,B , Pin ,mixer ) (4.95 – 4.98) 2 Pin ,mixer − Pout ,mixer = f 4 ( Fout ) d ε A + ε B′ = 0 dt (4.99) with the 10 unknowns: ε A , ε B , ε ′B , Fin , A , Fin ,B , Fout , A , Fout , B , Fout , Pin ,mixer , Pout ,mixer 4.3.2. Condenser model This paragraph describes the dynamic model of a one phase totally condenser unit, as schematically given in the figure 4.5: Vin, Pin, hvin Lout, Pout, hlout Qcool Figure 4.5. where: Vin, Lout = inlet of vapour mass flow rate and outlet of liquid mass flow rate Pin, Pout = inlet and outlet pressure hvin, hlout = vapour specific enthalpy inlet and liquid specific enthalpy outlet Qcool = additional cooling energy The assumptions for this model are: - each phase (vapour and liquid) is well mixed - no heat loss to the environment - the condensation process takes place in thermodynamically equilibrium 79 Chapter 4 : Application of a High Index Detection and Reduction As it has been derived in the previous example of the distillation tray model, that the system is in a phase equilibrium, then the balance equations of each phase is not independent. The balance and constitutive equations of the condenser are given as follows: dM T = Vin − Lout dt dET = Vinhvin − Lout hlout − Qcool dt M T = M L + MV ; M L = ρ LVL VL + VV = Vcond (4.100, 4.101) ; ET = E L + EV ; E L = M Lhlout − PVL ρ L = f (T , P) ; ρV = f ( T , P ) P = f (T ) hlout = f (T , P) Vin = f ( Pin , P) ; ; hV = f (T , P) Lout = f (VL , P, Pout ) MV = ρVVV ; (4.102 – 4.104) (4.105) EV = MV hv − PVV (4.106 – 4.108) (4.109 – 4.110) (4.111) (4.112, 4.113) (4.114, 4.115) where: M L , MV = liquid and vapour mass hold up M T , ET = total mass and energy hold up ρ L , ρV = liquid and vapour density VL ,VV = liquid and vapour volume hV = vapour phase specific enthalpy P, T = equilibrium pressure and temperature These are 16 differential algebraic equations with 16 unknown variables: M T , ET , M L , MV , E L , EV ,VL ,VV , ρ L , ρV , hlout , hv , T , P,Vin , Lout and the input variables are hv ,in , Pin , Pout , Qcool . The volume of condenser Vcond is given as the model parameter. Structural analysis of this model gives: a) rank struc E = 2 , deg det struc( Es − A) = 2 . This means the model has two number of dynamic degree of freedom and it does not have a high index, i.e. the index of the DAE model is one. b) column rank E = 2 and since the number of dynamic degree of freedom is two, then this DAE model satisfies consistent re-initialisation criterion. In the following we will see that splitting the condenser model into two subsystems, vapour phase and liquid phase, will result in a high index model. Figure 4.6 shows the original system (figure 4.6a) is decomposed into two subsystems (figure 4.6b) 80 Chapter 4 : Application of a High Index Detection and Reduction Vin, Pin, hvin Vin, Pin, hvin S-I Qcool VC LIout, PIout, hIlout S-II Qcool Lout, Pout, hlout Lout, Pout, hlout (a) (b) Figure 4.6. The system hold up is decomposed into two subsystems. The vapour phase is on subsystem S-I and the liquid phase is on subsystem S-II. Modeling of sub system S-I, with the assumption that liquid phase hold up is neglected, gives the following 10 differential algebraic equations: S-I: dMV I = Vin − Lout dt (4.116, 4.117) dEV I I = Vinhv ,in − Lout hl ,out − Qcool dt MV = ρVVC ; EV = MV hv − PVC (4.118, 4.119) ρV = f 1 ( T , P ) (for ideal gas P = ρV RT ) (4.120) B P = f 2 (T ) (e.g. P = A.exp ; A, B, C = physical property constants) T +C FG H IJ K (4.121) (4.122) I out P =P hv = f 3 (T , P ) ; hlI,out = f 4 (T , P ) (4.123, 4.124) Vin = f 5 ( Pin , P) (4.125) I out I l ,out with 10 unknowns : MV , EV , L , h , hv , ρV , P , P, T ,Vin and the input variables I out are : hv ,in , Pin , Qcool and the model parameter is the volume of condenser VC . Where: I Lout , hlI,out , PoutI = liquid outlet mass flow, specific enthalpy and pressure from subsystem S-I 81 Chapter 4 : Application of a High Index Detection and Reduction Modeling of sub system S-II, with the assumption that the vapour hold up is neglected, gives the following 7 differential algebraic equations: dM L I = Lout − Lout dt dE L I = Lout hlI,out − Lout hl ,out dt M L = ρ LVL ; E L = M L hl ,out − PoutIVL (4.128, 4.129) ρ L = f (T , PoutI ) (4.130, 4.131) ; hl ,out = f (T , PoutI ) Lout = f ( PoutI ,VL , Pout ) (4.126a, 4.127) (4.132) with 7 unknowns : M L , E L ,VL , ρ L , hl ,out , T , Lout and the input variables are : I Lout , hlI,out , PoutI , Pout . Structural analysis for the subsystem S-II gives an index one DAE model, but for the subsystem S-I gives: a) rank struc( E ) = 2 and deg det struc( Es − A) = 1 , and b) the structural index of the DAE model for subsystem S-I is two c) Index reduction requires differentiation of the following equations (4.118-4.121) (4.123) gives results of: D(1) F = d (1) F dρ dMV : 0 = VC − dt dt dt dMV dh dP dEV 0 = hv + MV v − VC − dt dt dt dt dT df1 (T , P) dP df1 (T , P) dρV 0= + − dt dT dt dP dt dT df 2 (T ) dP 0= + dt dT dt dT df 3 (T , P) dP df 3 (T , P ) dhv 0= + − dt dP dt dt dT (4.133a – 4.137a) following Conjuncture 2.14a (see Chapter 2) we have to chose 5 non-state variables. Table 4.1 gives 6 possibilities to chose the state and non-state variables, 82 Chapter 4 : Application of a High Index Detection and Reduction No. State variables 1 EV MV hv 2 3 4 ρV 5 P T 6 Non state variables MV , hv , ρV , P , T hv , ρV , P, T , EV ρV , P , T , EV , MV P, T , EV , MV , hv T , EV , MV , hv , ρV EV , MV , hv , ρV , P Table 4.1 e.g. for the choice of the 1st possibility, we replace all dx or x dt x′ ; x = MV , hv , ρV , P , T with algebraic (non-state / dummy) variables ∂D(1) F ; x = MV , hv , ρV , P, T where is non-singular, such that the sub system ∂ x′ S-I is given by the following 15 differential algebraic equations having index one : I MV′ = Vin − Lout dEV I = Vin hv ,in − Lout hlI,out − Qcool dt (4.126b, 4.127) 0 = ρ ′VC − MV′ 0 = MV′ hv + MV hv′ − P ′VC − EV ∂f 1 ( T , P ) ∂f ( T , P ) + P′ 1 − ρV′ ∂T ∂P ∂f ( T ) + P′ 0 = T′ 2 ∂T ∂f ( T , P ) ∂f ( T , P ) + P′ 3 − hv′ 0 = T′ 3 ∂T ∂P 0 = T′ (4.133b – 4.137b) and equations (4.128 – 4.132), with 15 unknowns variables I MV , EV , Lout , hlI,out , hv , ρV , PoutI , P, T ,Vin and MV′ , hv′ , ρV′ , P′, T ′ This example shows a contradictory assumption will result in a high index model. The assumption that system is on thermodynamically phase’s equilibrium (4.121), but there is only one phase on subsystem S-I. This example also shows that the high index reduction can lead to the necessity of differentiation of physical properties relations (4.120, 4.121, 4.123), where practically it is not always possible, i.e. if these physical properties relations are given as external subroutines then it is not easy to perform this differentiation. Another possibility to avoid a high index model of such condenser model as presented in subsystem S-I is through steady state simplification, i.e. Aspen Tech [5, 118] model 83 Chapter 4 : Application of a High Index Detection and Reduction library of the condenser model. This is not a strict system equivalence with the original system description. 4.4. Consistent re-initialisation problem This paragraph presents several examples for index one DAE models, which can suffer consistent re-initialisation problem, i.e. not satisfying consistent re-initialisation criterion (see Chapter 2 – Corollary 2.12). 4.4.1. Intensive variables as state variables Fin ,Pin, hin P0 VL Fout, Pout, hout Figure 4.7. Fin, Fout = inlet and outlet liquid mass flow rate Pin, Pout = inlet and outlet pressure hin, hout = inlet and outlet specific liquid enthalpy P0 = ambient pressure VL = liquid volume hold up Figure 4.7 shows a simply ideally mixed liquid in a tank given by the following index one model with 8 differential algebraic equations: dM L = Fin − Fout dt (4.138, 4.139) dE L = Finhin − Fout hout dt M L = ρ LVL ; E L = M L hout − PV (4.140, 4.141) 0 L ρ L = f1 (T ) ; hout = f 2 (T ) (4.142, 4.143) Fin = f 3 ( Pin , P0 ) ; Fout = f 4 ( P0 ,VL , Pout ) (4.144, 4.145) with 8 unknowns variables: M L , E L , hout , ρ L ,VL , T , Fin , Fout and input variables are hin , Pin , Pout , P0 , where: M L , E L = mass and energy hold up ρ L , T = liquid density and temperature Previously it is stated that the use of intensive variable can lead to solving of a consistent (re-) initialisation problem. This is demonstrated in the following. 84 Chapter 4 : Application of a High Index Detection and Reduction In the model equations (4.138-4.139) we chose the extensive variable M L , E L as our state variables. Representing these model equations with intensive variables as its state variables, e.g.: dρ L dV + ρ L L = Fin − Fout dt dt dρ dV dh dV VL hout L + ρ L hout L + VL ρ L out − P0 L = Finhin − Fout hout dt dt dt dt ρ L = f1 (T ) ; hout = f 2 (T ) Fin = f 3 ( Pin , P0 ) ; Fout = f 4 ( P0 ,VL , Pout ) VL (4.146, 4.147) (4.148, 4.149) (4.150-4.151) This gives 6 differential algebraic equations with 6 unknown variables ρ L ,VL , hout , T , Fin , Fout . Structural analysis of DAE (4.146 – 4.151) gives: a) rank struc E = 2 and deg det struc ( Es − A) = 2 . This means that the DAE model (4.146 – 4.151) has no high index structure and the number of dynamic degree of freedom is two. b) column rank struc E = 3 (for variables ρ L , VL , hout ) can be interpreted that the number of the dynamic degree of freedom for consistent (re-) initialisation is three, but it is not. The dynamic degree of freedom of the DAE model is two. Clearly this example shows the problem of consistent (re-) initialisation can be caused through the choice of the state variable, i.e. the intensive variables instead of the extensive variables. Note: The consistent re-initialisation problem can also occur for the previous example on section 4.2.1 and on section 4.2.2, namely: a) In the example 4.2.1, if we replace: dM A dM CO dM H2O with − dt dt dt dM B dM CO dM H2O with + dt dt dt dM H2 dM H2O dM C with + dt dt dt (see (5.23)) (see (5.24)) (see (5.25)) b) In the example 5.2.2, if we replace: dMi , M dMi , L dMi ,V with + dt dt dt dE M dE L dEV with + dt dt dt (see (5.69)) (see (5.70)) 85 Chapter 4 : Application of a High Index Detection and Reduction 4.4.2. Tubular reactor ethane cracking model In the following we describe a non-isothermal tubular reactor ethane-cracking model adopted from (Froment [39], van Goethem [51]). The thermal cracking of hydrocarbons is carried out in long coils inside a gas-fired furnace. Figure 4.8 schematically shows such a reactor. The feed of the reactor is mainly ethane C2 H6 and steam H2 O . The feed steam can contain some other impurities, e.g. C2 H4 , C3 H6 . The main products of this cracking unit are ethylene C2 H2 and propylene C3 H6 and other side products as hydrogen H2 , methane CH4 , etc. The products of this cracking unit are the building blocks of the petrochemical industry. The cracking reactor scheme of this craking process are: 1. C2 H6 ⎯ ⎯r1 → C2 H4 + H2 r2 ⎯ → C2 H6 2. C2 H4 + H2 ⎯ r3 ⎯ → C3 H8 + CH4 3. 2C2 H6 ⎯ r4 ⎯ → C2 H2 + CH4 4. C3 H6 ⎯ r5 ⎯ → C3 H6 5. C2 H2 + CH4 ⎯ r6 ⎯ → C4 H6 6. C2 H2 + C2 H4 ⎯ r7 ⎯ → C3 H6 + CH4 7. C2 H4 + C2 H6 ⎯ dt=pipe internal diameter z=0; Fj(0),T(0),P(0) heat flux, q(z) j=CH4,C2H2,C2H4,C2H6,C3H6,C3H8,C4H6,H2,H2O z=L; Fj(L),T(L),P(L) rb= pipe bending radius Figure 4.8. Schematic configuration of ethane cracking unit 86 Chapter 4 : Application of a High Index Detection and Reduction where: Fj(0), T(0), P(0) = mol feed flow rate of component j, temperature and pressure at the entry of the reactor tube Fj(L), T(L), P(L) = mol product flow rate of componet j, temperature and pressure at the outlet of the reactor tube q(z) = heat flux supply to the reactor The steady state place independent balance and consititutive equations are given as follows: dFj dz Ft Cp −G = πdt2 4 7 ∑α j = 1,2,...,8 ; r ij i ; i = 1,2,...,7 i =1 dT πd 2 7 = q ( z )πdt + t ∑ ( − ΔHi )ri dz 4 i =1 FG H IJ K du dP 2 f N bend f bend − = + ρ g u2 dz dz dt 2L (4.152, 4.153, 4.154a) 9 Ft = ∑ Fj M m Ft = G ; ; ri = f i1 ( Fj , Ft , P, T ) ( − ΔHi ) = f i 2 (T ) Cp = f15 (T ) (4.155, 4.156) 4 M m Pu = GRT i =1 PM m = ρ g RT πd 2 t i = 1,2,...,7 ; ; (4.157, 4.158) ; j = 1,2,...8 i = 1,2,...,7 (4.159, 4.160, 4.161) These are 29 equations with 29 unknowns variables: Fj ( j = 1,2,...,8), T , P, u, ρ g , Ft , M m , ri (i = 1,2,...,7),( − ΔHi )(i = 1,2,...,7), Cp and model input variables are: F9 , q ( z ), G , where : α ij = stoichiometric coefficient of i-th reaction for the component j ri = molar reaction rate per unit of volume of i-th reaction Ft = total molar flow rate C p = molar specific heat capacity of the gas mixture ( −ΔHi ) = molar heat of i-th reaction T , P = temperature and pressure of gas mixture in the reactor tube G = superficial mass flow velocity u = gas velocity f , f bend = tube and tube bending friction factor Nbend = number of bendings of reactor tube M m = mean molecular weight ρ g = density of gas mixture R = gas constant 87 Chapter 4 : Application of a High Index Detection and Reduction The first three sets of equations (4.152, 4.153, 4.154) give the component molar balance, the energy balance and the impulse balance equations. The equations (4.1554.156) give the relations for the total molar flow, and equation (4.157) is the ideal gas relation. The equation (4.158) is obtained from the substitution of equation (4.157) to the following equation: u= G (4.162) ρg and the equations (4.159) are the kinetic reaction rate equations, where each reaction rate here is only presented as a function of Fj , Ft , P, T . The details of these reaction rate equations can be found in Van Goethem [51]. Van Goethem [51] solved this model by the use of an implicit integration algorithm in gPROMS [50], where the model equations are detected to have a high index structure, but our structural analysis of this model gives results: a) rank struc E = 10 and deg det struc ( Es − A) = 10 , which means that the model has a structural index one with the number of dynamic degree of freedom is 10. b) column rank struc E = 11 , which means that the model does not satisfy consistent (re-) initialisation criterion (see Chapter 2 – Corollary 2.12) This is an example of a solving of consistent (re-) initialisation problem that has been detected as a high index problem, but it is not. A consistent re-initialisation model structure can be made through the following transformation: dFj dz Ft Cp = πdt2 4 7 ∑α r ij i j = 1,2,...,8 ; ; i = 1,2,...,7 i =1 πd 2 7 dT = q ( z )πd t + t ∑ ( − ΔHi )ri 4 i =1 dz FG H IJ K 2 f N bend f bend dPu = + ρ g u2 2L dz dt Pu = − Gu − P (4.152, 4.153, 4.154b, 4.154c) together with equations (4.155 – 4.161) give an index one DAE model having consistent re-initialisation structure, where the number of dynamic degree of freedom equals to the number of differential variables, i.e. 10. Although the following differentations are not required, Froment [39] presented the solution as the ‘index reduction’ through Pantelides’ algorithm for a consistent initialisation problem [98]. It needs to differentiate the following equations (4.155) (4.156), (4.158). This gives result to : 88 Chapter 4 : Application of a High Index Detection and Reduction (1) D(1) F = dF dP dM m du dT : M mu + Pu + M m P − GR =0 dz dz dz dz dz 8 dF dFt −∑ j = 0 dz j =1 dz Mm dFt dM m + Ft =0 dz dz The following 3 variables are chosen as “dummy/algebraic” z ′ variables, where D(1) F d z′ is non − singular : du → u′ dz ; dFt → Ft ′ dz ; dM m → M m′ dz where an index one consistent (re-) initialisation model is given by the following 32 differential algebraic equations: dFj dz Ft Cp − Gu′ − = πdt2 4 7 ∑α r ij i j = 1,2,...,8 ; ; i = 1,2,...,7 i =1 dT πd 2 7 = q ( z )πdt + t ∑ ( − ΔHi )ri dz 4 i =1 FG H IJ K 2 f N bend f bend dP ρ g u2 = + 2L dz dt (4.152, 4.153, 4.154d) dP dT M mu + PuM m′ + M m Pu′ − GR =0 dz dz 8 dF Ft ′− ∑ j = 0 j =1 dz M m Ft ′+ Ft M m′ = 0 (4.155’, 4.156’, 4.158’) together with equations (4.155 – 4.161) and having 32 unknown variables Fj ( j = 1,2,...,8), T , P, u, ρ g , Ft , M m , ri (i = 1,2,...,7),( − ΔHi )(i = 1,2,...,7), Cp and u′, Ft ′, M m′ . 4.5. High index problem due to interconnection The following gives analysis of a high index problem due to interconnection of two ideally mixed tanks, as given in the figure 4.9. This example gives that a high index problem can arise, when inputs of the interconnected subsystems are not matched (see Chapter 6). 89 Chapter 4 : Application of a High Index Detection and Reduction The system boundary of each subsystem in the figure 4.9 is given with dashed lines and the model equations of each subsystem and its interconnection equations are also shown in the figure 4.9. Subsystem S-I is described by 4 index one differential algebraic equations, with 4 unknowns variables M1 , H1 , P1 , Fin and the input variables are Pin , Fout 1 . Subsystem S-II is described by 4 index one differential algebraic equations, with 4 unknowns variables M 2 , H2 , P2 , Fout and the input variables are Pout , Fin 2 . A1=area tank 1 A2=area tank 2 S-I S-II H1 Fin, Pin H2 P1 Fout1, P1 S-I : dM1 = Fin − Fout dt M1 = ρA1 H1 P1 = ρgH1 Fin = f1 ( Pin , P1 Fout, Pout P2 Fin2, P2 S-II : interconnection : Fout 1 = Fin 2 P1 = P2 dM 2 dt M2 P2 Fout = Fin 2 − Fout = ρA2 H2 = ρgH2 = f 2 ( P2 , Pout Figure 4.9. Two interconnected ideally mixed tanks Compound system S-I + S-II is described by 10 differential algebraic equations, where two of them are additional interconnection equations, to solve 10 unknowns variables M1 , H1 , P1 , Fin , M 2 , H2 , P2 , Fout 1 , Fin 2 , Fout . The input variables are Pin , Pout . The DAE model equations are given as follows: dM1 = Fin − Fout1 dt M1 = ρ A1H1 P1 = ρ gH1 Fin = f1 ( Pin , P1 ) 90 (4.163a, 4.164, 4.165, 4.166) Chapter 4 : Application of a High Index Detection and Reduction dM 2 = Fin 2 − Fout dt M 2 = ρ A2 H 2 P2 = ρ gH 2 (4.167a, 4.168, 4.169, 4.170) Fout = f 2 ( P2 , Pout ) Fout1 = Fin 2 (4.171, 4.172) P1 = P2 The structural analysis of this interconnected sub-models gives: a) rank struc E = 2 and deg det struc( sE − A) = 1 that means that the model has a high index with the number of dynamic degree of freedom is one. b) Analyzing the structural information from struc ( Es − A) −1 gives that this DAE model has index two. In the following different ways for the high index reductions will be shown: (i) Based on the information of the matrix struc ( Es − A) −1 , a high index reduction can be done through differentiation of the equations (4.164),(4.165),(4.168), (4.169), (4.172), gives: dM1 dH − ρA1 1 = 0 dt dt dP1 dH1 − ρg =0 dt dt dP1 dP2 − =0 dt dt ; ; dM 2 dH − ρA2 2 = 0 dt dt dP2 dH2 − ρg =0 dt dt and the following 5 variables z ′ can be chosen as non-state variables (i.e. algebraic variables), where d (1) F d z′ dM 2 → M 2′ dt dH1 → H1′ dt ; is non − singular : ; dH2 → H2′ dt ; dP1 → P1′ dt ; dP2 → P2′ dt where an index one consistent (re-) initialisation model is given by the following 15 differential algebraic equations: 91 Chapter 4 : Application of a High Index Detection and Reduction dM1 = Fin − Fout1 dt M1 = ρ A1H1 P1 = ρ gH1 Fin = f1 ( Pin , P1 ) M 2' = Fin 2 − Fout M 2 = ρ A2 H 2 P2 = ρ gH 2 Fout = f 2 ( P2 , Pout ) Fout1 = Fin 2 P1 = P2 dM1 − ρA1 H1′ = 0 dt P1′− ρgH1′ = 0 (4.163a, 4.164, 4.165, 4.166, 4.167b, 4.168, 4.169, 4.170, 4.171, 4.172) ; M 2′ − ρA2 H2′ = 0 ; P2′ − ρgH2′ = 0 (4.173 – 4.177) P1′− P2′ = 0 or by substitution and elimination of all non-state variables, we get the following index one DAE model: dM1 = Fin − Fout1 dt M1 = ρ A1H1 P1 = ρ gH1 Fin = f1 ( Pin , P1 ) A2 ( Fin − Fout1 ) = Fin 2 − Fout A1 M 2 = ρ A2 H 2 P2 = ρ gH 2 (4.163a, 4.164, 4.165, 4.166, 4.167c, 4.168, 4.169, 4.170, 4.171, 4.172) Fout = f 2 ( P2 , Pout ) Fout1 = Fin 2 P1 = P2 Note: Substitute equation (4.171), Fout 1 = Fin 2 , to equation (4.167c), we get: Fout 1 = Fin 2 = 92 b 1 A2 Fin + A1 Fout A1 + A2 g (4.173) Chapter 4 : Application of a High Index Detection and Reduction ii) Another method for the high index reduction can be done by performing variable transformation as explained in section 4.2. This is done by replacing the first equation (4.163) with the combination linear of equation (4.163a) and (4.167) that removes variable Fout1 . This gives the following: dM t = Fin − Fout dt dM 2 = Fin 2 − Fout dt M1 = ρA1 H1 ; M 2 = ρA2 H2 P1 = ρgH1 ; P2 = ρgH2 Fout 1 = Fin 2 ; Fin = f ( Pin , P1 ) M t = M1 + M 2 P1 = P2 ; Fout = f ( P2 , Pout ) a) when we are not interested on variable Fin 2 , Fout 1 as outputs of the system then we can perform column wise strict system equivalence operation resulting in an index one DAE model: dM t = Fin − Fout dt 0 = Fin 2 − Fout M1 = ρA1 H1 ; M 2 = ρA2 H2 P1 = ρgH1 ; P2 = ρgH2 ; Fout 1 = Fin 2 P1 = P2 Fin = f1 ( Pin , P1 ) ; Fout = f 2 ( P2 , Pout ) M t = M1 + M 2 Note: The equations 0 = Fin 2 − Fout and Fout1 = Fin 2 do not have any contributions on inputs outputs behaviour. Therefore these two equations may be removed from the equation set above. b) but when we are interested in variable Fin 2 , Fout 1 as outputs of the system, we may not perform column wise strict system equivalence operation as described above. The index of the DAE model can be reduced through differentiation of equations (4.165), (4.166), (4.167), (4.168), (4.170), (4.173), and choose the variables M1′, M 2′ , H1′, H2′ , P1′, P2′ are non-state variables, then we get the equivalent index one model equations: 93 Chapter 4 : Application of a High Index Detection and Reduction dM t = Fin − Fout dt M 2′ = Fin 2 − Fout M1 = ρA1 H1 ; M 2 = ρA2 H2 P1 = ρgH1 ; P2 = ρgH2 ; Fout 1 = Fin 2 P1 = P2 Fin = f1 ( Pin , P1 ) ; Fout = f 2 ( P2 , Pout ) M t = M1 + M 2 M1′ − ρA1 H1′ = 0 P1′− ρgH1′ = 0 ; ; P1′− P2′ = 0 ; M 2′ − ρA2 H2′ = 0 P2′− ρgH2′ = 0 dM t − M1′ − M 2′ = 0 dt Substitution and elimination of the non-state variables give the result: dM t = Fin − Fout dt ( A1 + A2 ) Fin 2 = A2 Fin + A1 Fout M1 = ρA1 H1 ; M 2 = ρA2 H2 P1 = ρgH1 ; P2 = ρgH2 ; Fout 1 = Fin 2 P1 = P2 Fin = f1 ( Pin , P1 ) ; Fout = f 2 ( P2 , Pout ) M t = M1 + M 2 In this example, we see that the resulting low index DAE model from a strict system equivalence operation, i.e. an index reduction, is non unique. 4.6. Conclusions The objectives of this Chapter are to show several examples of a high index model. The examples show that a high index problem can be caused due to internal states constraint equations or due to sub models interconnection. A consistent (re-) initialisation problem on a low index model is caused due to a non minimum state variables presentation. It is recommended to use physical extensive variables as the state variables. A high index reduction can be done through equation differentiations or variable differentiations, called a strict system equivalence operation. The resulting low index model due to a strict system equivalence operation can be non unique. 94 Chapter 5: Input Variables Assignment of a DAE Model Input variables of a DAE model are sets of possible model variables acting from the model boundaries, such that the DAE has a low index. The constraining equations for a high index DAE model are invariant under the choice of input variables resulting to the highest model’s degree of freedom. “A dissonance is always recognisable......” 5.1. Introduction This Chapter describes the choice of input signals to a DAE model for their role in interconnection between DAE sub models. In Chapter 2,3 and 4 we have seen that a dynamic process model leads to a first order non-linear DAE given by the equation (1.3b): F ( z (t ), z (t ), u (t ), t ) = 0 . It was thought that the choice of input variables u (t ) for a process model is straight forward. A schematic of external influences through the model boundaries into or acting to the processes, as given on figure 5.1. u3 Model boundary u5 u1 u2 Model u6 u4 Figure 5.1. Model input variables. In the process modelling activity it became clear that the choice of input variables for a DAE model is not always straight forward. The reasons for this are: a) Most modelling activity is more implicit behavioural or model equations description driven. It is not about the relation of signals paths or variables within the equations and how to solve these equations in relation to the external variables. b) The equations within a DAE model can be implicit. Therefore sometimes the input variables are not easy to recognise from the model equations. c) The input and output variables are dependent on the model equations within the model itself. Arbitrary signals/variables can not be chosen for input variables of a model. 95 Chapter 5 : Input Variables Assignment … d) The input variables for a model can not be arbitrary assigned for a given set of model equations, see the following example 5.1. Lefkopoulos and Stadtherr [74,75] also pointed out that the wrong choice of input variables can result in a high index DAE model. e) Sometimes the directionality of input variables of a DAE model in relation with its interconnection with other DAE model is not fixed, see example 5.2. Example 5.1. A simplified ideal gas buffer models Fin,Pin Fout,Pout Figure 5.2. A simplified gas buffer model The model equations are: Where: dM = Fin − Fout dt PV M= RT Pin = P Pout = P Fin = inlet gas mass flow Fout = outlet gas mass flow Pin = buffer gas inlet pressure Pout = buffer gas outlet pressure M = buffer gas mass hold up P = buffer gas pressure V = buffer volume (model parameter) R = buffer gas constant (model parameter) T = buffer gas temperature (assume as a model parameter) These are 4 model equations with 6 variables: Fin , Pin , Fout , Pout , M , P . There are 2 variables must be assigned as a model input variables. It seems that they can not be assigned arbitrarily, i.e. Fin , Fout must be the input variables for this model. Example 5.2. Figure 5.3 gives schematically interconnected 2 gas buffer models with inlet and outlet pressure drop equations represented in the figure as inlet and outlet ‘valve models’. There are two possible directionalities of pressure flow variables P, F between the outlet of the buffer 1 and the inlet of the buffer 2. 96 Chapter 5 : Input Variables Assignment … Model boundary Model boundary P P F F Figure 5.3. Interconnection directionalities of two gas buffer models Interconnection of a DAE model with another DAE model depends on the possible input variables assignments to these DAE sub-models. From a model-user point of view, it is very useful when the information of possible input variables assignment to a model is available. Moreover we have already seen on the section 4.5 (Chapter 4), that interconnections between low index sub models can still lead to a high index model. A modeller expects that each storage variable on each sub model has always at least C1 continuity, i.e. that there is no storage variable that gives a ‘jump’ or an ‘impulsive’ behaviour due to changes in the model variables values, other than the change on a sudden change on the storage variable itself. Therefore the modeller expects a preservation of the amount of dynamic degree of freedom in the storage variables on each sub model where sub-models are interconnected. In other words, we want that interconnection of low index sub models should result in a low index model. Thus the essentials questions to be answered in this chapter are: a) what are the input variables of a DAE model ? b) how can we choose the input variables sets ? c) can we always choose a set of input variables of a DAE model to give a low index DAE ? to answers those questions this Chapter 5 is divided into the following sections: - Section 5.2 describes the DAE model entities and variable classifications. This section also gives the definition of input variables to a DAE model. - Section 5.3 describes a method for finding input variables sets, namely the low index input variables sets assignment for a DAE model. - Section 5.4 describes if there is no input variables set that gives a low index DAE, then we will see that the state constraint equations are invariant under 97 Chapter 5 : Input Variables Assignment … - the choice of a maximum degree input variables sets assignment for a DAE model. Section 5.5 gives conclusions of this chapter. Finding the input variables of a DAE model is done by using the structural theory in Chapter 3 and extending the graph algorithm as described in Appendix B. 5.2. Model entities and variables classification 5.2.1. Model entities P.I. Barton [6] and Nilsson [93] describe that principally there are 5 model entities (see figure 5.4), namely: 1. Model parameters as the time invariant quantities that are not, under any circumstances, determined from the results of a calculation. 2. Model variables as the quantities describing time dependent behaviour of a model. 3. Model equations as the behavioural description that determines the time trajectories of the model variables. 4. Model initial values. The model initial values are the chosen consistent set of initial values at time t0 of a model. (note: for partial differential (algebraic) equations the model boundary values are also required) 5. Model ports or connections are model boundaries. Each model port consists of the chosen sub set of the model variables to interact with its environment. MODEL C o n n e c t i o n s Parameters Variables Initial & Boundary values Equations C o n n e c t i o n s Figure 5.4. Schematic of model entities Usually the DAE model equations are given as: F ( z (t ), z (t ), t ) = 0 (1.3a) or F ( x (t ), x (t ), w(t ), t ) = 0 98 (5.1) Chapter 5 : Input Variables Assignment … Where: z (t ) = [ x(t ) ( a b) w(t ) ] , t ∈(a b), denotes time on some interval ; a, b ∈ R ; z (t ) ∈ R n , z (t ) ∈ R n , F : R 2 n +1 → R m , n, m ∈ I \0, m≤n. The DAE model’s consistent initial values ( z (to ), z (to )) are mostly calculated by algebraic solving of the equations by providing r values of arbitrary chosen initial conditions (see Chapter 2, section 2.5). Principally the model interconnections are the chosen set of variables by the modeller to interconnect or interact the model with its environment. Process modelling environments like Aspen [5], gProms [50], Hysis [61] use several classes of model connections. Examples: - stream model connection, includes information of flow, pressure, components, temperature, enthalpy - heat or power connection, includes information of heat flow or power from or into a model A subset of these variables within a model connection can be the input variables of the model. 5.2.2. Model variable classifications Consider a DAE model F ( z (t ), z (t ), t ) = 0 (1.3a) or it can be written as F ( x (t ), x (t ), w(t ), t ) = 0 where: (5.1) b g x(t ), x(t ) ∈ R r , w(t ) ∈ R p , t ∈ ( a b ) , a, b ∈ R denotes time on interval a b and F : R × R × R → R , with m < (r + p ) 2r p m With the variables in this DAE model (5.1) are: 1. x (t ) as the state variables and 2. w(t ) as the non-state variables 5.2.2.1. State variables x (t ) Willems [131] introduced the term system memory for understanding the term ‘state’ of a system in the time domain, Definition 5.1. System memory (Willems [131]) A system has memory if there are C1 continuous or stepwise continuous internal signals x (t ) ⊆ z (t ) where the value of each variable x (t o ) at time t o can be reconstructed from the value of x (t ) , where t < t o . 99 Chapter 5 : Input Variables Assignment … We call these variables as physical memory variables or state variables. Mathematically the memory-effect of the system behaviour is given by a difference or differential variable. The states of the system are not unique, i.e. new state variables can be defined by state variables transformations. However starting with the primitive balance equations, we can choose the accumulation terms as the primitive state variables of the system. The accumulation or storage variables in the balance equations are the memory of the system, Proposition 5.2. Storage variable. A storage variable of a system given in the balance equation is a state variable of the physical system. Since we expect that a storage property of a system at time to depends only on the past value at t < t o and must be C1 continue at ∀t ∈ (a b) De Groot and Mazur [52], and Preisig [104] recommend using the fundamental extensive quantities as the common starting point of the choice of the state variables in the balance equations. This will give the minimal physical state realisation of the model. As shown in Chapter 2 and Chapter 3, mathematically we can calculate the number of dynamic degrees of freedom of a system, i.e. the number of independent state variables, is given as deg det struc ( Es − A) . Our primitive assumption of independent balance equations gives that from the physical modelling point of view, the number of dynamic degrees of freedom is equal to the number of balance equations in the system. This applies when there is no state constraints equation in the system or if the model has a low index. 5.2.2.2. Non-state variables w(t ) The non-state variables of a model can be distinguished into: - external variables, i.e. input variables. These are the variables determined by model equations and that can be chosen as the variables from the external acting to the model. internal model variables: the model variables which are derived from the state variables and/or external variables. Input variables The following will define input variables of a DAE model. Definition 5.3. Autonomous and non-autonomous physical process model Consider a DAE model (1.3a): F ( z (t ), z (t ), t ) = 0 b), denotes time on some interval (a b) ; a, b ∈ R ; z (t ) ∈ R , z (t ) ∈ R n and F : R 2 n +1 → R m , n, m ∈ I \0, m ≤ n . Where: t ∈(a n 100 Chapter 5 : Input Variables Assignment … An autonomous physical process model or an autonomous continuous model behaviour is given by equation (1.3a) with m=n, if a model behaviour at time to , z (to ), will determine a future behaviour z (t ), for t ≥ to . A non-autonomous physical process model is given by equation (1.3a) where m < n . There are k = n − m variables that can be chosen as input variables. The amount of k-variables is called degree of freedom (DOF) of (1.3a) Definition 5.4. Input variable Consider a model S given by a DAE model (1.3a) or (5.1): F ( z (t ), z (t ), t ) = 0 or F ( x (t ), x (t ), w(t ), t ) = 0 where: t ∈ ( a b); a, b ∈ R denotes time on time interval (a b) , z (t ) = x (t ) w(t ) , x (t ) = state variables , z (t ) ∈ R n , z (t ) ∈ R n and F : R 2 n +1 → R m ; n, m ∈ I \ 0, m < n. Then input variables u(t ) of S are possible sets of k = n − m system variables, u( t ) ⊆ z ( t ) , Under conditions that: a. ui (t ), i = 1,..., k may have a free form (e.g. pulse, step, polynomial) b. The resulting DAE , with a chosen set of input variables u(t ) : F ( z (t ), z (t ), u (t ), t ) = 0 u (t ) = f (t ) l q or with w(t ) = v (t ), u(t ) : F ( x (t ), x (t ), v (t ), u(t ), t ) = 0 u( t ) = f ( t ) is a fully determinated DAE (number of equations = number of variables. then this fully determined DAE together with its initial conditions will determine the behaviour of the model. c. At each time instant t ∈(a b) , the property of physical storage variable, proposition 5.2 holds, i.e. pre-assumed physical storage variable is C1 continue on t ∈(a b) d. x (t ) and v (t ) do not anticipate the chosen u(t ) (see b.) for t ∈(a b) , and behaviour equation (b) is satisfied 101 Chapter 5 : Input Variables Assignment … We call u(t ) as (causal) input variables, when conditions a,b,c,d in the definition 5.4. are fulfilled. A set of causal input variables for a DAE model (1.3a) also gives a low index DAE model (1.3b). Therefore in the following we will derive how to detect a low index input variables set. Consider an under determined DAE model (1.3a) F ( z (t ), z (t ), t ) = 0 with its system matrix written as: T (s) z = 0 , with ( (5.2) ) T ( s ) = Es − A , and E , A ∈ R m×n , m < n Then there is k = m − n variables that must be set for (5.2) to become a fully determined DAE. If we assign these a variable from (5.2) as time function equation: zi = ui (t ) then we can represent (5.2) as: LMT~(s)OPz = F 0 I MN μ PQ GH u JK (5.3) T i i where μ i ∈ R n is a vector for which the i-th element is 1, and all other elements are 0. Obviously, to get a fully determined DAE (i.e. a square matrix) we have to assign time functions for k variables. If the choice of these k-time functions variables is free from the internal properties of the system, we may have a high index DAE or the resulting system may even be inconsistent. Therefore it makes sense to define a low index input assignment as follows, Definition 5.5. A low index input assignment Given a DAE model (1.3a) F ( z (t ), z (t ), t ) = 0 with m equations and n variables z , if the set of k = m − n variables can be set as external independent time functions variables where the resulting DAE is consistent and has a low index, then these k variables are called ‘a low index input variables set / assignment’ for the given DAE model. Example 5.3 Fin, Pin P Figure 5.5.Input variables of a tank model 102 Fout, Pout Chapter 5 : Input Variables Assignment … Consider a liquid tank with valves as shown in the figure 5.5. The DAE model of this system is: dM = ( Fin − Fout ) dt A M= P g Fin = f1 ( Pin , P ) Fout = f 2 ( P, Pout ) Where : M = mass hold up within the tank P = hydraulic pressure at the bottom of the tank Pin = inlet pressure Pout = outlet pressure f1 = function describing inlet valve model f 2 = function describing outlet valve model A = tank area (model parameter) g = gravity acceleration constant (model parameter) These are 4 differential algebraic equations with 6 unknowns: M , P, Pin , Pout , Fin , Fout . Thus two from these six variables should be chosen results to a fully determined DAE model. Table 5.1 shows the 15 possibilities to assign the ‘input’ variables to the model, No 1 2 3 4 5 6 7 8 Variable set M, P M, Pin M, Pout M, Fin M, Fout P, Pin P, Pout P, Fin No 9 10 11 12 13 14 15 Variable set P, Fout Pin, Pout Pin, Fin Pin, Fout Pout, Fin Pout, Fout Fin, Fout Table 5.1. Possible ‘input’ variables In this example, we can show that only the variable sets as shown in table 5.2 give the low index assignment, while others are not. In particular the set { M , P} as ‘input’ variables give a non-consistent DAE. No 10 12 13 15 Variable set Pin, Pout Pin, Fout Pout, Fin Fin, Fout Table 5.2. Low index input variables sets 103 Chapter 5 : Input Variables Assignment … Example 5.3. shows also that: 1. The causal or low index input variables set is not trivially given by all variables with indices “in” , e.g. {Fin , Pin } is not a causal input set for this model. 2. The causal or low index input variables set is not necessary to be unique 3. There are two variables, which may not be chosen as an input variable of the model namely: M or P , since it will give a high index DAE model. We call later these variables the “compelled internal variables” The notion of finding a low index input variables set of a given DAE model motivates us to make an algorithm to do this work. This will described in the section 5.3. Several definitions for model variable classification are given as follows, Consider a DAE model (1.3a), F ( z (t ), z (t ), t ) = 0 , is represented by S , with m equations and n variables z , where m < n and let Z = {zi : i = 1,2,..., n} . Further, let U = {all distinct low index input variables sets assignments of S} then we can define: Internal variables Definition 5.6. Internal variables An internal variable is a variable, which is derived from the state variables and/or external/input variables of a DAE model. Definition 5.7. Compelled internal variables A variable c ∈ Z is called a compelled internal variable if c ∉ U ∀ U ∈ U . Compelled internals are those variables that ensure the resulting DAE model to have a high index if chosen to be as input variables. These are in particular the state variables and all other variables that are as a function of state variables only, e.g. the intensive variables. Definition 5.8. Necessary input variables A variable u ∈ Z is called a necessary input variable if u ∈ U ∀ U ∈ U . In other words, necessary input variables are those variables that are elements of all low index assignments of an under determined DAE model. This variable is externally acting independently to the system. Definition 5.9. Optional input variables A variable is called an optional input variable if it is neither necessary, nor compelled, nor internal variable. This variable can act externally independent on the system. Definition 5.10. Output variables For a given fully determined DAE model, any variable zi ∈ Z can be chosen as an output of the model. 104 Chapter 5 : Input Variables Assignment … 5.3. Low index input variables assignment 5.3.1. Finding a low index input variables set The next proposition is used for finding a low index input assignment for the given DAE model using the Structural Low Index Criterion developed in Chapter 3, Corollary 3.10. The implementation of finding a low index input assignment is by using the Lemma B.1 and Lemma B.2 as given in Appendix B. Proposition 5.11. A low index input assignment of a DAE model Consider an underdetermined DAE model (1.3a) F ( z (t ), z (t ), t ) = 0 or it can be written in its system matrix equation: ⎡⎣ Es − A⎤⎦ z = 0 , where E , A ∈ R m×n , m < n . We can extend this underdetermined system matrix, such that the new system matrix is given as: ⎡ Es − A 0 ⎤ T (s) = ⎢ ⎥ K⎦ ⎣ In (5.4) where : T ( s ) ∈ R n*× n* ( s ), n* = m + n and the second row of T ( s) , I n K gives additional equations of the form: zi = ud1 + ud2 + + udm , i = 1,2,..., n ; the set these equations is denoted as F . Further ud1 , ud2 ,..., udm are m new dummy variables and K ∈ R n×m with struc K has no zero elements. Let T ( s) be structurally non-singular, and GT is the graph obtained from T ( s) as defined in Lemma B.2. The vertices of bipartite graph GT are V1 (GT ) = { f1 , f 2 ,..., f m ,..., f n , f n+1 , f n+m} and V2 (GT ) = {z1 , z2 ,..., zn , ud1 , ud2 ,..., udm } . Let M MW be the result of a Maximum Weighted Matching algorithm on GT . Further let GE be the graph obtained from E as defined in Lemma B.1 and let M MC be the result of a Maximum Cardinality Matching algorithm on GE . Then each M MW gives rise to a low index input variables set assignment U ( M MW ) , l q U( M MW ) = zi : ∃( f m+i , zi ) ∈ M MW , i = 1,.., n with W ( MW ) = M MC (see Lemma B.1 and Lemma B.2). (5.5a) (5.5b) Note: Since T ( s) is structurally non-singular it follows that M MW = m + n , and hence there exists a permutation σ ∈Γ , such that ( f i , zσ i ) ∈ M MW . 105 Chapter 5 : Input Variables Assignment … Let F is the new n equations set forms by zi = ud1 + ud2 + + udm , i = 1,2,..., n . For each M MW found, a set of exactly m matched edges of vertices FD ⊂ F = { f n +1, f n + 2 ,..., f n + m } ⊂ V1 (GT ) with all m vertices of D = {ud1 , ud2 ,..., udm } ⊂ V2 (GT ) which can be removed, since D = {ud1 , ud2 ,..., udm } ⊂ V2 (GT ) are only dummy variables. So, if we delete all edges corresponding to FD . The remaining k = n − m equations vertices FUD = F ⊃ FD are matched with k variables of zi which can be assigned as input variables. Since the removed edges FD had zero weight, the remaining edges still have a maximum weighted matching. This gives a low index input variables set assignment with W ( MW ) = M MC (see Lemma B.1 and Lemma B.2). The original underdetermined DAE model and the found low index input assignment can be represented as (5.3): LMT~(s)OPz = F 0 I MN μ PQ GH u JK T i (5.3) i Example 5.4. Consider an under determinated DAE model: z1 = − z1 + z2 − z3 z2 = − z2 + z5 (5.6) 0 = z2 + z4 + z5 With 3 equations and 5 variables z1 , z2 , z3 , z4 , z5 . Two of these variables must be assigned as input variables. To detect a low index input variables set assignment, we construct additional equations with additional dummy variables given as follows (see Proposition 5.11): f1: z1 = − z1 + z2 − z3 f 2 : z2 = − z2 + z5 f 3:0 = z2 + z4 + z5 f 4 : z1 = ud1 + ud2 + ud3 f 5: z2 = ud1 + ud2 + ud3 f 6: z3 = ud1 + ud2 + ud3 f 7 : z4 = ud1 + ud2 + ud3 f 8: z5 = ud1 + ud2 + ud3 The system matrix of this DAE model can be written as (see (5.4)): 106 (5.7) Chapter 5 : Input Variables Assignment … ⎡s + 1 ⎢ 0 ⎢ ⎢ 0 ⎢ 1 T (s) = ⎢ ⎢ 0 ⎢ ⎢ 0 ⎢ 0 ⎢ ⎣ 0 −1 1 0 0 0 0 s +1 0 0 −1 0 0 −1 0 −1 −1 0 0 0 0 0 0 −1 −1 1 0 0 0 −1 −1 0 1 0 0 −1 −1 0 0 1 0 −1 −1 0 0 0 1 −1 −1 0⎤ ⎥ ⎥ 0⎥ ⎥ −1 ⎥ −1⎥ ⎥ −1⎥ −1⎥ ⎥ −1⎦ 0 (5.8) To find a low index input variables set of this DAE from equations (5.7) or the system matrix (5.8), we can construct the graph of the DAE with its edges ( f i , zi ),( f i , udi ) , as shown in the figure 5.6. The thick lines are a result of maximum weighted matching. The value “1” on the edges are the weighted edges, other edges are zero weighted. 1 z1 f1 f2 1 z2 f3 z3 f4 z4 f5 z5 f6 ud1 f7 ud2 f8 ud3 Figure 5.6. A maximum weighted matching graph of the DAE (5.8) From a maximum weighted matching graph figure 5.6 of DAE (5.6, 5.7) and following the Proposition 5.11, the equations FD = { f 4 , f5 , f 7 } matched to vertices ud1 , ud2 , ud3 can be removed. The variables z3 , z5 can be chosen as input variables. Since the cardinality of maximum cardinality matching of matrix E is two and the weight of maximum weighted matching of (5.8) is also two, then following Corollary 3.10 this input variables set is a low index input assignment. The DAE (5.7) can be written as a consistent and fully determined low index DAE: 107 Chapter 5 : Input Variables Assignment … z1 = − z1 + z2 − z3 z2 = − z2 + z5 0 = z2 + z4 + z5 z3 = u1 (t ) z5 = u2 (t ) (5.9) Another maximum weighted matching graph of DAE (5.7) can be found and result in a consistent and fully determined low index DAE of (5.7) is: z1 = − z1 + z2 − z3 z2 = − z2 + z5 0 = z2 + z4 + z5 z3 = u1 (t ) (5.10) z4 = u2 (t ) In this example 5.4 shows that there are two sets of the low index input assignment for this model, namely: U1 = {z3 = u (t ), z5 = u (t )} and U 2 = {z3 = u (t ), z4 = u (t )} or set of all low index input variables sets is U = {{z3 , z5 },{z3 , z4 }} . 5.3.2. Finding the necessary input variables To find the set of all low index assignments, we need the notion of the necessary input variables as defined in section 5.2.2 (Definition 5.8). Clearly that all necessary inputs following the are elements of U( M MW ) = zi : ∃( f m+i , zi ) ∈ M MW , i = 1,.., n Proposition 5.11. l q We can check for each u ∈U whether it is a necessary input or not by deleting the corresponding equation from I n K of (5.4) and removing one of the introduced dummy variables. This gives new matrix: T * ( s) = LMsE − A NI n −1 0 K* OP Q (5.11) where K * ∈ R ( n −1)×( m −1) and the dummy variable set is {ud1 , ud2 ,..., udm−1 } . If no new maximum weighted matching can be found for the graph of T * ( s) with a maximum cardinality matching of E then the deleted variable, which was assigned as an input variable, is a necessary input. 108 Chapter 5 : Input Variables Assignment … Example 5.5. Consider the DAE from example 5.4, f1: z1 = − z1 + z2 − z3 f 2 : z2 = − z2 + z5 f 3:0 = z2 + z4 + z5 f 4 : z1 = ud1 + ud2 + ud3 f 5: z2 = ud1 + ud2 + ud3 (5.7) f 6: z3 = ud1 + ud2 + ud3 f 7 : z4 = ud1 + ud2 + ud3 f 8: z5 = ud1 + ud2 + ud3 We found that a low index input assignment set for this DAE is U1 = {z3 = u1 (t ), z5 = u2 (t )} . To check whether z5 = u2 (t ) is a necessary input, then we delete the equation f 8 and the dummy variable ud3 to get: f1: z1 = − z1 + z2 − z3 f 2 : z2 = − z2 + z5 f 3:0 = z2 + z4 + z5 f 4 : z1 = ud1 + ud2 (5.12) f 5: z2 = ud1 + ud2 f 6: z3 = ud1 + ud2 f 7 : z4 = ud1 + ud2 The graph for this new set DAE (5.12) and the found maximum weighted matching with the maximum cardinality matching of its E matrix is given in the figure 5.7. From a maximum weighted matching graph figure 5.7 of the DAE (5.12) and following Proposition 5.11, the equations FD = { f 4 , f 5} matched to vertices ud1 , ud2 can be removed and the variables z3 , z4 can be chosen as input variables. In this example we see that z5 = u2 (t ) is not a necessary input variable. Further we can show that z3 = u1 (t ) is a necessary input variable, since no maximum weighted matching with maximum cardinality of its state variable (matrix E ) can be found through deletion of equation f 6 and removing one dummy variable ud3 from the DAE (5.7). Remarks: To do a necessary input variable check, we have to start from complete T ( s) for each u ∈U 109 Chapter 5 : Input Variables Assignment … f1 1 f2 1 z1 z2 f3 z3 f4 z4 f5 z5 f6 ud1 f7 ud2 Figure 5.7.Maximum weighted matching graph of the DAE (5.12) 5.3.3. Finding the compelled internal variables To check if zi is a compelled internal variable, we search a maximum weighting matching with the maximum cardinality of its matrix E of the graph of T ( s) with zi as input variable. If a match cannot be found, then zi is a compelled internal, else it is not. Note: zi = u(t ) , u(t ) is not a variable of DAE, but an external chosen value. Therefore this equation has only one vertex zi . Example 5.6. Consider the DAE of the example 5.4: f1: z1 = − z1 + z2 − z3 f 2 : z2 = − z2 + z5 f 3:0 = z2 + z4 + z5 (5.6) Suppose we will examine whether z1 is a compelled internal or not, then we examine a maximum weighted matching for z1 = u(t ) , the DAE with additional new dummy variables are given as follows: 110 Chapter 5 : Input Variables Assignment … f1: z1 = − z1 + z2 − z3 f 2 : z2 = − z2 + z5 f 3:0 = z2 + z4 + z5 f 4 : z1 = u(t ) f 5: z2 = ud1 + ud2 + ud3 (5.13) f 6: z3 = ud1 + ud2 + ud3 f 7 : z4 = ud1 + ud2 + ud3 f 8: z5 = ud1 + ud2 + ud3 where the equation f 4 is only connected to the variable z1 , i.e. z1 = u1 (t ) to be chosen as an input variable (see figure 5.8). The resulting maximum weighted matching graph is given in the figure 5.8. The found input variables are z1 = u1 (t ), z5 = u2 (t ) and the weight of this maximum weighted matching is one. Since the cardinality of the maximum cardinality matching of its matrix E is two. Then this matching is not a low index assignment, thus the variable z1 is a compelled internal variable. f1 f2 z1 1 z2 f3 z3 f4 z4 f5 z5 f6 ud1 f7 ud2 f8 ud3 Figure 5.8. a maximum weighted matching of the DAE (5.13) 111 Chapter 5 : Input Variables Assignment … 5.3.4. Finding all low index input variables assignments In section 5.3.2.we have shown how to find the necessary input variables. Let’s call the set of all necessary input variables as U N0 . This set of the necessary input variables is a sub set of any found low index input assignment, i.e.: U N0 ⊆ U( M MW ) . This means to find all low index input assignment we need to find all optional (low index) input variables, which can be done in the following: Proposition 5.12. : Finding all low index input assignment Consider an underdetermined DAE model (1.3a): S: F ( z (t ), z (t ), t ) = 0 with m equations and n variables, m < n . Suppose with the Proposition 5.11, we can find a set of k = n − m low index input variables U0 ( M MW ) , where k1 ≤ k of these input variables are the necessary input variables, given with the set U N0 ⊆ U0 ( M MW ) , e.g.: {zi = ui (t ), zi +1 = ui +1 (t ),..., zi + k1 = ui + k1 (t )} . The remaining found input variables are optional input variables belongs to the matching U0 ( M MW ) is denoted as U O0 = U 0 ( M MW ) \ U N0 . To find all optional input variables for the low index input variables sets of the DAE (1.3a), we construct an search branch algorithm, as follows: 1. A subsequence finding new low index input assignment with setting one of the optional input variables as an input variable: F ( z (t ), z (t ), t ) = 0 with m equations and Consider an undetermined DAE set: S : n variables, m < n . This DAE S becomes fully determined by having a low index input assignment U 0 = U N0 ∪ U O0 with the number of elements of U N0 is k1 . When UO0 ≠ ∅ then we can make an underdetermined DAE: S1* : F ( z (t ), z (t ), t ) = 0 ∪ { zi = ui (t ), i = 1,..., k1} ∪ z j = u j (t ), z j ∈ UO0 zi ∈U N0 (5.14) The equations set (5.14) consists of m + k1 +1 equations with n variables. Let UC1 = {zi = u(t ), i = 1,... k1 , zi ∈ U N0} ∪ z j ∈ UO0 be the set of chosen input variables for new branch DAE S1 and further we can extend S1* with n − ( k1 + 1) new equations of the remaining variables, where each of this equation is given as, zk = m ∑u i =1 are dummy variables, such that we can reconstruct: 112 di , udi Chapter 5 : Input Variables Assignment … ⎡ Es − A T (s) = ⎢ ⎣⎢ I n − ( k1 +1) 0⎤ ⎥ K ⎦⎥ and apply Proposition 5.11 to find a new low index input assignment set U1* consists of l1 = (n − m) − ( k1 + 1) variables. The complete low index input variables assignment for S1 is U1 = UC1 ∪ U1* . We can perform test on this branch S1 which elements of U1 are necessary input variables or optional input variables due to the choice of U C1 as a subset of U1 , i.e. U1 = U N1 ∪ U O1 . The same procedure of finding new low index assignment for the next branch can be applied, using information from U N1 , UO1 and so on. Therefore we called this method as the subsequence finding new low index input assignment with setting one of the optional input variables from the previous branch as an input variable.. 2. A subsequence finding new low index input assignment with setting one of the optional input variables, chosen on the other branch, as an internal variable F ( z (t ), z (t ), t ) = 0 with m equations and Consider an undetermined DAE set: S : n variables, m < n . This DAE S becomes fully determined by having a low index input assignment U 0 = U N0 ∪ U O0 with the number of elements of U N0 is k1 . When UO0 ≠ ∅ then we can make an underdetermined DAE: ∪ { zi = ui (t ), i = 1,..., k1} S2* : F ( z (t ), z (t ), t ) = 0 zi ∈U N0 \ z j = u j (t ), z j ∈ U O0 (5.15) The equations set (5.15) consists of m + k1 equations with n variables, further we can construct: ⎡ Es − A 0 ⎤ T (s) = ⎢ ⎥ ⎣⎢ I n − k1 K ⎥⎦ where on the second row of T ( s) , i.e. I n− k1 K , are the equations of remaining n − k1 variables (which are not chosen as input variables) as functions of dummy variables, i.e. zk = m ∑u i =1 di . Since the variable z j must be excluded to be an input variable (chosen to be an internal variable), then we need to delete the corresponding equation of z j on the I n− k1 K and removing one dummy variable, gives: 113 Chapter 5 : Input Variables Assignment … ⎡ Es − A T * (s) = ⎢ ⎢⎣ I n − k1 −1 where K * ∈ R 0 ⎤ ⎥ K * ⎥⎦ ( n − k1 −1)×( m −1) and the dummy variable set is {ud1 , ud2 ,..., udm−1 } . Applying Proposition 5.11 to find a new low index input assignment set U*2 consists of l2 = (n − m) − k1 variables for S2 . Let U C2 = {zi = ui (t ), i = 1,...k1 , zi ∈ U N0 } be the set of chosen input variables for new branch DAE S2 , then the complete low index input assignment for S2 is U 2 = UC2 ∪ U*2 . Moreover we can perform a test on this branch S2 which elements of U 2 are necessary input variables or optional input variables, i.e. U2 = U N2 ∪ UO2 . Also from this branch if U O2 ≠ ∅ , then the same procedure of finding new low index assignment for the next branch can be applied, using information from U N2 , UO2 and so on. Therefore we called this method as the subsequence finding new low index input assignment with setting one of the optional input variables from the previous branch as an internal variable. Each step when its optional input set is not empty will create two branches and finding new low index input assignment with one branch performs (1) and the other branch performs (2) as described above. This method to find all low index input assignment sets of a DAE model is implemented by Y.G.G.J. Go [48] in DIAG as an extension of the graph algorithm of Bujakiewics [21]. Example 5.7: Consider the following underdetermined DAE, 3 equations with 6 variables: S : z1 = − z1 + z2 − z3 z2 = − z2 + z5 + z6 0 = z2 + z4 + z6 (5.16) DIAG gives the following family tree of the DAE with low index assignments: 114 Chapter 5 : Input Variables Assignment … S0 S1 S11 S2 S12 Level 1 Level 2 Figure 5.9. where: a. S0 = S ∪ U N0 = {z3 = u(t )} ∪ UO0 = {z4 = u(t ), z5 = u(t )} Level 1: b. S1 = S ∪ ( U N0 = {z3 = u(t )}) ∪ {z4 = u(t )} ∪ {z5 = u(t )} , where {z3 = u(t )} ∪ {z4 = u(t )} are set as the input variables of S1 and {z5 = u(t )} is found by finding a low index assignment (as described above in Proposition 5.12). Testing on the found additional input variable set {z5 = u(t )} gives the result that this variable is an optional input for S1 , i.e. U O1 = {z5} . c. S2 = S ∪ ( U N0 = {z3 = u(t )}) ∪ {z5 = u(t ), z6 = u(t )} {z3 = u(t )} is set as the necessary input variable of S2 and {z5 = u(t ), z6 = u(t )} is found by finding a low index assignment, with a requirement that the z4 becomes an internal variable of S2 . Testing on the found additional input variables {z5 = u(t ), z6 = u(t )} gives the result that these variables are necessary input variables for S2 . Thus the optional input variable set of S2 , U O2 = ∅ . Thus S2 is an where end node. Level 2: d. S11 = S ∪ {z3 = u(t ), z4 = u(t )} ∪ {z5 = u(t )} where {z3 = u(t )} ∪ {z4 = u(t )} is already set as an input variable from the previous node S1 and {z5 = u(t )} is an additional setting of an input variable from the optional input set of S1 . Since the node S1 has only one element of optional input variable then S11 is an end node. 115 Chapter 5 : Input Variables Assignment … e. S12 = S ∪ {z3 = u(t ), z4 = u(t )} ∪ {z6 = u(t )} where {z3 = u(t )} ∪ {z4 = u(t )} is already set as an input variable from the previous node S1 and {z5 = u(t )} is the input variable {z6 = u(t )} is found by a low index assignment, with a requirement that the z5 becomes an internal variable of S12 . This node is also an end node. Collecting all low index input assignments for the DAE S from the end nodes, gives the following sets: U2 = {z3 , z5 , z6} U11 = {z3 , z4 , z5} U12 = {z3 , z4 , z6} The searching algorithm implemented on DIAG will remedy any possible combination of input variables resulting in a high index structure (when in the DAE model there is no constraining states equations), even the DAE model has only optional input variables, i.e. the necessary input variables set U N0 = ∅ , the following example 5.8 shows this case. Example 5.8: Consider an underdetermined DAE model, with 3 equations and 5 variables: z1 = − z1 + z2 + z3 0 = z1 − z2 + z3 − z5 0 = z1 + z2 − z4 (5.17) DIAG found the following 5 low index input assignments: U = {{z3 , z4 },{z3 , z4 },{z3 , z5},{z5 , z2 },{z5 , z4 }} None of these input variables are a necessary input variable, but none of the found sets give {z2 , z4 } as a low index input assignment, since this will lead to a high index model. 5.3.5. Example: finding low index input assignments of a binary tray distillation column model In this section we will demonstrate the application for finding all low index input assignments using the tray model presented in Chapter 4. The DIAG algorithm needs only the structural information of the model, namely: the equation number and the 116 Chapter 5 : Input Variables Assignment … variables on the corresponding equation. The operator “$” is used to replace d (.) in dt the original DAE equation. This is to give the weight “1” for the maximum weighted matching of the graph of the DAE model. A binary tray distillation column model Consider the behavioural equations of a binary tray distillation column model consist of the equations (4.69, 4.71, 4.73, 4.74, 4.51 – 4.68, 4.41, 4.42). In this case, for binary components, the equation (4.69) consists of two component balance equations. The equations (4.70) and (4.72) are removed, since the variables N i , L , E L ,exc are vanish from the outputs of the model. The structural information of these equations is written as: Input file (structural information): .eqn f1 .eqn f 2 .eqn f3 .eqn f 4 .eqn f5 = {$M1, M ,Lin ,x1,in ,Vin ,y1,in ,Lout ,x1,out ,Vout ,y1,out } = {$M 2, M ,Lin ,x2,in ,Vin ,y2,in ,Lout ,x2,out ,Vout ,y2,out } = {$ EM ,Lin ,hl ,in ,Vin ,hv,in ,Lout ,hl ,out ,Vout ,hv,out } = {M1,M , M1, L , M1,V } = {M 2,M , M 2, L , M 2,V } .eqn .eqn .eqn .eqn .eqn = {EM , EL , EV } = {M L , M1, L , M 2, L } = {MV , M1,V , M 2,V } = {M1,L , M L , x1, out } = {M 2,L , M L , x2, out } f6 f7 f8 f9 f10 . eqn f 11 . eqn f 12 . eqn f 13 . eqn f 14 . eqn f 15 . eqn f 16 . eqn f 17 . eqn f 18 . eqn f 19 . eqn f 20 . eqn f 21 . eqn f 22 . eqn f 23 . eqn f 24 . eqn f 25 . eqn f 26 . eqn f 27 . eqn f 28 . eqn f 29 = = = = = = = = = = = = = = = = = = = { M 1,V , M V , y1,out } { M 2 ,V , M V , y 2 ,out } {E L , M L , hl ,out , P,V L } {EV , M V , hv ,out , P,VV } { M L , ρ L ,V L } {V L , Z L } { M V , ρ V ,VV } {V L ,VV } { Pv ,out , P} { Pl ,out , P} { Lout , Z L } {Vin , P , Pv ,in , Z L } {ρ L , Tl ,out , Pl ,out , x1,out , x 2 ,out } {ρ V , Tv ,out , Pv ,out , y1,out , y 2 ,out } {hl ,out , Tl ,out , Pl ,out , x1,out , x 2 ,out } {hv ,out , Tv ,out , Pv ,out , y1,out , y 2 ,out } {x1,out , x 2 ,out , y1,out , y 2 ,out , Tv ,out , P} {x1,out , x 2 ,out , y1,out , y 2 ,out , Tv ,out , P} {Tv ,out , Tl ,out } and the output of algorithm for finding low index assignment is as follows: 117 Chapter 5 : Input Variables Assignment … OUTPUT Problem name Number of set variables Number of unknowns Number of equations = tray.dgn =0 = 38 = 29 Degree of freedom =9 Structurally consistent? Yes Structural rank E = 3 Structural order (dyn.degree of freedom) = 3 Structural index Low Low index input assignment: Assignment [1]: Lin ,Vout , x1,in , x2 ,in , y1,in , y2 ,in , hl ,in , hv ,in , Pv ,in Assignment [2]: Lin ,Vout , x1,in , x2 ,in , y1,in , y2 ,in , hl ,in , hv ,in ,Vin Necessary input variables: Lin , Vout , x1,in , x2,in , y1,in , y2,in , hl ,in , hv,in Compelled internal variables: M1, M , M 2 , M , M1, L , M1,V , M 2 , L , M 2 ,V , M L , MV , E L , EV , E M , x1,out , x2 ,out , y1,out , y2 ,out , VL ,VV , Z L , ρ L , ρV , P , Pl ,out , Pv ,out , hl ,out , hv ,out , Tl ,out , Tv ,out , Lout Optional input variables: Pv,in , Vin A wrong choice of input variables for this binary tray distillation column model will result to a high index model. An example of a such input variables set is: Lin , Pv,out , x1,in , x2,in , y1,in , y2,in , hl ,in , hv,in , Pv,in . The high index model is caused due to the choice of Pv,out as an input variable. 5.4. Maximum dynamic degree input variables assignment 5.4.1. Finding maximum degree input variables assignment In case the given DAE model has constraining state equations (a high index structure) then there is no possibility of finding a low index input assignment. In such DAE model structure, we define the following: Definition 5.13. A maximum dynamic degree input assignment Given a DAE model (1.3a): F ( z (t ), z (t ), t ) = 0 with m equations and n variables z , if the set of k = m − n variables can be set as external independent time functions variables where the resulting DAE is consistent and has a maximum dynamic degree of freedom, then these k variables are called a maximum dynamic degree assignment for the given DAE. 118 Chapter 5 : Input Variables Assignment … Hence, it follows that: Corollary 5.14. A low index input assignment is a maximum dynamic degree assignment, i.e. if the low index criterion for the found input assignment is satisfied. Further we define a constraining state equations set as follows: Definition 5.15. A constraining state equations set A constraining state equations set is a subset of equations in the DAE model by which the state variables are constrained, i.e. the DAE model has always a high index structure for any choice of maximum dynamic degree input variables set. From definition 5.15, we can say, Proposition 5.16. If a DAE model has a constraining equations set, then this equations set is invariant for any maximum dynamic degree input variables assignment. The detection of a maximum dynamic degree assignment is quite similar with the detection method to find a low index input assignment. The difference is only that the low index criterion is not included. This gives by the following: Proposition 5.17. A maximum dynamic degree input assignment Consider an underdetermined DAE model (1.3a) F ( z (t ), z (t ), t ) = 0 or can be written as ⎡⎣ Es − A⎤⎦ z = 0 , where E , A ∈ R m×n , m < n . Let we can extend this underdetermined system matrix, such that the new system matrix is given as: ⎡ Es − A 0 ⎤ T (s) = ⎢ ⎥ K⎦ ⎣ In where : T ( s ) ∈ R n*× n* ( s ), n* = m + n and the second row of T ( s) , I n additional equations of the form: zi = ud1 + ud2 + K gives + udm , i = 1,2,..., n ; the set these equations is denoted as F . Further ud1 , ud2 ,..., udm are m new dummy variables and K ∈ R n×m with struc K has no zero elements. Let T ( s) be structurally non-singular, and GT is the graph obtained from T ( s) as defined in Lemma B.2. The vertices of bipartite graph GT are V1 (GT ) = { f1 , f 2 ,..., f m ,..., f n , f n+1 , f n+m} and V2 (GT ) = {z1 , z2 ,..., zn , ud1 , ud2 ,..., udm } . Let M MW is the result of a Maximum Weighted Matching algorithm on GT , then each M MW gives rise to a maximum dynamic degree input assignment: l q U md ( M MW ) = zi : ∃( f m+i , zi ) ∈ M MW , i = 1,.., n (5.18a) 119 Chapter 5 : Input Variables Assignment … with W ( MW ) = max i ,i =1,..., M MC { M MC − i} (5.18b) The method to find all maximum degree input assignments for a DAE model having constraining equations is also quite analogue with the method for finding all low index input assignments. Again the difference is only the criterion used; for finding all maximum dynamic degree input assignments, we used the maximum weighted matching criterion (5.18a, 5.18b). Example 5.9: Consider the following DAE model: f1 : z1 = − x1 + x2 − x3 + x5 f 2 : z2 = − x2 − x4 − x7 f3 : z3 = x2 − x3 + x4 + x6 f 4 : 0 = x1 − z1 (5.19) f5 : 0 = x2 − z2 f 6 : 0 = x3 − z3 f7 : 0 = x1 + x2 f8 : 0 = x1 + x3 + x7 f9 : 0 = x7 + x8 − x9 This DAE model consists of 9 equations ( f1, f 2 ,..., f9 ) and 12 unknowns ( z1, z2 , z3 , x1, x2 , x3 ,..., x9 ) . There are 3 variables that must be assigned as input variables of the model. Finding input variables give the following result: OUTPUT Problem name Number of set variables Number of unknowns Number of equations = example.dgn =0 = 12 =9 Degree of freedom =3 Structurally consistent? Yes Structural rank E =3 Structural order (dyn.degree of freedom) = 2 Structural index High Index Maximum dynamic degree input assignment: Assignment [1]: x6 , x4 , x8 120 Chapter 5 : Input Variables Assignment … Assignment [2]: x6 , x4 , x9 Assignment [3]: x6 , x5 , x8 Assignment [4]: x6 , x5 , x9 With these 4 maximum dynamic degree input assignments, we will analyse the struc( Es − A) and struc( Es − A) −1 . Figure (a) shows the struc( Es − A) for input assignment [1]: x6 , x4 , x8 , figure (b) for input assignment [2]: x6 , x4 , x9 , figure (c) for input assignment [3]: x6 , x5 , x8 and figure (d) for input assignment [4]: x6 , x5 , x9 . struc( Es − A) = z1 z2 z3 x1 x2 x3 x5 x7 x9 z1 z2 z3 x1 x2 x3 x5 x7 x8 s o o 1 o o o o o o s o o 1 o o o o o o s o o 1 o o o 1 o o 1 o o 1 1 o 1 1 1 o 1 o 1 o o 1 o 1 o o 1 o 1 o 1 o o o o o o o o o 1 o o o o o 1 1 o o o o o o o o 1 s o o 1 o o o o o o s o o 1 o o o o o o s o o 1 o o o 1 o o 1 o o 1 1 o 1 1 1 o 1 o 1 o o 1 o 1 o o 1 o 1 o 1 o o o o o o o o o 1 o o o o o 1 1 o o o o o o o o 1 (a) (b) z1 z2 z3 x1 x2 x3 x4 x7 s o o 1 o o o o o o s o o 1 o o o o o o s o o 1 o o o 1 o o 1 o o 1 1 o 1 1 1 o 1 o 1 o o 1 o 1 o o 1 o 1 o o 1 1 o o o o o o o 1 o o o o o 1 1 x9 o o o o o o o o 1 z1 z2 z3 x1 x2 x3 x4 x7 s o o 1 o o o o o o s o o 1 o o o o o o s o o 1 o o o 1 o o 1 o o 1 1 o 1 1 1 o 1 o 1 o o 1 o 1 o o 1 o 1 o o 1 1 o o o o o o o 1 o o o o o 1 1 (c) Figure 5.10. struc( Es − A) of the example 5.9. x8 o o o o o o o o 1 (d) The figures (5.10a) and (5.10b) show struc( Es − A) −1 , where for input assignment [1] and [2] is represented by the figure (5.11a), since they have the same structure of 121 Chapter 5 : Input Variables Assignment … struc( Es − A) and the same case for input assignment [3] and [4] is represented by the figure (5.11b). From figure (5.11) we can see that for any maximum dynamic degree input assignment the equations need to be differentiated (or constraining state equations) to perform a high index reduction is invariant, namely the 4th, 5th and 7th equations, given on the power of s on the 4th, 5th and 7th column of the matrix struc( Es − A) −1 . struc( Es − A) −1 = z1 z2 z3 x1 o s -1 s -2 1 x2 1 x3 s −1 x5 x7 1 x9 (or x8 ) s -1 o z1 z2 z3 x1 x2 x3 x4 x7 x9 (or x8 ) s -1 s -2 s -2 s -1 s -1 s −1 s -1 s -2 o o s -1 s -2 o s −1 s -1 s -1 s −1 o s -1 s -2 s -2 1 1 o s -2 s -1 o s −1 s −1 s -2 s -2 o s -1 s -1 s -1 1 1 s −1 o s -1 s -2 o 1 s -1 s -1 o s -1 s -2 s -2 1 s -1 s -1 s -1 s -2 o o s −1 s -2 o 1 s -1 s -1 s -1 o s -1 s −2 s -2 1 s -1 s -1 1 s -2 o o s -2 s −1 o s -1 1 s -2 s -2 o s -1 s -1 s −1 1 1 1 1 s -1 o 1 1 1 s -1 1 s −2 o 1 s -1 o s -1 s s 1 s 1 o 1 s -1 s s 1 s 1 o o s -1 s -1 o 1 1 1 1 o s -1 s -1 s -1 1 1 1 1 1 o o s -1 s -1 o 1 1 1 1 1 s -1 s -1 s -1 1 1 1 1 1 1 (a) 1 (b) Figure 5.11. struc( Es − A) −1 of the example 5.9. Moreover if we suppress x4 to be an input variable, but as an internal model variable, then the maximum dynamic degree input assignments are only given by the assignment [3] and assignment [4]. For these assignments the information of matrix struc( Es − A) shows a structurally singularity of variable x4 on the lower right part, as given in the figure (5.12). On such structure it is possible to do a high index reduction through variable differentiation, as described in Chapter 2, if the variable x4 is not interested as an output variable of the model. 122 Chapter 5 : Input Variables Assignment … struc( Es − A) = z1 z2 z3 x1 x2 x3 s o o 1 o o o o o o s o o 1 o o o o o o s o o 1 o o o 1 o o 1 o o 1 1 o 1 1 1 o 1 o 1 o o 1 o 1 o o 1 o 1 o x4 o 1 1 o o o o o o x7 o 1 o o o o o 1 1 x8 (or x9 ) o o o o o o o o 1 Structurally singular variable Figure 5.12. Structural singular variable detection of example 5.9 5.4.2. Example: finding maximum dynamic degree input assignments for a steam reformer model In this section we will demonstrate the application of DIAG for finding maximum degree input assignments using the high index methane steam reforming reactor model presented in Chapter 4. The presented description is as exactly as the input file to DIAG, namely only the equation numbers and the structural information of these equations and the operator “$” is used to replace d (.) . A high index methane steamdt reforming reactor model is given by the equations (5.4 – 5.21, 5.1c, 5.2b). The structural analysis for input variables detection using DIAG gives the following result: OUTPUT Problem name Number of set variables Number of unknowns Number of equations = methsteam.dgn =0 = 30 = 20 Degree of freedom = 10 Structurally consistent? Yes Structural rank E =6 Structural order (dyn.deg. of freedom) = 5 Structural index: High Index Maximum dynamic degree input assignment: Assignment [1]: xCH4 ,in , xCO ,in , xCO2 ,in , xH2 ,in , xH2O ,in , hin , Qadd , Qloss , Fin , Fout Assignment [2]: xCH4 ,in , xCO ,in , xCO2 ,in , xH2 ,in , xH2O ,in , hin , Qadd , Qloss , Fin , Pout Assignment [3]: xCH4 ,in , xCO ,in , xCO2 ,in , xH2 ,in , xH2O ,in , hin , Qadd , Qloss , Fout , Pin Assignment [4]: xCH4 ,in , xCO ,in , xCO2 ,in , xH2 ,in , xH2O ,in , hin , Qadd , Qloss , Pin , Pout 123 Chapter 5 : Input Variables Assignment … Assignment [5]: xCH4 ,in , xCO ,in , xCO2 ,in , xH2 ,in , xH2O ,in , hin , Qadd , Qloss , Fin , rshift Assignment [6]: xCH4 ,in , xCO ,in , xCO2 ,in , x H2 ,in , x H2O ,in , hin , Qadd , Qloss , rshift , Pout Assignment [7]: xCH4 ,in , xCO ,in , xCO2 ,in , x H2 ,in , x H2O ,in , hin , Qadd , Qloss , Fout , rshift Assignment [8]: xCH4 ,in , xCO ,in , xCO2 ,in , xH2 ,in , xH2O ,in , hin , Qadd , Qloss , Pin , rshift If we suppress the variable rshift as an input variable of the model then we have 4 maximum dynamic degree input assignments [1 – 4]. Suppose we choose input assignment [2]. The struc( Es − A) is given in the figure (5.13). Here we can see that there is structural singularity on the rshift . This structural singularity is invariant for input assignment [1 – 4]. This means that we are able to perform column / variable differentiation for a index reduction if the variable rshift is not interested as a model output (see Chapter 4). Moreover the struc( Es − A) −1 is given on the figure (5.14), where the constraining states are detected on the 7th to 16th and 20th equations, which are analogue as detected with input assignment [4] used as the example in Chapter 4. 124 Chapter 5 : Input Variables Assignment … struc( Es − A) = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 s o o o o o 2 o s o o o o 3 o o s o o o 4 o o o s o o 1 o o o o o 1 o o o o o o 1 o 1 o o o o 1 1 o o o o o 1 o o 1 o o o o 1 o o o o o 1 o o o 1 o o 1 1 o o o o o 1 o o o o s o o o o o 1 o o 1 1 o 1 o o o o o o o o o o o 1 1 o o o o o o o o o 1 o o o o o o 1 o o o o o o o 1 o o o o o o 1 o o o o o o 1 o o o o o o o 1 o o o o o 1 o o o o o o o o 1 o o o o 1 o o o o o o o o o 1 o o o 1 o o o o o o o o o o o o o o o 1 o 1 o o o o 1 o o o o o 1 1 1 o 1 o 1 1 o o o o o 1 o o 1 o 1 1 1 o o o o o o 1 1 1 1 1 1 o o o 1 o 1 o o o o o o o o o o o o o 1 1 o o o o o o o o o o o o 1 o 1 1 1 o 1 1 o 1 o o 1 o 1 o o o 1 1 1 1 o o o o 1 o o o o 5 o o o o s 6 o o o o o 7 1 1 1 1 1 8 1 o o o o 9 o 1 o o o o 10 o o 1 o o o 11 o o o 1 o o 12 o o o o 1 o 13 o o o o 14 o o o o 15 o o o o 16 o o o o 17 o o o o o o 18 o o o o o o 19 o o o o o o 20 o o o o o o Structurally singular variable Figure 5.13. struc( Es − A) of the methane steam reforming reactor Model variables: 1 = M CH4 ,2 = M CO ,3 = M CO2 ,4 = M H2 ,5 = M H2 O ,6 = E ,7 = xCH4 ,8 = xCO ,9 = xCO2 ,10 = x H2 , 11 = x H2 O ,12 = hout ,13 = rCH4 ,14 = rshift ,15 = M T ,16 = T ,17 = ρ ,18 = P,19 = Pin ,20 = Fout Input variables: xCH4 ,in , xCO ,in , xCO2 ,in , xH2 ,in , xH2O ,in , hin , Qadd , Qloss , Fin , Pout 125 Chapter 5 : Input Variables Assignment … struc( Es − A) −1 = 1 2 1 s −1 2 s −1 3 s −1 4 s −1 5 s −1 3 s −2 s −1 s −1 s −1 s −1 6 s −2 7 s −1 8 s −1 9 s −1 10 s −1 11 s −1 s −1 13 s −1 12 14 1 15 s −1 16 s −1 s −1 18 s −1 s −1 20 s −1 17 19 s −2 s −1 s −1 s −1 s −1 s −2 s −1 s −1 s −1 s −1 s −1 s −1 s −1 1 s −1 s −1 s −1 s −1 s −1 s −1 4 s −2 s −1 s −1 s −1 s −1 s −2 s −1 s −1 s −1 s −1 s −1 s −1 s −1 1 s −1 s −1 s −1 s −1 s −1 s −1 5 6 s −2 s −1 s −1 s −1 s −1 s −2 s −1 s −1 s −1 s −1 s −1 s −1 s −1 s s −1 s −1 s −1 s −1 s −1 8 11 12 13 14 15 −1 −1 −1 −1 −1 16 17 18 s −1 s −1 1 1 1 1 1 1 1 1 1 1 s −1 1 1 1 1 1 1 1 1 1 1 s −2 s −1 s −1 s −1 s −1 s −1 s −1 s −1 s −1 s −1 s −1 s −1 1 s −1 s −1 s −1 s −1 s −1 s −1 1 1 1 s s s 1 −1 s 1 −1 s −1 s 1 −1 1 −1 1 1 1 s s −1 1 1 1 s 1 1 1 1 s 1 1 1 1 1 1 1 1 1 s 1 1 1 1 s 1 1 −1 −1 −1 s s −1 10 −1 s −1 9 s 1 −1 7 −1 1 1 1 s 1 1 s −1 1 1 1 s 1 1 s −1 1 1 1 s −1 1 1 s −1 1 1 1 s −1 1 1 1 1 1 1 1 1 1 1 s −1 1 1 1 1 1 1 1 1 1 1 s −1 s −1 1 1 1 1 1 1 1 1 1 1 1 s −1 s −1 s −1 0 s −1 0 s −1 0 0 0 0 0 0 s s −1 1 s −1 1 s −1 1 s −1 1 s −1 s −2 s −1 s −1 1 s −1 s −1 1 s −1 1 s 0 s s −1 1 0 s −1 s −1 1 0 s −1 s −1 1 −1 s −1 1 1 1 1 1 1 1 1 0 s s s s s s s s s s s 0 s s −1 s −1 1 1 1 1 1 1 1 1 1 s −1 1 1 1 1 1 1 1 1 1 s −1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 s 0 s −1 0 s −1 s −1 1 0 s −1 s −1 1 1 1 s −1 s −1 1 s −1 1 1 1 1 1 0 1 s −1 1 s −1 1 1 Conclusions DAE model variables can be classified as the necessary input variables, the optional input variables, and the compelled internal variables. The input variables of a DAE model are determined by its internal DAE model equations. The input variables are those model variables that utilise the maximum dynamic degrees of the model and rise to causal input-output relations. A low index input variables set is causal input variables for a DAE model. The low index input variables set for a DAE model does not need to be a unique set. The constraining state equations within a DAE model are invariant for all possible input variables sets resulting in the maximum dynamic degree of freedom of the DAE model. 126 s −1 Figure 5.14. struc( Es − A) −1 of the methane steam reforming reactor 5.5. s −1 0 1 −1 s −1 1 s 20 −1 1 −1 19 −1 −1 Chapter 6: Interconnection of DAE models Interconnection of DAE sub models consist of the interconnected variables on the model ports and the model connectors. The interconnected variables can be a pair of bilaterally coupled variables or a non bilaterally coupled variables. The model connector is a linear equality equations. The interconnected variables of DAE sub models must be matched for the variable type, variable unit of measurement, and its directionality. A matched interconnection of low index DAE sub models resulting to a low index DAE model. ‘A connector has no behavioural description’ 6.1. Introduction Most kinds of modelling and simulation approaches for (complex) physical systems are done by interconnecting sub-models. This has several advantages: it is seen as a ‘natural’ modelling of interconnected sub systems of a physical process, it can re-use modular models of sub systems, and it may reduce the complexity of a physical modelling process. Although modularisation and interconnection between sub models have been implemented in different modelling and simulation software packages there are several essential different concepts about: what is a model connector and how to interconnect sub models. There are two views of the model connectors. Marquardt [89] defines a connector as a ‘fluxing’ relation (see figure 6.1). The definition of a connector as a ‘fluxing’ relation is analogue with the approach of the bilateral coupling of sub models (Breedveld [15,16]). In this approach a model connector is described with a behaviour equation, i.e. a fluxing relation. Another definition of a model connector, e.g. in Aspen [5], gProms [50] and Hysis [61], is given as an ‘equality’ relation. A model connector relates a variable from one sub model to the other variable from other sub model in an equality equation. Interconnection in several of the modelling and simulation tools require sub models with a fixed set of input and output variables, by which the sub models can be interconnected to each other, e.g. Simulink [113], and others not, e.g. Aspen [5], gProms [50], Hysis [61].The disadvantage of modelling with fixed input and output variables is the possibility of an unnecessary requirement to introduce a dynamic component between two interconnected sub models, i.e. when algebraic loops occur. The disadvantage of without knowing the matching of possible input and output variables of interconnected sub models is a potential arising of a high index problem due to interconnection. 127 Chapter 6 : Interconnection of DAE models Sub-system 1 x1 x2 φ1 φ2 Sub-system 2 state information flux information fluxing relation, φ1,2:=f(x1,x2) “......complementary to a device, a connection responds to state information with flux information.”(Marquardt [89]) Figure 6.1. Schematic representation of a fluxing connection (Marquardt [89]) Recently Aspen [5] and Hysis [61] applied a pressure and flow checker on the interconnection of sub models. The modeller should choose if the total model is a pressure driven or a flow driven. A pressure driven model means that the pressure will be an external/input variable specified outside the model boundary. A flow driven model means that the flow will be an external/input variable outside the model boundary. Aspen [5] and Hysis [61] provide a check through the interconnected sub models when the pressure and flow variables can be solved without pressure states constraint, i.e. the pressure variables on two interconnected sub models are not the compelled variables. This approach forms a part of the solution to avoid a high index problem on a pressure-flow interconnected sub models. Motivated by the different definitions of model connectors and the necessity to avoid a high index problem due to interconnection of sub models, this Chapter 6 will describe an approach for model connection definition and interconnection matching of sub systems. The goal is to get a match of interconnected structural low index sub models, where the resulting total model has a structurally low index. This Chapter is outlined as follows, section 6.2. describes some type of model ports and their variables classifications, section 6.3 gives a description of model connectors, section 6.4. gives aspects on interconnection of sub models, and section 6.5 gives some conclusions. 6.2. Process model ports 6.2.1. Process model ports A process model port or model (variables) connection is a model boundary where the chosen sub set of the model variables passes through this boundary to interact with its environment. A process model can have several model ports, where different groups of variables go through a model port. Figure 6.2 schematically shows a process model with several model ports. 128 Chapter 6 : Interconnection of DAE models Port 3 Po rt 4 Port 5 Port 1 2 rt o P Model Po rt 8 Port 7 6 rt o P Figure 6.2 Schematic model ports A model port can be classified into the physical domain of variables through this port. Example of such classifications are.: a) Material port, e.g. contains information of : material flow, material temperature, material pressure, material component fraction, material specific enthalpy. b) Mechanical port, e.g. contains information of : force, acceleration, velocity, position, torque, angular acceleration, angular velocity, angular position. c) Energy port, e.g. contains information of : power, heat flow, entropy flow, temperature. d) Information/signal port, e.g. contains information for the controller input and output variables. Moreover if necessary, each port can be indicated as an ‘inlet’ or ‘outlet’ port, e.g. an inlet material port, an outlet material port. Figure 6.3 schematically shows an example of a model with inlet and outlet material ports. Inlet material port Outlet material port Fin (mass flow inlet) Pin (pressure inlet) Tin (temperature inlet) Fout (mass flow outlet) Model hin (specific enthalpy inlet) Pout (pressure outlet) Tout (temperature outlet) hout (specific enthalpy outlet) Figure 6.3. Example of a model with inlet and outlet material ports 6.2.2. Model variables classifications on a model port Mathematically the variables through a model port can be distinguished into two classes (O.Bosgra [13], Breedveld [15, 16]), namely: a) pair bilaterally coupled variables b) non bilaterally coupled variables 129 Chapter 6 : Interconnection of DAE models The bilaterally coupled variables consist of a pair ‘flow (f)’ and ‘effort (e)’ quantities with different directionalities (i.e. one as input and other as output) through a model port. The non bilateral coupled variables do not form a pair of variables going through a model port. A model port can consist of a pair of bilaterally coupled variables only or non bilaterally coupled variables only or a combination of both type of variables. Table 6.1 shows the possible pairs of ‘flow (f)’ and ‘effort (e)’ for different physical domains, adopted from Breedveld [15, 16]. Physical Domain Hydraulic/pneumatic/material flow Mass transfer Flow (f) variable F (flow rate) Effort (e) variable P (pressure) x (mass fraction) Mechanical translation Mechanical rotation Thermal/energy transfer N (mass fraction flow rate) v (velocity) ω (angular velocity) T (temperature) Electromagnetic Chemical i (current) FN (diffusion flow) f (force) Γ (torque) S (entropy flow), Q (heat flow) V (voltage) μ (chemical potential) Table 6.1. Bilaterally coupled flow and effort variables The directionalities of the ‘flow’ and ‘effort’ variables on a model port depends on the transport equation(s) described within the model corresponding to the particular model port. A model can have a model port with: - a ‘flow’ variable as an input variable and an ‘effort’ variable as an output variable. We can call this ‘a flow driven model port’, or - an ‘effort’ variable as an input variable and a ‘flow’ variable as an output variable. We can call this ‘an effort driven port’, or - either a flow driven or an effort driven port, i.e. the directionalities of the flow and effort variables are not fixed (as long as one is an input and the other is an output variable). Mathematically a DAE model variables can be classified into (see Chapter 5): a) compelled internal variables, i.e. treating them as inputs will lead to a high index model, b) optional input variables, i.e. these variables can be chosen as input variables and don’t have an affect on the index of the model, c) necessary input variables, i.e. these variables are the necessary input variables, i.e. as elements for all low index input assignment of the model. The following example 6.1 of a binary tray distillation model gives the relation between the physical and mathematical model variables classification. 130 Chapter 6 : Interconnection of DAE models Example 6.1. Variable classifications on model ports of a binary tray model Given a binary tray distillation column model as described in Chapter 4, section 4.2.2. consists of equations (4.69, 4.71, 4.73, 4.74, 4.51 – 4.68, 4.41, 4.42). We have seen in Chapter 5, section 5.3.5 that this model gives 2 sets of a low index input assignment: Assignment [1]: Lin ,Vout , x1,in , x2 ,in , y1,in , y2 ,in , hl ,in , hv ,in , Pv ,in Assignment [2]: Lin ,Vout , x1,in , x2 ,in , y1,in , y2 ,in , hl ,in , hv ,in ,Vin The binary tray model has the following variables classifications: a) Necessary input variables: Lin , Vout , x1,in , x2,in , y1,in , y2,in , hl ,in , hv,in b) Compelled internals: M1, M , M 2 , M , M1, L , M1,V , M 2 , L , M 2 ,V , M L , MV , E L , EV , E M , x1,out , x2 ,out , y1,out , y2 ,out , VL ,VV , Z L , ρ L , ρV , P , Pl ,out , Pv ,out , hl ,out , hv ,out , Tl ,out , Tv ,out , Lout Optional input variables: Pv,in , Vin Figure 6.4a and 6.4b show the 4 material ports of the binary tray distillation model, with the corresponding variables classifications through these ports. (*) Pv,out Vapour material outlet port (**) Vout y1,out y2,out (**) hv,out Lin x1,in x2,in hl,in x2,out hl,out A binary tray distillation model Vapour material inlet port Pv,in Vin (*) y1,in y2,in hv,in Lout (**) (*) = Bilaterally coupled variables (**) = Non bilaterally coupled variables x1,out (**) u = Necessary input variable u = Optional input variable z = Compelled internal variable Figure 6.4a. A binary tray model ports 131 Chapter 6 : Interconnection of DAE models (*) Pv,out Vapour material outlet port (**) Vout y1,out y2,out (**) hv,out Lin x1,in x2,in hl,in Liquid material inlet port A binary tray distillation model Vapour material inlet port Vin Pv,in y1,in (*) y2,in hv,in Lout (**) x1,out x2,out Liquid material outlet port hl,out (**) (*) = Bilaterally coupled variables (**) = Non bilaterally coupled variables u = Necessary input variable u = Optional input variable z = Compelled internal variable Figure 6.4b. A binary tray model ports The vapour material outlet port is an example of a flow driven model port and the vapour material inlet port is either a flow or pressure (effort) driven model port. The combination of optional input variables can be on one model port, but it can also relate to another model port. This depends on the model equations. Example 6.2. A valve model Given a simplified valve model: Fout = Cv . ( Pin − Pout Fin = Fout For the choice of a flow driven inlet port then its outlet port must be a pressure driven port (see figure 6.5a). For the choice of a pressure driven inlet port then its outlet port can be either pressure driven or flow driven (see figure 6.5b). Pin Pout Pin Pout Fin Fout Fin Fout Pin Pout Fin Fout Figure 6.5a Figure 6.5b In principal for a given DAE model, we can make model port’s sets which include information of the variable classifications on each model port. This will be very useful for the re-use and interconnection of a model with the other models. 132 Chapter 6 : Interconnection of DAE models 6.3. Process model connectors 6.3.1. Process model connectors The function of a process model connector is only to pass information or quantity from (one) sub model(s) to other sub model(s). There is no process of change of this quantity on the model connector itself. Therefore a model connector does not describe any behaviour of a system. Mathematically interconnection of sub models can be formulated as follows, Proposition 6.1. a model connector Given N physical sub models, each of them can be described with a DAE sub model i = 1...N . Fi ( zi (t ), zi (t ), t ) = 0 , with Suppose zic , with (1.3a): zic ⊂ zi , i = 1...N , are the subset of interconnected variables for each sub model, then the model connector between the DAE sub models can be expressed as ‘a physical consistent equality equation’ : Lzic = 0 (6.1) where: a) physical consistent means that: - the interconnected variables are of the same type - the interconnected variables have the same unit of measurement - the interconnected variables have the same variable value range b) the matrix L is having entries 1,-1,0 depending on the interconnected variables zic A model connector can have various manifestations. Figure 6.6. shows schematic of a model connector. This kind of model connector can be called ‘a N-branches summation model connector’. Moreover figure 6.7. shows an application of a model connector as shown in figure 6.6. This is a flow distribution system supplied by 2 pumps in parallel to three separate pipes. 133 Chapter 6 : Interconnection of DAE models Sub model 1 Sub model 2 Z1 Zi+1 Z2 Zi+2 Sub model i+1 ∑ Zi ZN Sub model N Sub model i Note: zi + 2 represents an external signal acting on a model connector Figure 6.6. N branches summation model connector Fin _ valve1 Valve 1 Fout _ pump1 Fin _ valve 2 Pump 1 Valve 2 Fout _ pump 2 Fin _ valve3 Pump 2 Valve 3 Figure 6.7. Example of a process model connector The interconnection equation for the flow variables is given by the equation: Fout _ pump1 + Fout _ pump 2 = Fin _ valve1 + Fin _ valve 2 + Fin _ valve3 From Proposition 6.1, it can derived 3 types of model connectors described here follows, Proposition 6.2. Equality interconnection N interconnected DAE sub models of (1.3a) has an equality type interconnection when the interconnected variables zic have the same quantity or value, i.e.: z1 = z2 = ... = zi , i = 1,...N with i is the sub model number and zi is the interconnected variable between the sub models. This type of model connector is called ‘a N-branches equality connector’. Schematically the equality interconnection is given on figure 6.8. 134 Chapter 6 : Interconnection of DAE models Sub model 1 Z1 = Z2 = Z3 = ZN Sub model 2 Sub model 3 Sub model N Figure 6.8. N branches equality model connector The variables on the interconnected sub models can be stacked as a vector of variables. This is to be applied on the equality stream connection in Aspen [5]. Figure 6.9. schematically shows the vector variables interconnection between two sub models, where zij are the interconnected variables with i = for sub model 1 or 2 and j the variable from corresponding sub model. Sub model 1 z11 z12 z13 z1j = = = = = = z21 z22 z23 Sub model 2 z2j Figure 6.9. A vector equality model connector Each equality connector forms ‘a 2-branches node connector’. The second and third type of process model connectors derived from Proposition 6.1 is a mixer or a splitter connector, Proposition 6.3. A Mixer or a splitter connector N interconnected DAE sub models of (1.3a) have a mixer or a splitter type interconnection when an interconnected variable zic from a sub model is composed of sum of other interconnected variables zic from other sub models, i.e.: 0 = z1 + z2 + ... + zi −1 − zi + zi +1 + ... + z N with i is the sub model number and zi is the interconnected variable between the sub models. 135 Chapter 6 : Interconnection of DAE models A mixer connector and a splitter connector are schematically given on figure 6.10a. and figure 6.10b. respectively. Sub model 1 Sub model 2 Z1 Z2 Zi ∑ Sub model i Sub model i Zi Z1 Sub model 1 Z2 Sub model 2 ∑ ZN Sub model N Sub model N ZN Figure 6.10a. A mixer connector Figure 6.10b. A splitter connector The Proposition 6.1. gives a framework of a process model connector, where physically there is no process of change within this connector. In some cases there are confusions between a model connector and a sub model description, e.g. between a mixer connector and a mixer model. In a mixer model the property of material to be mixed can change, example the specific enthalpy of the outlet stream from a mixer model is changed with respect to each inlet stream specific enthalpy. Thus a mixer model should not be categorized as a model connector. 6.3.2. Process model connectors for bilaterally coupled variables In section 6.2.2. is described that bilaterally coupled model port variables consists of a pair ‘effort (e)’ and ‘flow (f)’ variables. Sometimes the ‘effort’ variable is called as the ‘potential’ variable. Each branch of a model connector, connecting bilaterally coupled sub models, shall also consist of this pair ‘effort’ and ‘flow’ variables. The relations on a bilaterally coupled model connector follows the ‘Generalized Kirchoff’s 1st Law’, namely: ‘on a node with N branches, the sum of ‘flow’ variables is zero’ This follows the model connector relation (6.1), i.e. : Lzc = 0 , and the potential or effort variables value on a given node is equal to all directions. The schematic figures of bilaterally coupled model connectors are shown in figure 6.11 and figure 6.12a, 6.12b. The variables ei , i = 1,..., N represent the interconnected ‘effort’ variables and the variables fi , i = 1,..., N are the interconnected ‘flow’ variables. On each branch of a bilaterally coupled model connector, the ‘effort’ and ‘flow’ variables shall not have the same direction. 136 Chapter 6 : Interconnection of DAE models Sub model 1 f1 e1 Sub model 2 f2 e2 ei+1 fi+2 Lf = 0 ∑ ei+2 = fN fi Sub model i Sub model i+1 fi+1 eN ei Sub model N e1 = e2 = …= eN Figure 6.11. A bilaterally coupled model connector ein fin = = eout ein fout fin = = eout fout Figure 6.12a. Equality bilaterally coupled connectors fout1 fin ein ∑ = eout1 fin1 ein1 fin2 fout2 eout2 ein2 foutn eoutn finn einn ∑ = fout eout Figure 6.12b. A possible directionalities on a splitter and a mixer bilaterally coupled connectors Since the potential variables values on a node/model connector is equal to all directions, i.e.: e1 = e2 = ... = eN , then it follows that: Proposition 6.4. Directionality of effort variables on a model connector For a node or model connector with N branches, then the effort variables quantities are determined only by the effort value of one of the branches. Figure 6.12b shows the examples schematic of Proposition 6.4. The variables ein = eout1 = ... = eoutn = ek and eout = ein1 = ... = einn = ek , i.e. all effort variables on the node can be replaced with one variable ek . 137 Chapter 6 : Interconnection of DAE models 6.4. Interconnection of sub models 6.4.1. Mathematical formulation of interconnected sub models Suppose we have an interconnected DAE sub models as shown on figure 6.13; where the input variables are chosen by the modeller, u = [ u1 u1 u2 Sub model 1 Sub model 2 z1c z2c zic ui Sub model i+1 zi +1c u2 ui T uc ] . ui +1 uc L zNc Sub model i Sub model N uN Figure 6.13. Interconnected sub models Mathematical formulation of interconnected DAE sub models as shown in figure 6.13 can be formulated as follows, Proposition 6.5. Interconnected DAE sub models – 1 Consider N underdetermined DAE sub-models. Each sub-model is described with a DAE model (1.3a) having system matrix Ti ( s ) , with mi equations and ni variables T z i , mi < ni . Let z = ( z1 z 2 " z i z N ) is a vector of n = n1 + n2 +"+ n N model variables and m = m1 + m2 +" mN is the total number of model equations. Each DAE sub model has a low index input assignment. Suppose there are nuT variables that can be specified as external input variables u = [ ui T uc ] . With nu is the number of specified variables ui (the external input variables acting on these interconnected DAE sub models) and nuc is the number of specified variables uc (the external input variables acting on the model connectors), then nuT = nu + nuc . The number of total external input variables is nuT = n − m − mc , where mc is the number of the model connector equations. 138 Chapter 6 : Interconnection of DAE models Let mc equations of Lz c + uc = 0 be the set of model connector equations for these interconnected sub models with nc variables z c ⊂ z \ u and nuc variables uc . T Suppose z = [ zi zc ] , then we can write these interconnected sub-models as: ⎡ Pi ( s ) Pc ( s ) ⎤ ⎡ zi ⎤ ⎡ Bi = ⎢ 0 L ⎥⎦ ⎢⎣ zc ⎥⎦ ⎢⎣ 0 ⎣ 0 ⎤ ⎡ ui ⎤ I ⎥⎦ ⎢⎣ uc ⎥⎦ (6.2) The relation (6.2) consist of m + mc equations and m + mc variables, where it applies that n − nuT = m + mc . Pi ( s ), Pc ( s ) are polynomial function of ‘s’. The structural index property of the DAE (6.2) can be analysed using the theory as described in Chapter 3. Example: index( struc Tc ( s)) = max ij {0, (deg det struc S ji ( s ) − deg det struc T ( s ) + 1)} ⎡ Pi ( s ) Pc ( s ) ⎤ L ⎥⎦ ⎣ 0 where : Tc ( s ) = ⎢ Example 6.3. an interconnected valves and a gas buffer model Figure 6.14 shows interconnected 2 valves models and 1 gas buffer model. They are interconnected with model connectors as shown L1 and L2. The model ports and a connector port are given as: 1,2,2’,3,4,5,6,7. Each port connected variables Fi , Pi (gas mass flow rate and pressure) from the sub models, where i=1,..., 7 according to the ports number. Thus the interconnected sub models have 17 variables, consisting of 16 ports variables Fi , Pi and 1 pressure hold up variable from the gas buffer. The simplified interconnected model equations are given as follows: Gas buffer: Valve 1: Connector L1: dP R.T = ( F2 ' − F3 − F4 ) dt V P = P2 ' F2 = Cv1 P1 - P2 F2 = F2 ' P2 = P2 ' Connector L 2 : P = P3 P = P4 F1 = F2 Valve 2: F2 = Cv2 P5 - P6 F5 = F6 F4 = F5 + F7 P4 = P5 P4 = P7 The model parameters are: R, T , V , Cv1, Cv 2 . There are in total 13 model equations with 17 variables. Thus we need to specify 4 input variables on the model boundaries to solve these interconnected sub models. 139 Chapter 6 : Interconnection of DAE models 3 F3 P3 1 F1 P1 2 valve1 F2 P2 L1 2' F2' P2' Gas buffer 5 4 F4 P4 L2 F5 P5 6 valve2 F6 P6 7 F7 P7 Figure 6.14. Interconnection of valves and a gas buffer Using the structural graph algorithm as described in Chapter 3, we can test that the following input variables sets will give a structural low index interconnected DAE sub models: ( F3 , F7 , P1, P6 ) or (F3 , F7 , F1, F6 ) or (F3 , F7 , F1, P6 ) or (F3 , F7 , P1, F6 ) . 6.4.2. Finding input signals for interconnected DAE sub models Theoretically we can find input signals for interconnected DAE sub models by using the extension of Proposition 5.11, i.e. by adding the interconnection equations and searching to the input variables of the interconnected sub models. This is described as follows: Proposition 6.6. Interconnected DAE sub-models-2 Consider N underdetermined sub-models. Each sub-model is described with a DAE model (1.3a) having system matrix Ti ( s ) , with mi equations and ni variables z i , mi < ni . Let z = ( z1 T z 2 " z i z N ) is a vector of n = n1 + n2 +"+ n N model variables and m = m1 + m2 +" mN is the total number of model equations. Further let Lz c = 0 is the set of model connector equations for this system with mc equations and nc variables z c ⊂ z ; where mc ≤ n − m . We can write these interconnected submodels as: 140 Chapter 6 : Interconnection of DAE models m mc n ⎡ diag (Ti ( s )) ⎢ ⎢ ⎢ 0 ⎢ ⎢ ⎢⎣ In 0 ⎤⎛ z ⎞ ⎥⎜ ⎟ ⎥⎜ ⎟ 0 ⎥ ⎜ zc ⎟ = 0 ⎥⎜ ⎟ ⎥⎜ ⎟ K ⎥⎦ ⎜⎝ u d ⎟⎠ 0 L 0 n nc (6.3) m+mc-nc with: ⎡ diag (Ti ( s )) ⎢ ⎢ 0 Tc ( s ) = ⎢ ⎢ ⎢ ⎢⎣ In 0⎤ ⎥ ⎥ 0 ⎥, ⎥ ⎥ K ⎥⎦ 0 L 0 Ti ( s ) = ( Ei s − Ai ) the second row gives the additional interconnection equations and the third row of , where (6.3) gives additional equations of the form zi = ud + ud + " + ud 1 2 m + mc − nc ud1 , ud2 ," , udm+m −n are new dummy variables. c c Analogue with Proposition 5.11 in Chapter 5 (for finding a index input variables set), let GT is the graph obtained from Tc ( s ) and let M MW is the result of a maximum weighted matching algorithm, then each of M MW gives rise to a maximum dynamic degree input assignment. Further let GEi be the graph for Ei and let M MCi be the result of a maximum cardinality-matching algorithm on GEi , then this input assignments is a low index input assignment if W ( MW ) = N ∑M i =1 MC i . Thus if a low index input assignment set can be found for the interconnected sub models, then the model connector Lz c = 0 does not form a constraint for the state variables. Suppose for the individual DAE sub model we can find a low index input assignment, but for the interconnected DAE sub models there is no low index input assignment set, then part or all of the model connector of Lz c = 0 forms constraint equations for the state variables on the interconnected DAE models. 141 Chapter 6 : Interconnection of DAE models Example 6.4. Interconnected tank model This example gives an illustration of the states constraint equations due to interconnection equations. The interconnected tanks model in Chapter 4, section 4.5 is used. The model equations are given (4.163a – 4.172) as follows: Tank 1: dM1 = Fin − Fout1 dt M1 = ρ A1H1 P1 = ρ gH1 Fin = f1 ( Pin , P1 ) (4.163a) (4.164) (4.165) (4.166) Tank 2: dM 2 = Fin 2 − Fout dt M 2 = ρ A2 H 2 P2 = ρ gH 2 Fout = f 2 ( P2 , Pout ) (4.167a) (4.168) (4.169) (4.170) Model connectors: Fout1 = Fin 2 (model connector equation) (4.171) P1 = P2 (4.172) (model connector equation) Each tank model has the following variables classifications for a low index input assignment, Tank model 1 : - Compelled internal variables = {M1, P1, H1} - Optional input variables = {Fin , Pin } - Necessary input variables = {Fout1} Tank model 2 : - Compelled internal variables = {M 2 , P2 , H 2 } - Optional input variables = {Fout , Pout } - Necessary input variables = {Fin 2 } Applying Proposition 6.4. and using the graph algorithm as described in Chapter 5 for finding index input sets of the interconnected tank models, give the following results: 142 Chapter 6 : Interconnection of DAE models Output: Problem name Number of set variables Number of unknowns Number of equations = tanks.dgn =0 = 12 = 10 Degree of freedom =2 Structurally consistent? Yes Structural rank E =2 Structural order (dyn.degree of freedom) = 1 Structural index : High Index Maximum dynamic degree input assignment: Assignment [1]: Fin , Fout Assignment [2]: Fin , Pout Assignment [3]: Pin , Fout Assignment [4]: Pin , Pout We see that no low index input assignment can be found, i.e. the interconnected submodels has an internally high index or the interconnection equation introduces a high index structure. As we expected, if the interconnection equations are the cause of the high index structure then for any maximum dynamic degree input assignment the interconnection equations belong to the required equations to be differentiated for a high index reduction. To demonstrate this case we chose the input assignment [1] for the input variables. The structure of struc( Es − A) and struc( Es − A) −1 are given as follows: struc( Es − A) −1 = struc( Es − A) = 1 2 3 4 5 6 7 8 9 10 1 s 1 o o o o o o o o 2 o o o o s 1 o o o o 3 o 1 1 o o o o o o o 4 o o o o o 1 1 o o o 5 o o 1 1 o o o o o 1 6 o o o o o o 1 1 o 1 7 1 o o o o o o o 1 o 8 o o o o 1 o o o 1 o 9 o o o 1 o o o o o o 10 o o o o o o o 1 o o 1 2 3 4 5 6 7 8 9 10 1 s-1 s-1 s-1 s-1 s-1 s-1 1 1 s-1 s-1 2 1 1 1 1 1 1 s s 1 1 3 1 1 1 1 1 1 s s 1 1 4 o o o o o o o o 1 o 5 s-1 s-1 s-1 s-1 s-1 s-1 1 1 s-1 s-1 6 1 1 1 1 1 1 s s 1 1 7 1 1 1 1 1 1 s s 1 1 8 o o o o o o o o o 1 9 10 s-1 1 s-1 1 s-1 1 s-1 1 s-1 1 s-1 1 1 s 1 s s-1 1 s-1 1 where column wise of struc( Es − A) gives the following variables: 1 = M1 ,2 = M 2 ,3 = H1 ,4 = H2 ,5 = P1 ,6 = P2 ,7 = Fout 1 ,8 = Fin 2 ,9 = Pin ,10 = Pout The result of the matrix struc( Es − A) −1 shows that the 2nd, 3rd, 6th, 7th, 10th model equations (i.e. equations (4.164), (4.165), (4.168), (4.169), (4.172)) need to be differentiated for a high index reduction, which is the same as we found in Chapter 4, section 4.5 for a different input assignment. We also see that the interconnection equation 10th or (4.172) belongs to the set of differentiated equations for a high index 143 Chapter 6 : Interconnection of DAE models reduction. Since each tank model has a low index structure then in this case the interconnection causes the high index structure. Implementation of Proposition 6.6. for finding input signals face a practical problem for large scale interconnected DAE sub models (e.g. 200 equations with 220 variables) that consist of more than 90% algebraic variables. The algorithm will find a lot of possible input assignments sets, with some of the chosen variables are algebraic internal variables. In the following section, it will be described a matching interconnection of DAE sub models by the use of possible information of model ports variables classifications. The remaining possible input variables at the boundaries of interconnected sub models can be chosen for the input variables to solve the model. Additional structural check following Proposition 6.5 can be done to ensure that the chosen input variables set and the interconnection does not give a structural high index model. 6.4.3. Interconnection matching For each DAE sub model, we can find all possible low index input assignment sets and proceed variables classifications on each model port. Thus for each model there are sets of possible input variables on its model ports. Proposition 6.7. Interconnection matching Interconnection matching of given interconnected DAE sub models means that for each model connector of the form Lzc = 0 does not form a constraint equation for the states or compelled internal variables of the interconnected model ports of the DAE sub models. This means that: a) a matching connector for ‘a N-branches summation model connector’ shall have one connector output or one (optional) input variable to a DAE sub model (see figure 6.15a), b) a matching connector for ‘a N-branches equality model connector’ shall have only one connector input or one (compelled) output variable from a DAE sub model (see figure 6.15b). Sub model 1 Sub model 2 Z1 Z2 Zi+2 ∑ Zi Sub model i Sub model i+1 Zi+1 ZN Sub model N Figure 6.15a. a summation connector with zi +1 as an (optional) input variable 144 Chapter 6 : Interconnection of DAE models Sub model 1 Sub model 2 Z1 Zi+1 Z2 Zi+2 Sub model i+1 = Zi Sub model i ZN Sub model N Figure 6.15b. an equality connector with zi +1 as a model output variable When all N sub models have interconnected optional input/output variables, e.g. all N sub models are valve models, then the choice for the interconnection matching are free. Example 6.5. See figure 6.14. Given interconnection of 2 valves and a gas buffer models. The interconnected variables on the model connector L2 are P4 , P5 , P7 , F4 , F5 , F7 . Since P4 = P , the pressure on the buffer model is a state variable, then P4 is a compelled internal variable. Therefore the pressure on this connector L2 will be determined by P4 , i.e. no other pressure variable can be set. Besides the Proposition 6.7, practically the interconnection matching of sub models shall also satisfy the following criteria for the interconnected variables: - the variables shall have the same variable type (e.g. real, integer) - the variables shall have the same unit of measurement - the variables shall have the same variable range (this is to check the validity range of the interconnected sub models) Since the interconnected sub models have low index input assignment sets and they are match interconnected, i.e. there will be no state variables constraint equations due to the interconnection, then the total interconnected sub models shall have a structural low index input assignment set. Proposition 6.8. Low index interconnected sub models A model consisting of interconnected low index sub-models will have a low index assignment if the interconnected connector’s are matched. The input variables of interconnected DAE sub models are the remaining low index free input variables on the model boundaries or on the model connectors. 145 Chapter 6 : Interconnection of DAE models Example 6.6. Interconnection matching of binary trays of distillation column models See figure 6.3a and figure 6.3b on the example 6.1. We can make a match interconnection between two trays of distillation column as shown in the figure 6.16a and figure 6.16b. Pv,out Vout y1,out y2,out hv,out Lin x1,in x2,in hl,in A binary tray-2 distillation model Pv,in = Pv,out Vin = Vout y1,in = y1,out y2,in = y2,out hv,in = hv,out Lout x1,out x2,out hl,out = Lin = x1,in = x2,in = hl,in x2,out hl,out A binary tray-1 distillation model Pv,in Vin y1,in y2,in hv,in Lout x1,out Figure 6.16a. An interconnection matching of 2 trays of distillation column Pv,out Vout y1,out y2,out hv,out Lin x1,in x2,in hl,in A binary tray-2 distillation model Pv,in = Pv,out Vin = Vout y1,in = y1,out y2,in = y2,out hv,in = hv,out Lout x1,out x2,out hl,out = Lin = x1,in = x2,in = hl,in x2,out hl,out A binary tray-1 distillation model Pv,in Vin y1,in y2,in hv,in Lout x1,out Figure 6.16b. An interconnection matching of 2 trays of distillation column 146 Chapter 6 : Interconnection of DAE models 6.4.4. Example of application on sub-models interconnection of a distillation column model Vin, Pvin Qcond Lreflux Total Condensor Model Ltop, Pouttop Tray Model Fin, z1in,z2in,hfin Feed Tray Model Qreboil Reboiler Model Lbot, Poutbot Figure 6.17. A schematic of a distillation column model Tray model and feed tray model: The tray model used in this example is as given in Chapter 4, section 4.2.2. This is applied for a binary components system. The feed tray model is made through a slightly small modification of this tray model on the components and energy balances. It consists of 29 equations with 42 variables, given as follows: dM1m = Fin z1in + Lin x1in + Vin y1in − Lout x1out − Vout y1out dt dM 2m = Fin z2in + Lin x2in + Vin y2in − Lout x2out − Vout y2out dt dEm = Fin h fin + Lin hlin + Vin hvin − Lout hlout − Vout hvout dt M1m = M1L + M1V ; M 2m = M 2 L + M 2V Em = EL + EV M L = M1L + M 2 L ; MV = M1V + M 2V M1L = M L x1out ; M 2 L = M L x2out M1V = M L y1out ; M 2V = M L y2out 147 Chapter 6 : Interconnection of DAE models EL = M L hlout − PVL ; EV = MV hvout − PVV M L = ρ LVL ; MV = ρV VV VL + VV = Vtray VL = Aeff .Z L Plout = P; Pvout = P Lout = f1 ( Z L ) Vin = f 2 ( P, Pvin , Z L ) ρ L = f3 (Tlout , Plout , x1out , x2out ); hlout = f5 (Tlout , Plout , x1out , x2out ); ρV = f 4 ( Tvout , Pvout , y1out , y2out ) hvout = f 6 ( Tvout , Pvout , y1out , y2out ) 0 = K1 ( x1out , x2out , y1out , y2out , Tvout , P ); 0 = K 2 ( x1out , x2out , y1out , y2out , Tvout , P) Tlout = Tvout The low index input assignments of this model are: Assignment [1]: Fin , z1in , z2in , h fin , Lin , x1in , x2in , hlin ,Vout , y1in , y2in , hvin , Pvin Assignment [2]: Fin , z1in , z2in , h fin , Lin , x1in , x2in , hlin ,Vout , y1in , y2in , hvin ,Vin Total Condenser Model: The model in this section presents a binary components total condenser model as an extension of the condenser model in Chapter 5, section 5.3.1. The last two equations are the valve equations for the vapour flow inlet and top liquid product flow. The model consists of 29 equations with 35 unknowns, as follows: dM1m = Vin y1in − Lreflux x1out − Ltop x1out dt dM 2m = Vin y2in − Lreflux x2out − Ltop x2out dt dEm = Vin hvin − Lreflux hlout − Ltop hlout − Qcond dt M1m = M1L + M1V ; M 2m = M 2 L + M 2V Em = EL + EV M L = M1L + M 2 L ; M1L = M L x1out ; M1V = M L y1; 148 MV = M1V + M 2V M 2 L = M L x2out M 2V = M L y2 Chapter 6 : Interconnection of DAE models EL = M L hlout − PLVL ; EV = MV hV − PVV M L = ρ LVL ; MV = ρV VV VL + VV = Vcond Z L = f1 (VL ) PL = f 2 ( P, Z L ) Lreflux = f3 ( PL ) ρ L = f 4 (Tlout , PL , x1out , x2out ); ρV = f5 ( Tv , P, y1, y2 ) hlout = f6 (Tlout , PL , x1out , x2out ); 0 = K1 ( x1out , x2out , y1, y2 , Tv , P); Tlout = Tv Vin = f 8 ( Pvin , P); hV = f 7 ( Tv , P, y1, y2 ) 0 = K 2 ( x1out , x2out , y1, y2 , Tv , P) Ltop = f 9 ( Pouttop , PL ) The low index input assignments for this model are given as follows: Assignment [1]: y1in , y2in , hvin , Qcond , Pouttop , Pvin Assignment [2]: y1in , y2in , hvin , Qcond , Pouttop ,Vin Assignment [3]: y1in , y2in , hvin , Qcond , Ltop ,Vin Assignment [4]: y1in , y2in , hvin , Qcond , Ltop , Pvin Reboiler Model The following set of differential algebraic equations describes a reboiler model for binary components for a distillation column, consists of 27 equations with 34 unknowns: dM1m = Lin x1in − Vout y1out − Lbot x1out dt dM 2m = Lin x2in − Vout y2out − Lbot x2out dt dEm = Lin hlin − Vout hvout − Lbot hlout + Qreboil dt M1m = M1L + M1V ; M 2m = M 2 L + M 2V Em = EL + EV M L = M1L + M 2 L ; MV = M1V + M 2V M1L = M L x1out ; M 2 L = M L x2out M1V = M L y1out ; M 2V = M L y2out EL = M L hlout − PLVL ; EV = MV hvout − PvoutVV M L = ρ LVL ; MV = ρV VV 149 Chapter 6 : Interconnection of DAE models VL + VV = Vreboil Z L = f1 (VL ) PL = f 2 ( P, Z L ) ρ L = f3 (Tlout , PL , x1out , x2out ); ρV = f 4 ( Tvout , Pvout , y1out , y2out ) hlout = f5 (Tlout , PL , x1out , x2out ); hvout = f 6 ( Tvout , Pvout , y1out , y2out ) 0 = K1 ( x1out , x2out , y1out , y2out , Tvout , Pvout ); 0 = K 2 ( x1out , x2out , y1out , y2out , Tvout , Pvout ) Tlout = Tvout Lbot = f 7 ( PL , Poutbot ) The low index input assignments for this model are: Assignment [1]: Lin , x1in , x2in , hlin ,Vout , Qreboil , Poutbot Assignment [2]: Lin , x1in , x2in , hlin ,Vout , Qreboil , Lbot The following shows that by the choice of assignments of each model, a complete distillation column model can be built from matching of sub-models interconnection, as given in figure 6.18. 150 Chapter 6 : Interconnection of DAE models An interconnection matching on a distillation column model: Pout,top Ltop Qcond x1,out x2,out hl,out Condenser Pv,in = Pv,out Vin = Vout y1,in y2,in hv,in = = = y1,out y2,out hv,out Lout = Lin x1,out x2,out hl,out = = = x1,in x2,in hl,in Lout = Lin x1,out x2,out hl,out = = = x1,in x2,in hl,in Lout = Lin x1,out x2,out hl,out = = = x1,in x2,in hl,in Lout = Lin x1,out x2,out hl,out = = = x1,in x2,in hl,in Poutbot Lbot x1,out x2,out hl,out Tray-N Pv,in = Pv,out Fin Vin = Vout z1in Feed tray z2in hfin y1,in y2,in hv,in = = = y1,out y2,out hv,out Pv,in = Pv,out Vin = Vout y1,in y2,in hv,in = = = y1,out y2,out hv,out Tray-1 Pv,in = Pv,out Qreboiler Vin = Vout y1,in y2,in hv,in = = = y1,out y2,out hv,out Reboiler Figure 6.18. Interconnected sub models on a tray distillation column model 151 Chapter 6 : Interconnection of DAE models 6.5. Conclusions The objective of this Chapter is to investigate when interconnection of DAE sub models will not result in a high index problem. There are three important main ingredients for interconnection of DAE sub models, namely: model ports, model connectors, and interconnection matching. Model ports are the model boundaries. Each model port consists of the chosen model variables to interact with its environment. Model connectors are non behavioural equality equations, which relates variables from a model port to other variables on other models ports. The knowledge of model ports and their variable classifications for each DAE sub model are important for interconnecting and re-use of DAE sub models. Application modelling and simulation programs should give information about the variable classifications on the model ports. Interconnection matching of structural low index DAE sub models shall result to a structural low index model. A matching interconnection means that there is no state constraint equation introduced by the interconnection equation. Application modelling and simulation programs should give information when a model connector forms a non-matching connection. 152 Chapter 7: Conclusions and Recommendations 7.1. Conclusions Usually, a complex process model consists of interconnected sub models. Modelling of each sub model based on balance and constitutive equations gives a first order nonlinear differential algebraic equations (DAE) model. The consequences of modelling with DAE are the possibility to get a high index and/or a consistent (re-) initialisation problem. A high index problem arises due to the state constraint equations within the DAE model. A consistent (re-) initialisation problem means that it is not possible to set arbitrary values to the state or accumulation variables at any time. A high index model and a low index model with non-minimum state variables pose a consistent (re-) initialisation problem. A high index problem can be caused by: non-causal choice of the input variables, internal state constraints, and sub models interconnection. In process modelling a low index DAE model with a consistent (re-) initialisation problem can be caused by the choice of intensive variables as the state variables instead of the extensive variables. Apart from the possibility that the state independency of a DAE model can conflict with the intention of the modeller, a high index DAE model is numerically difficult to solve. The proposed method of process modelling is to avoid a high index and/or consistent (re-) initialisation problem are consistently derived from Rosenbrock and Kronecker [107]. The approach to do this is to develop procedures to detect the problems and to reduce the index during process modelling. The strategy followed in this research has four features. First, examining the mathematical structure of a DAE model that gives a high index and/or a consistent (re) initialisation problem and deriving easier methods to solve the problems. Second, to apply the proposed methods to a first order non-linear DAE model. Third, to develop a method for searching low index input variables of a DAE model and to detect possible state variables constraint equations. Finally to give the necessary condition so that the interconnection of sub models will not lead to a high index problem. The results of the research shows that it is possible to implement algorithms in the process modelling environment to detect a high index problem, to detect a consistent (re-) initialisation problem, to calculate the index of a DAE model and to reduce the index of a DAE model without non-linear algebraic manipulations. The index reduction without non-linear algebraic manipulations will preserve the original DAE models and variables. Moreover, it is possible to detect when sub models interconnection will lead to a high index problem. The conclusions related to detection of a high index and consistent (re-) initialisation problem, to calculation of the index and execution of an index reduction in process modelling are summarized here as follows: 153 Chapter 7 : Conclusions and Recommendations 1. 2. Solving a high index DAE model needs differentiation manipulations. This thesis describes high index reduction techniques for a non-linear first order DAE model in conjunction with the strict system equivalence operation on the linear DAE model (Rosenbrock [107]). A high index model reduction can require equations differentiation or variables differentiation. The proposed procedures for a high index reduction do not need to apply complicated non-linear algebraic manipulations. The original model equations and variables will not be destroyed. The information to gather which variables or equations need to be differentiated for a high index reduction is derived from the structural information of the system matrix ( Es − A) or ( Es − A)−1 . The conclusions related to finding input variables of a DAE model and the requirement of DAE sub models interconnection are summarized here as follows: 3. 4. 5. 6. 7. The input variables of a first order non-linear DAE model are determined by its internal DAE model equations. The input variables are those model variables that utilise the maximum dynamic degree of the model and give rise to causal inputoutput relations. Low index input variables are causal input variables of a DAE model. The sets of low index input variables of a model are possibly non unique. This thesis describes a procedure to find low index inputs sets assignment for a first order non-linear DAE model with no internal state constraint equations. When a first order non-linear DAE model has internal state constraints equations, then these equations can be detected for any maximum degree inputs set assignment. In this thesis a graph algorithm is used to analyse the process model structure and input variables assignment. Actually the process-modelling environment must assist the modeller to make a well-structured process model. In our perspective the graph algorithm can support this activity. A graph algorithm can be used to assist the modeller in the book keeping of process model equations and variables and warning the modeller for a possible state constraints condition during the model building. The interconnection of low index DAE sub models shall be such that no state constraint is introduced by interconnection, i.e. resulting in a low index composite model. The interconnected input-output variables of sub models are matched. A model-building tool can be developed to collect all inputs sets for a low index assignment of a DAE model. Process modelling environment should provide information to the user to be able to get low index interconnected models matching. Process model building activities can be resumed into the following steps: a) Set up model behaviour equations, b) Checking if there are states constraint equations by finding a maximum degree inputs assignment set, c) Execute index reduction if it is required, d) Checking consistent re-initialisation problem, e) Execute state transformation if it is required, f) Finding low index inputs assignment sets. 154 Chapter 7 : Conclusions and Recommendations A DAE model diagnosis tool during a process model building is required for: a) Detection of internal states constraints equations (a high index model), b) Proposing a high index reduction, c) Finding: low index input variables sets, optional input variables and compelled internal variables, d) Detection of a consistent re-initialisation problem. The theory and algorithm described in this thesis can be imbedded in the process modelling tools. 7.2. Recommendations 1. This thesis describes only the mathematical structure and interconnectivity of lumped systems given by first order non-linear DAE models. We believe that the phenomenon of the ‘index’ problem is not only a time domain aspect, but also it exists in the spatial domain. Campbell and Marszalek [24] presented examples of the ‘index’ problem in the spatial domain, therefore further research on the mathematical structure and interconnectivity of process models described with partial differential algebraic equations is required (PDAE). 2. The recent development of powerful symbolic manipulation software makes it possible to make a model building diagnosis tool using symbolic manipulator software instead of using the structural approach. Using symbolic manipulation tool in model building might improve the ‘unlucky’ values for a high-index detection with structural analysis. 3. To be able to re-use and interconnect low index models made from different modelling environments, then it is necessary to develop standardisation on the model attributes, especially for the model ports, and the model connectors. The users need also to get information about which sets of input variables for the model will give a low index model. 155 Chapter 7 : Conclusions and Recommendations 156 Appendix A: Structural Frame Work A.1. Structure Ching-Tai Lin [28] introduced the concept of “structure” for a linear time-invariant system. He distinguishes between entries of matrices that are known with 100 percent precision – called fixed entries (usually only zeros) and those that are known only approximately. If two equally sized matrices have all their fixed entries on the same positions, then they are said to have the same structure. Unger et.al. [126] formulated a definition of structure also: Definition A.1 (Unger et.al. [126]): Structure. Whenever there is a numerical (or symbolical) representation of operands in R such that a certain operation in R yields a nonzero result then the result of the corresponding structural representation of this operation is ∗. Conversely, if there is no such numerical (or symbolical) representation then the structural result is 0. Next we use 'o' to represent operands that are exactly zero with 100 percent certainty. All other operands, including those with a very small value or even a value of zero (0) – but not with 100 percent certainty – are represented by ‘∗’. The operands ‘∗’ can be extended with information of the structure of polynomial entries. A.2. Structural Operation The structural framework herein will be used to analyse the structure of polynomial ⎡ p ( s ) ⎤ , i = 1, 2,..., m , j = 1, 2,..., m , ⎢⎣ ij ij ⎥⎦ where pij ( s ) ∈ \[ s ] and R[ s ] denote the set of all polynomial p : R → R , matrices P ( s ) = ( ) p ( s ) = a0 + a1s + " + ak s k , a0 ," , ak , s ∈ R, ak ≠ 0, k ∈ N , (A.1) with k is the degree of polynomial p ( s ) . Consider also p ( s ) = 0 as a polynomial on R[ s ] . For this purpose let’s consider the algebraic system ( Λ ,+ ,.) , where Λ = {o, s 0 , s1, s 2 ,...} and where the binary operators of addition and multiplication are defined as follows: 157 Appendix A : Structural Frame Work addition + :Λ × Λ → Λ o+ sj = s j o + o=o si + o = si si + s j = s max{i, j} :Λ × Λ → Λ multiplication . o.o=o si .o = o o.s j = o si .s j = si + j Furthermore, if a ∈Λ , then let the unitary operators +:Λ → Λ and −:Λ → Λ be defined as + a = a and − a = a respectively. Definition A.2. Structure of a polynomial function Suppose p, q ∈ R[ s ] are polynomials with degree k , l , p ( s ) = a0 + a1s + " + ak s k , a0 ," , ak , s ∈ R, ak ≠ 0, k ∈ N q ( s ) = b0 + b1s + " + bl s l , b0 ," , bl , s ∈ R, bl ≠ 0, l ∈ N or p( s) = 0 q( s) = 0 (has no degree) then, the operator struc : R[ s ] → Λ is defined as: ⎧⎪ o if p( x) ≡ 0 struc p( s) := ⎨ k otherwise ⎪⎩ s (A.2) struc p ( s ) is called the structural representation of p( s ) and the structural degree of p( x ) is defined as: deg struc p ( s ) = k , ∀p ( s ) ∈ R[ s ] \{0} (A.3) and struc( p ( s) + q( s )) = struc p( s)+struc q ( s ) struc( p ( s).q ( s )) = struc p ( s ).struc q ( s ) Example A.1: Given p ( s ) = −2 s3 − 7 s 2 + s + 1 . Its structural representation is struc p( s) = s3 158 and deg struc p ( s ) = 3 (A.4) Appendix A : Structural Frame Work Corollary A.3. Suppose p, q ∈ R[ s ], deg p ( s ) = k , deg q ( s ) = l p ( s ) = pk s k + pk −1s k −1 + ... + p0 q ( s ) = ql sl + ql −1sl −1 + ... + q0 then : deg( p ( s)q( s )) = deg( struc p( s).struc q ( s )) = deg struc p( s ) + deg struc q ( s ) (A.5) and if ( p ( s ) + q( s ) ≠ 0 and k ≠ l ) then deg( p ( s) + q( s )) = deg( struc p( s ) + struc q ( s)) = max{deg struc p( s), deg struc q( s)} (A.6) and if (( p ( s ) + q ( s ) ≠ 0) ∧ (k = l ) ∧ ( pk + ql ≠ 0)) then deg( p( s ) + q( s )) = k (A.7) and if (( p ( s ) + q ( s ) ≠ 0) ∧ (k = l ) ∧ ( pk + ql = 0)) then deg( p ( s ) + q ( s )) < k (A.8) 159 Appendix A : Structural Frame Work 160 Appendix B: Graph Algorithm B.1. Introduction This appendix describes shortly the graph algorithm as implemented by Bujakiewitcz [21] and Y.G.G.J.Go [48] to calculate the structural properties of a DAE model, i.e. the structural rank of E , the structural dynamic degree of freedom deg det struc( Es − A) , and the required differentiations for index reduction from matrix struc( Es − A) −1 . This is for a given DAE model of the form : ⎛ ∂F ⎞ F ( z (t ), z (t ), u (t ), t ) = 0 ; where struc E = struc ⎜ ⎟ and ⎝ ∂z ⎠ ⎛ ∂F ⎞ struc A = struc ⎜ ⎟. ⎝ ∂z ⎠ The definitions of structural aspects are given on the Chapter 3 and Appendix A. The graph algorithm here is used to relates the structure between equations and variables in a DAE model. The implementation of the graph algorithm is using graph library of LEDA (Naeher, et.al. [91]). For further reading of the graph theory and algorithm can be found in Bondy [11], Bujakiewics [21], G. Chartrand [27] and Naeher et.al. [91]. B.2. Graph terminology A graph G of a set of m DAE equations consists of a finite nonempty set of vertices V(G) and set of edges E(G). The vertices are ordered on one side the equation number, fi (i = 1...m) ∈ V1 (G ) , and other side are the variables z j ( j = 1...m) ∈ V2 (G ) . An edge ei = ( fi , z j ) ∈ E (G ) joins vertices fi , z j ∈ V (G ) . The connected vertices fi , z j ∈ V (G ) are called adjacent in G. A graph G is called a bipartite graph if its vertices set V(G) can be portioned into two non-empty subset V1 (G ) = { f1, f 2 ,..., f m } and V2 (G ) = {z1, z2 ,..., zm } and every f i ∈V1 (G ) and zi ∈V2 (G ) , there is no edge between two vertices from V1 (G ) or between two vertices from V2 (G ) . edge ei ∈ E (G ) joins vertices 161 Appendix B : Graph Algorithm B.3. Maximum cardinality matching A subset of edges M (G ) ⊆ E (G ) is called matching if there is no two edges of M (G ) sharing the same vertex. The set of all subset-matched edges is denoted as S M ( G ) . Further a matching of graph G is denoted as M . A cardinality of a set A is defined as the number of elements in A and is denoted as A . Therefore the cardinality of matching edges M (G ) is defined as the number of edges in M (G ) and is denoted as M (G ) . A matching edges of maximum cardinality in G is called the maximum cardinality matching (set), M MC , where: M MC = max M ( G )∈S M ( G ) M (G ) (B.1) If a graph G with cardinality of its vertices V (G ) = p has a matching of cardinality p then such a matching is called a perfect matching, M MP , which has a 2 perfect matching set M MP . Since every matching of G has at most p/2 edges, a M (G ) = perfect matching is a maximum matching. Lemma B.1 (Y.G.G.J.Go [48]) ( ⎣⎢ Consider a constant matrix with struc E = ⎡ struc eij struc eij = RS o, if e ≡ 0 Tx , otherwise ) ij ⎤ , E ∈ R m×m and: ⎦⎥ ij 0 Let the bipartite graph G is defined as follows: a) Let V (G ) = 2m b) Let V (G ) be split up into two distinct sets: V1 (G ) = { fi ∈ V (G ) : i = 1, 2,..., m} ≡ equation vertices V2 (G ) = {z j ∈ V (G ) : j = 1, 2,..., m} ≡ variable vertices c) Let E (G ) = {( f i , z j ): struc eij = x 0 } Now, let the resulting matching of the Maximum Cardinality Matching set algorithm on the constant matrix E be M MC , then we have: rank struc E = M MC 162 (B.2) Appendix B : Graph Algorithm Proof: Let rank struc E = γ . It follows from Corollary 3.4 (Chapter 3) that there is a permutation σ of {1,2,..., γ } which result to: ∃Γγγ with det Γγγ ≠ o ∧ Γγγ** with γ * > γ , det Γγγ** = o this is equivalent with if there are matching edges of equation vertices and variable vertices due to the same permutation σ of {1,2,..., γ } : ∃{( f σ i , zσ i ) ∈ M (G ), i = 1,2,...γ } ∧ ∃/ {( f σ i , zσ i ) ∈ M (G ), i = 1,2,...γ *} with γ * > γ since it is a maximum matching, then it can be written as: ∃{( f σ i , zσ i ) ∈ M MC , i = 1,2,...γ } with its cardinality : M MC = γ . It follows that: rank struc E = M MC . Example B.1 (see Chapter 3: Example 3.3) Consider a DAE model as given on example 3.3. with ⎡ x0 ⎡1 1 0 ⎤ ⎢ E = ⎢⎢1 1 0 ⎥⎥ , struc( E ) = ⎢ x 0 ⎢ ⎢⎣0 0 0 ⎥⎦ ⎢o ⎣ x0 x0 o o⎤ ⎥ o⎥ ⎥ o⎥ ⎦ Figure B.1 shows two matching graphs of struc( E ) , where: V1 = { f1, f 2 , f3}, V2 = {z1, z2 , z3} and E (G ) = {e1, e2 , e3 , e4 } . The cardinality of graph edges E (G ) = 4 . = {m1, m4 } or M MC 2 = {m2 , m3} , with = 2. the maximum cardinality matching M MC = M MC = M MC 1 2 The maximum matching set is M MC 1 Thus : rank struc( E ) = M MC = 2 . 163 Appendix B : Graph Algorithm f1 m1 or e1 e3 e2 f2 m4 or e4 f3 z1 f1 z2 f2 z3 f3 e1 m3 or e3 m2 or e2 e4 z1 z2 z3 Matching-1 Matching-2 Figure B.1. Maximum Matching Graph of struc( E ) B.4. Maximum weighted matching A weighted graph G of is a graph obtained from assigning a weight w(ei ) to ei ∈ E (G ) . The weight W (G ) of weighted graph G is defined as ∑ w( e ) W (G ) = (B.3) i ei ∈E ( G ) A weighted matching set in a weighted graph of G is denoted as M w and a maximum (cardinality) weighted matching set in a weighted graph of G , denoted as M MW , is a matching set in for which the weight of weighted graph is maximum, denoted as, b M MW : = arg W M MW g b g = arg max M w ∈S Mw W M w (B.4) ∑ w( e ) = arg max M w ∈S Mw i ei ∈E ( G ) Since a perfect matching is a maximum matching we can also define, Definition B.2. (Bujakiewicz [21]) A maximum weighted matching set M MW of graph G is one of the perfect matching of G which maximizes the sum of weights of its edges, is denoted as: RS |T M MW : = M w ∈ M MP :max M w ∈S MP U W ∑ w(e )V| i ei ∈E ( G ) (B.5) The weight of the maximum weighted matching, is denoted as: W ( M MW ) := max M w ∈S MP 164 ∑ ei ∈E (G ) w(ei ) (B.6) Appendix B : Graph Algorithm Therefore: the cardinality of the maximum weighted matching set is equal to the cardinality of the perfect matching set, M MW = M MP , and W ( M MW ) ≥ W ( M MP ) . (B.7) Corollary B.3. (Y.G.G.J.Go [48]) Consider structural matrix struc T ( s) = struc ( Es − A) = (tij ( s))ij , ⎢⎣( with struc E = ⎡ struc eij ) ij ⎤ , E ∈ R m×m , struc A = ⎡( struc a ) ⎤ , A ∈ R m×m ij ij ⎥ ⎥⎦ ⎢⎣ ⎦ and: struc eij = RS o, if e ≡ 0 Tx , otherwise ij 0 struc aij = RS o, if a ≡ 0 Tx , otherwise ij 0 Further suppose the weighted bipartite graph be defined as follows: V (G ) = 2m b) V (G ) be split up into two equally sized subsets: V1 (G ) = { fi : i = 1, 2,..., m} ≡ equation vertices a) V2 (G ) = {z j : j = 1, 2,..., m} ≡ variable vertices E (G ) = {( f i , z j ): struc eij = x 0 ∨ struc aij = x 0} d) and let the weighting w: E (G ) → N be defined as, c) ⎧⎪1, w( x 0 ) = ⎨ ⎪⎩0, ∀x0 ∈ E (W (G )) ∀x 0 ∉ E (W (G )) where E (W (G )) = {( f i , z j ) ∈ E ( G ): struc eij = x 0 } . Suppose M MW denotes the resulting matching set of the Maximum Weight Matching algorithm, then: i) T ( s) is structurally singular ⇔ M MW < m, and ii) if T ( s) is structurally non-singular then (B.8) r = deg det struc T ( s ) = W ( M MW ) (B.9) Proof: i) a) The “if” part can be proven by contradiction statement, namely: 165 Appendix B : Graph Algorithm Let M MW < m and suppose that T ( s) is structurally non-singular, then we have: T ( s) is structurally non-singular ⇔ ∃σ ∈ Γ such that ( fi , zσ i ) ∈ E (G ), i = 1, 2,..., m ⇔ ∃ perfect matching set M MP ∈ S M with cardinality M MP = m and following the Definition B.2: M MW = M MP = m . From which follows the contradiction with the assumption that M MW < m . b) The “if only” part follows by the same way, while letting T ( s) be structurally non-singular and supposing M MW < m . ii) Let T ( s) be structurally non-singular, then for each matching set M (G ) ∈ M MW there exists a structural permutation σ ∈Γ such that ( f i , zσ i ) ∈ M (G ) for i = 1, 2,..., m . Furthermore deg ti ,σ ( s ) = w(( fi , zσ )) , and following Corollary 3.7 (see i i Chapter 3) m r = deg det struc T ( s ) = maxσ ∈Γ ∑ deg ti ,σ i ( s ) , hence: i =1 m r = maxσ ∈Γ ∑ w(( fi , zσ i )) = ∑ ei ∈M MW i =1 w(ei ) = W ( M MW ) The degree of determinant structural matrix T ( s ) is equal to the weights of maximum weighted matching of the graph of T ( s ) . Example B.2 (see Chapter 3: Example 3.2) Given a DAE with : ⎡s 2⎤ ⎡ s + 1 −1 ⎢ ⎢ ⎥ T ( s ) = [ Es − A] = ⎢ 1 s + 2 −1⎥ , struc T ( s ) = ⎢ x o ⎢ ⎢⎣ −1 0 ⎥⎦ −1 ⎢ xo ⎣ 166 xo s xo xo ⎤ ⎥ o⎥ x ⎥ 0⎥ ⎦ Appendix B : Graph Algorithm Figure B.2. shows the maximum weighted matching sets of graph of struc(T ( s )) . The weighted edge is shown with value = 1. According to (B.9) in Corollary B.2 that: r = deg det struc T ( s ) = ∑ ei ∈M MW w(ei ) = W ( M MW ) =1 Thus the structural dynamic degree of freedom of this DAE = 1, and det struc T ( s ) = s r =s f1 1 z1 f1 f2 z2 f2 f3 z3 f3 Max.weighted matching-1 z1 1 z2 z3 Max.weighted matching-2 Figure B.2. Maximum weighted matching B.5. Calculation of struc(T-1(s)) Following the Definition 3.9 (Chapter 3): Consider T ( s ) ∈ R m×m [ s ] , the structural matrix inverse of T ( s ) is defined as: ( ( struc T ( s ))−1 := ( struc tij−1 ( s ))ij ) ⎛ ⎛ det struc S ( s ) ⎞ ⎞ ji = ⎜⎜ ⎟ ⎟, ⎜ ⎝ det struc T ( s ) ⎠ ⎟ ij ⎠ ⎝ i = 1, 2,..., m j = 1, 2,..., m (3.9) 167 Appendix B : Graph Algorithm where the relation for the sub-matrix struc ( Sij ( s )) as given on (2.12), is obtained by placing zeros in the i-th row and in j-th column of struc (T ( s )) and replacing the ij-th element with xo or 1 : ⎛ struc(t11 ( s )) " 0 " struc(t1m ( s )) ⎞ ⎜ ⎟ # # # ⎜ ⎟ ⎟ struc( Sij ( s )) = ⎜ 0 0 " xij0 " ⎜ ⎟ # # # ⎜ ⎟ ⎜ struc(t ( s )) " 0 " struc(t ( s )) ⎟ m1 mm ⎝ ⎠ The same procedure to calculate det struc T ( s ) as described in section B.2; we can calculate each entry of det struc S ji ( s ) . Example B.2 (see Chapter 3: Example 3.2) Given a DAE with : ⎡s 2⎤ ⎡ s + 1 −1 ⎢ ⎢ ⎥ T ( s ) = [ Es − A] = ⎢ 1 s + 2 −1⎥ , struc T ( s ) = ⎢ x o ⎢ ⎢⎣ −1 −1 0 ⎥⎦ ⎢ xo ⎣ xo s xo xo ⎤ ⎡ s 1 1 ⎤ ⎥ o⎥ ⎢ x = ⎢1 s 1 ⎥⎥ ⎥ 0 ⎥ ⎢⎣1 1 0 ⎥⎦ ⎦ with det struc T ( s ) = s ; Suppose we are going to calculate det struc S33 ( s ) , where : ⎡ s 1 0⎤ struc S33 ( s ) = ⎢⎢1 s 0 ⎥⎥ ⎢⎣0 0 1 ⎥⎦ Figure B.3. shows the maximum weighted matching for the graph of S33 ( s ) , where rs 33 = deg det struc S33 ( s ) = 2 . Thus : det struc S33 ( s ) = s rs = s2 It follows that : 168 33 Appendix B : Graph Algorithm det struc S33 ( s ) struc tij−1 ( s ) = det struc T ( s ) s2 s =s = f1 f2 1 z1 1 z2 f3 z3 Max.weighted matching S33(s) Figure B.3. Maximum weighted matching of S33 ( s ) We can calculate the other fractional polynomial entries of the matrix struc(T −1 ( s )) of the DAE on the example 3.2. above, resulting to the following: ⎡1 ⎢s ⎢ 1 −1 struc T ( s ) = ⎢ ⎢s ⎢1 ⎢ ⎣ 1 s 1 s 1 ⎤ ⎥ ⎥ 1⎥ . ⎥ ⎥ s ⎥ ⎦ 1 169 Appendix B : Graph Algorithm 170 Appendix C: Modelling of an ICGCC Plant We have tried to apply the structural analysis technique and interconnection matching as presented in this thesis for the dynamic modelling of a complex interconnected index-one sub-models, namely the dynamic modelling of integrated coal gasification combined cycle (ICGCC) plant, as schematically given in the following figure C.1. The modelling strategy will be briefly described in the section C.2. Further this section is not mention to analyse the dynamic behaviour and control strategy of an ICGCC. Analysis of the dynamic behaviour and control strategy of an ICGCC plant can be found e.g. in P.Schoen [112]. Air Separation Plant Oxygen Quench gas Coal Coal Gasifier Syngas Cooler Nitrogen Gas Cleaning Saturator Steam Water Heat Recovery Steam Generator Flue gas Syn gas Water Air Steam Electric Power Steam Turbine Gas Turbine Air Compressor Figure C.1. An Integrated Coal Gasification Combined Cycle Plant (P.Schoen [112]) At the time of the research SpeedUp [118] is chosen for the modelling and simulation environment for the example problem, since it is supported with enhanced numerical solver and physical properties database. Although through the process modelling exercises we have faced with a lot of consistent initialisation problems, index problem and interconnection problem. The index problem rises as internally states constraint problem or as the result of interconnection. Moreover the index problem is also caused due to wrong choice of the input variables. This is partially because SpeedUp [118] library models does not give any hints about the choice of input variables. Therefore based on the theoretical results of this thesis we hope that in the near future the 171 Appendix C : Modeling of an ICGCC Plant conceptual object oriented modelling for interconnection matching of index-one submodels and a better diagnosis environment for index problem will be available in the process modelling tools. In the following we will describe briefly about the ICGCC process, modelling approach and show some simulation results. C.1. Process description of an Integrated Coal Gasification Combined Cycle Plant Coal still gives major contribution as the raw material of the electrical production. This is caused by the large worldwide reserves, constant price and the suitability for the fuel of a large-scale electrical power generation plant (> 100 MW). An integrated coal gasification combined cycle (ICGCC) plant offers a better efficiency and low emissions compared with conventional coal combustion electrical power plant. In the early 1990’s several demonstration ICGCC plants were built worldwide. One such plant is at Buggenum, the Netherlands. This plant has been in operation since 1996 to produce electricity of 250 MW for the Netherlands electricity-net. Schematically the ICGCC Buggenum is shown in the figure C.1. This consists of the Shell coal gasifier reactor, the syngas cooler, the gas cleaning unit, the air separation plant, the heat recovery steam generator and the steam and gas turbines (Demkolec [30], P. Schoen [112]) The production of electricity begins when fine pulverised coal together with steam feed and oxygen feed from the air separation plant are burned and gasified in a reactor at about 1600 oC under a pressure of about 28 bar. The membrane pipes wall cooling is installed for keeping the reactor wall at temperature and the produced steam is integrated in the steam cycle. The produced gas from the gasifier is called the syngas, which mainly consists of 60 % CO, 25 % H2 and the remaining 15 % are N2, H2O, CO2, CH4, COS and H2S. This hot syngas in quenched with cold recycled gas at the top of the reactor to a temperature of about 900 oC. After leaving the gasifier, the product gas flows through the syngas cooler unit where further cooling occurs until a temperature of about 235 oC is achieved. The heat released in the syngas cooler is used to produce medium pressure steam, which is integrated with the steam cycle. The coal gasifier and syngas cooler plant is shown in the figure C.2. After the syngas cooler the product gas is cleaned in the gas cleaning unit (see figure C.3). The COS is converted to H2S in a catalytic converter unit and almost all H2S is removed in the H2S absorber unit. To lowered the adiabatic flame temperature of syngas combustion in the gas turbine, before the combustion the cleaned syngas is premixed with dilute nitrogen (nitrogen gas product from air separation plant) and saturated with water in a saturator. The gas outlet from the saturator is used as the fuel of gas turbine to produce electricity. The heat of flue gas leaving the gas turbine is recovered in the heat recovery steam generator, which produces mainly high and medium pressure steam for the steam turbines. The saturator unit, heat recovery steam generator and the turbines are schematically shown on the figure C.4. A cryogenic air distillation plant produces the oxygen needed for the gasification of coal in the gasifier (see figure C.5). This plant mainly consists of an integrated condenser-reboiler double columns distillation unit. The high pressure section (bottom 172 Appendix C : Modeling of an ICGCC Plant column) operates at about 7 – 10.5 bar and the low pressure section (upper column) operates at about 1.8 – 3 bar. The products of this plant are mainly oxygen feed for the gasifier (with purity about 95 %), dilute nitrogen for the saturator (with oxygen impurity of less then 1%). The air compressor of the gas turbine supplies the air feed needed for this air separation plant. P. Schoen has done the dynamic modelling and control study of the ICGCC plant described in section in ACSL [2]. The problem was encountered in ACSL programming is incapability to solve implicit interconnected DAE models. Therefore the ICGCC model is re-modelled in the SpeedUp [118]. The description of the ICGCC sub-models can be found in F.R. Habieb [56], A.Hermawan [57], T. Hermanu [58], H.J. de Lange [73]. The integrated model of the ICGCC consists of about 6500 differential algebraic equations with about 900 state variables. Moreover due to the confidentially of the real plant data, the models are made based on data on the open literatures. 173 Appendix C : Modeling of an ICGCC Plant Steam to Heat Recovery Steam generator PC Recycle Booster Compressor Oxygen (GOX) FRC Coal FRC Steam FRC Water Dry Solid Removal Unit Syngas to Gas Cleaning Unit Figure C.2. A Schematic flowsheet of a Shell Coal gasifier and Syngas cooler unit (T. Hermanu [58], P.Schoen [112], Van der Burgt [23]) 174 Appendix C : Modeling of an ICGCC Plant PC Cooler Lean H2S absorbent Syngas to Saturator Wet Cleaning Unit Water H2S Absorber COS →H2S Converter Syngas from Syngas-cooler FlashTank PC Steam Rich H2S absorbent Slop water Slop water Figure C.3. A Schematic flowsheet of Syngas cleaning plant (Demkolec [30], P. Schoen [112]) Flue gas LC Heat Recovery Steam Generator Feed Water Economiser Saturator Syngas from Gas Cleaning unit Evaporator Steam from Syngas-cooler Nitrogen (DGAN) from Air Separation Plant Superheater Reheater Water SC Fuel heater Air P Electric Generator MP/LP Steam Turbine To Condenser HP Steam Turbine Gas Turbine Air Compressor Compressed Air to Air Separation Plant Figure C.4. A Schematic process flowsheet of the saturator unit and STEG unit (H.J. de Lange [73], P. Schoen [112]) 175 Appendix C : Modeling of an ICGCC Plant Oxygen (GOX) to Gasifier Nitrogen (DGAN) to Saturator PC LP column LC Subcooler FRC Main Heat Exchanger Pure Nitrogen Reboiler Condenser (PGAN) HP column DPC Subcooler LC mol sieve Air from Air Compressor Figure C.5. A schematic process flowsheet of an air separation plant (J.M. Abrardo et.al [1], Demkolec [30], A. Hermawan [57]) C.2. Modeling strategy The goals of the dynamic modelling of the ICGCC are to make a model, which can be used for prediction of the steady state behaviour and dynamic interactions, and to study the control strategies. The outline of modelling strategy is given as follows: 1. Topological decomposition: The plant model topological decomposition is done in 4 levels: a) Sub-plant level: the ICGCC is decomposed into 4 functional units compounds, namely: the syngas plant (see figure C.2), the gas 176 Appendix C : Modeling of an ICGCC Plant cleaning plant (see figure C.3), the combined cycle plant (see figure C.4) and the air separation plant (see figure C.5) b) Unit level: each sub-plant level is decomposed in several unit operations, e.g. the syngas plant consists of the gasifier unit, the syngas cooling unit, the dry solid removal unit and the recycle compressor. c) Sub-unit level: each unit operation can be decomposed into several sub-units, e.g. the syngas cooler consists of economisers, boilers and superheaters. d) Phase level: a phase ψ is defined as a non-decomposable or elementary model aggregate, since all intensive properties on this phase ψ are to be considered spatial uniformly. An example on the modelling of the syngas cooler, each heat exchanger wall is assumed to have one uniform temperature. Modelling of spatial uniform phase will result in a set of differential algebraic equations. Through the sub-models decomposition, indirectly we have defined the system boundaries of each sub-model. 2. Set up of model connectors (or flowsheet set up) The following step on the modelling approach is to define the interaction variables through the sub models, by defining the model connectors. These model connectors can be grouped in several classes: a) Material model connector, e.g. this includes the information of mass flow, pressure, temperature, mol fraction and specific enthalpy b) Energy model connector, e.g. this includes the information of heat and temperature c) Information model connector, e.g. this includes one variable connection for the controller. Further in this step, we prepare which part of the sub models will interact through bilaterally coupling connectors or not. 3. Defining Overall Unit of Measurements The overall Unit of Measurements is decided before the set-up of the model equations in each sub-model, e.g. SI unit of measurements 4. Sub-model set-up The sub-model set-up is in principally composed of the following steps: a) Choice of the interesting/important physical mechanisms described within the system (i.e. behavioural assumptions). In general this results to a set of DAE’s consists of the balance and constitutive equations (model equations entity). b) Collecting interconnection variables on model ports 177 Appendix C : Modeling of an ICGCC Plant c) Collecting and defining the type and range of model variables (model variables entity). d) Collecting the model parameters (model parameters entity). e) Collecting the model initial values (model initial values entity) f) Defining the required model unit conversion factors if required. 5. Sub-model mathematical properties check The mathematical properties check of each sub-model, includes: a) b) c) d) Equations independency check The structural consistent (re-) initialisation and index check Collecting sub-model input assignments Checking if the proposed bilaterally coupling for the sub model can be achieved 6. Sub-model stand alone simulation test and evaluation The model behaviour and robustness must be tested and evaluated for the steady state and dynamic behaviour in its defined model applicability range. 7. Sub-models interconnection matching, testing and evaluation The sub-models interconnection matching, testing and evaluation are the last step on the strategy of modelling of interconnected sub-models. In the most cases this interconnection matching, testing and evaluation are done in several steps as ‘a growing’ interconnected sub-models. C.3. Examples of the simulation results In the following we will show several model simulation results. The dynamic responses are the open-loop responses, namely when only the liquid hold-ups are controlled. 178 Appendix C : Modeling of an ICGCC Plant The coal gasifier – steady state performance: 0.1 0.05 11.9 % 11.9 % 0.04 0.03 CO2 mole fraction 0.08 H2O/Coal percentage 0.06 0.04 0.01 0.02 0.75 0.8 0.85 0.9 O2 (95% purity)/Coal mass flow 0.95 0 0.7 1 4.8 % 2.4 % 0.75 0.8 0.85 0.9 O2 (95% purity)/Coal mass flow 0.95 1 x 10 4 1.4 0.34 Syngas Low Heating Value H2O/Coal percentage 0.32 1.35 11.9 % 9.5 % 7.1 % 4.8 % 0.3 H2 0.28 7.1 % H2O mole fraction 0.02 0 0.7 9.5 % H2O/Coal percentage 9.5 % 7.1 % 4.8 % 2.4 % mole fraction 1.3 H2O/Coal percentage 1.25 2.4 % 2.4 % 4.8 % 7.1 % LHV [KJ/Kg] 1.2 1.15 0.24 0.22 0.7 9.5 % 11.9 % 0.26 1.1 1.05 0.75 0.8 0.85 0.9 O2 (95% purity)/Coal mass flow 0.95 0.7 1 0.68 0.75 0.8 0.85 0.9 0.95 1 O2 (95 % purity)/Coal mass flow 520 LHV * Syngas mass flow [MW] 510 11.9 % 0.66 2.4 % CO mole 0.64 fraction 0.62 0.6 500 9.5 % 4.8 % 490 7.1 % 7.1 % 480 9.5 % H2O/Coal percentage 4.8 % 470 11.9 % H2O/Coal percentage 2.4 % 460 450 0.58 0.7 0.75 0.8 0.85 0.9 O2 (95% purity)/Coal mass flow 0.95 1 440 0.7 0.75 0.8 0.85 0.9 0.95 1 O2 (95% purity)/Coal mass flow Figure C.6. Some steady state sensitivity performance of the Coal Gasifier 179 Appendix C : Modeling of an ICGCC Plant The air separation sensitivity performance: Figure C.7. The air separation plant sensitivity performance The open loop step response on the oxygen mass flow to the gasifier The following figures C.8 show the effects of the oxygen mass flow step response on oxygen product purity of the air separation plant and the figure C.9 show the effects on the gasifier syngas compositions, temperature, pressure and gas turbine power. Figure C.8. Step response on the oxygen mass flow to the gasifier 180 Figure C.9. Open loop effects on the oxygen step response 181 Appendix C : Modeling of an ICGCC Plant 182 List of symbols and abbreviations t c u v w x y z z Time Compelled internal variables of a DAE model Input variables of a DAE model Algebraic variables of a DAE model Non state variables of a DAE model State variables of a DAE model Output variables of a DAE model A DAE model variables Differential variables of a DAE model F ( z (t ), z (t ), t ) = 0 F ( z (t ), z (t ), u (t ), t ) = 0 ∂F ∂F E= ,A= ∂ z ∂z First Order Differential Algebraic Equations First Order Differential Algebraic Equations Matrices of the first derivates of a DAE model D(k ) fk k-th derivates to the variable z of a subset of the DAE model G V (G ) E (G ) equations A graph of a DAE model A set of vertices of a graph A set of edges of a graph A Cardinality of the matrix A M MC M MP M MW A maximum cardinality matching set A perfect matching set U U UN Set of all low index input variables assignment sets A set of low index input variables assignment A set of necessary input variables of a DAE model UO A set of optional input variables of a DAE model r.s.e s.s.e BDF DAE KCF ODE restricted system equivalence operation strict system equivalence operation Backward Difference Formulae Differential Algebraic Equations Kronecker Canonical Form Ordinary Differential Equations A maximum weighted matching set 183 List of symbols and abbreviations 184 Reference List 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. J.M. Abrardo et.al, Optimisation of cryogenic oxygen plants, Proceedings, XVII International Congress of Refrigeration, Vol.A, pp. 214 – 219, 1987. ACSL, 1995, Advanced Continuous Simulation Language (ACSL) reference Manual, Version 11, MGA Software, USA. Van de Akker, Transport phenomena, Lecture note, Department of Chemical Engineering, Delft University of Technology, 1992. M. Andersson, An object-oriented language for model representation. PhD thesis, Lund Institute of Technology, 1990. Aspen Dynamics 12.1, User Guide Manuals, Aspen Tech, 2003. P.I. Barton, The modelling and simulation of combined discrete/continuous processes, PhD thesis, Department of Chemical Engineering, Imperial College, London, 1992. P.I. Barton, Lecture note: a professional institute course on dynamic modelling, Department of Chemical Engineering, Massachusetts Institute of Technology, Cambridge, MA, 1996. P.I. Barton, T. Park, Analysis and control of combined discrete/continuous systems: progress and challenges in the chemical processing industries. Department of Chemical Engineering, Massachusetts Institute of Technology, Cambridge, USA, 1997. G. Beysel, G. Sommerfeld, Die Luftzerlegung, eine bewehrte technologie, integriert in ein kohlevergasingskraftwerk, VGB Conference, Essen, 1991. R. Bogusch, W. Marquardt, A formal representation of process model equations, Computers chem.Engng, Vol.21, No. 10, pp. 1105-1115,1997. J. Bondy and U. Murthy, Graph theory with applications, Macmillan. London. 1977. O. H. Bosgra, A.J.J. Van der Weiden, Input-output invariants for linear multivariable systems, IEEE Transactions on Automatic Control 25, pp. 20-36, 1980. O. Bosgra, Lecture note : Dynamic process modelling, Department of Mechanical Engineering, Delft University of Technology, 1994. O. Bosgra, J.Soetjahjo, Process modelling – structural analysis, Workshop Dynamische Processsimulation, CAPE – Netherlands, 3 April 1996. P. Breedveld, Integrated modelling of physical system dynamics – the course: Modelling of mechanical and electromechanical systems of the AIO network on Systems and Control Theory, Utrecht, 1995. P. Breedveld, Bond Graphs, Geoplex summer school, Bertinoro, July 2003. K.E. Brenan, S.L. Campbell, and L.R. Petzold, Numerical solution of initial-value problems in differential-algebraic equations, Elsevier Science Publishing Co., Inc.,1989. Joel G. Broida and S. Gill Williamson, A Comprehensive Introduction to Linear Algebra, Addison-Wesley Publishing Company,Inc.,1989. B.A. Brooks, Modelling of a distillation column using bond graphs, Department of Electrical and Computer Engineering, University of Arizona, 1993. L. Brull, U. Pallaske, On Consistent initialisation of differential-algebraic equations with discontinuities, Proceedings of 4-th European Conference on 185 References 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38. 39. 40. 41. 186 Mathematics in Industry editors : Hj.Wacker and W.Zulehner, pp 213-217, Kluwer Academic Publisher, The Netherlands, 1991. P. Bujaciewicz, Maximum weighted matching for high index Differential Algebraic Equations, PhD thesis, Delft. University of Technology, 1994. A.ten Busschen, H.M.J. de Winter, Integrated Coal Gasification Combined Cycle Demonstration Project Buggenum – VGB Conference, Essen, 1991. Van der Burgt, Ontwerp –en fabricage-aspecten van het Shell Kolen Vergassingsprocess (SCGP) – NPT Lezing – Arnhem, 26 April 1991. S.L. Campbell, W. Marszalek, ODE/DAE integrators and MOL problems, ICIAM 95 Minisymposium on MOL, 19 june 1995. F.E. Cellier, Continuous system modelling, Springer-Verlag, 1991. CT. Chen, Linear system theory and design, Holt-Saunders International Edition, Japan, 1984. G. Chartrand and O.R.Oellermann, Applied and Algorithmic Graph Theory, McGraw-Hill,Inc.,1993. Ching-Tai Lin. Structural controllability. IEEE Transactions on Automatic Control, AC-19(3):201-208, Jun 1974. J.M. Coulson, J.F. Richardson, Chemical engineering - design, Vol.6, Pergamon Press, 1983. Demkolec, Synthesis of Talents – World’s largest coal gasification plant for electricity generation, Demkolec B.V. Haelen, The Netherlands, 1993. J. Demmel, B. Kagstrom, The generalised schur decomposition of an arbitrary pencil A-8B : Robust software with error bounds and applications. Part 1 and Part 2., ACM Transactions on Mathematical Software, Vol.19, No. 2, pp. 160-201, June 1992. Van Dooren, The computation of kronecker’s canonical form of singular pencil, Linear Algebra and Its Applications 27, pp.103-140, 1979. M. Van Dooren, The generalised eigenstructure problem in linear system theory, IEEE Transactions on Automatic Control, Vol. AC-26, No.1, February 1981. I.S. Duff. On Algorithm for obtaining a maximum transversal. ACM Transactions on Mathematical Software, 7(3):315-330, Sept, 1981. D.M. Espie, et.al., The unique challenges of cryogenic distillation column control for integrated coal gasification combined cycle applications, 3rd IFAC Symposium on Dynamics and Control of Chemical Reactors, Distillation Columns and Batch Processes, College Park, Maryland, USA, 26-29 April 1992. G.Fabian, D.A. van Beek, J.E. Rooda, Index Reduction and Discontinuity Handling using Substitute Equations, Mathematical and Computer Modelling of Dynamical Systems, vol.7, nr.2, pp..173-187, 2001. W. F. Feehery, J. R. Banga, P.I. Barton, A novel approach to dynamic optimization of ODE and DAE systems as high-index problems, AICHE Annual Meeting, Miami, 1995. W.F. Feehery, P.I. Barton, A differentiation-based approach to dynamic simulation and optimisation with high-index differential-algebraic equations, Department of Chemical Engineering, Massachusetts Institute of Technology, Cambridge, USA, 1997. G.F. Froment, Steam reforming analyzed, Hydrocarbon Processing, July 1992. G.F. Froment and K.B. Bischoff, Chemical reactor analysis and Design, John Wiley & Sons., 1999. F.R. Gantmacher, The theory of matrices, Vol. 2, Chelsea Publishing Company, New York, 1974. References 42. S.E. Gallun and C.D. Holland, Gear’s procedure for the simultaneous solution of differential and algebraic equations with application to unsteady state distillation problems, Computers Chem. Engng, Vol. 6, no. 3, pp. 231-244, 1982. 43. R. Gani, C.D. Ruiz, I.T. Cameron, A Generalised model for distillation column- I : model description and applications, Computers Chem. Engng, Vol. 10, no. 3, pp. 181-198, 1986. 44. C.W. Gear, L.R. Petzold, Ode methods for the solution of differential/algebraic systems, SIAM J. Numer. Anal. Vol. 21, No. 4, August 1984. 45. C.W. Gear, Differential-algebraic equation index transformations, SIAM J. Sci. Stat. Comput. Vol. 9, No. 1, January 1988. 46. C.W. Gear, Differential algebraic equations, indices, and integral algebraic equations, SIAM J. Numer. Anal, Vol. 27, No. 6, pp.1527-1534, December 1990. 47. L.F. Godbout, Jr., D. Jordan, On state equation descriptions of linear differential systems, Journal of Dynamic Systems, Measurement, and Control, pp. 333-344, December 1975. 48. Y.G.G.J. Go. The High Index Problem in Dynamic Modelling. Master Thesis. Mechanical Engineering. Delft University of Technology,1998. 49. G.H. Golub, C.F. van Loan. Matrix Computation. The Johns Hopkins University Press. London. 1996. 50. gPROMS Guide. Interway Solutions Ltd. May 1997. 51. M.W.M. Van Goethem, Modeling of reactors with large reaction systems, Master Thesis. Department of Chemical Engineering and Material Science. Delft University of Technology, 1998. 52. S.R. de Groot and P. Mazur, Non-Equilibrium thermodynamics, North Holland Publishing Company, Amsterdam, 1962. 53. J. Grievink. Procesdynamica: onderdrukken of benutten, Workshop Dynamic Process Simulation, SIMUCAPE 2, Delft, The Netherlands, 3rd April 1996. 54. E. Hairer, C. Lubich, M. Roche, The numerical solution of differential-algebraic systems by runge-kutta methods, Lecture notes in mathematics 1409, Springer, Berlin, 1989. 55. E. Hairer, G. Wanner, Solving ordinary differential equations II. Stiff and differential-algebraic problems, Springer Verlag, Berlin, 1991. 56. F.R. Habieb, Dynamic modelling of a combined cycle thermal power plant, Master Thesis, Department of Mechanical Engineering, Delft University of Technology, 1995. 57. A. Hermawan, Dynamic modelling of a cryogenic air separation plant, Master Thesis, Department Chemical Engineering, Delft University of Technology, 1994. 58. T. Hermanu, Dynamic modelling and control of a syngas platform unit, Master Thesis, Department of Mechanical Engineering, Delft University of Technology, 1996. 59. M.A. Henson, D. E. Seborg, Non-linear Process Control, Prentice Hall, New Yersey, 1997. 60. Holland, Multicomponent distillation, Prentice-Hall International Series, New York, 1963. 61. Hysis 3.1, Dynamic Modelling, Hyprotech, Aspen Tech, 2002. 62. T. Kailath, Linear systems, Prentice-Hall.Inc, 1980. 63. H.Z. Kister, Distillation design, Mc-Graw Hill,Inc., New York, 1992. 187 References 64. H.A. Kooijman and R. Taylor, A Nonequilibrium model for dynamic simulation of tray distillation columns, AiChe Journal, Vol. 41, no. 8, pp. 1852-1863, August 1995. 65. E.W. Koopman, R.W. Regenbogen, P.L. Zuideveld, Buggenum ICGCC Demonstration Plant 1993 – Experience with the Shell Coal Gasification Process, VGB Conference, Maastricht, 1993. 66. R. Krishna, Lecture notes: Separation processes, Department of Chemical Engineering, University of Amsterdam, 1991. 67. A. Kroner, W. Marquardt, E.D. Gilles, Computing consistent initial conditions for differential-algebraic equations, European Symposium on Computer Aided Process Engineering-1, S131-138, 1994. 68. A.Kroner, W. Marquardt, E.D. Gilles, Getting around consistent initialisation of DAE systems ?, Computers chem. Engng. Vol. 21, No. 2, pp. 145-158, 1997. 69. M. Kuyper, First-order representations of linear systems, PhD thesis, Catholic University of Tilburg, 1992. 70. P. Kunkel, V. Mehrmann, A new look at pencils of matrix valued functions, Linear Algebra and Its Applications 212/213, pp. 215-248, 1994. 71. Lawrence J. Corwin and Robert H. Szczarba. Multivariable Calculus. volume 64 of Pure and Applied Mathematics. Marcel Dekker, Inc., 270 Madison Avenue, New York. 1982. 72. P.Lancaster, M.Tismenestsky. The Theory of Matrices. Computer Science and Applied Mathematics. Academic Press,Inc.,1985. 73. H.J. de Lange, Implementation of a dynamic gas saturator model in modular modelling system, Master Thesis, Department of Mechanical Engineering, Delft University of Technology, 1992. 74. A. Lefkopoulos, M.A. Stadtherr, Index analysis of unsteady-state chemical process systems-I. An algorithm for problem formulation, Computers chem. Engng. Vol. 17, No. 4, pp. 399-413, 1992. 75. A. Lefkopoulos, M.A. Stadtherr, Index analysis of unsteady-state chemical process systems-II. Strategies for determining the overall flowsheet index, Computers chem. Engng. Vol. 17, No. 4, pp. 415-430, 1992. 76. B. Leimkuhler, L.R. Petzold, C.W. Gear, Approximation methods for the consistent initialization of differential-algebraic equations, SIAM J. Numer. Anal., Vol. 28, No.1, pp.205-226, February 1991. 77. F.L. Lewis, A tutorial on the geometric analysis of linear time-invariant implicit systems, Automatica vol. 28, No. 1, pp. 119-137, 1992. 78. M.J. Locket, S. Banik, Weeping for sieve trays, Ind. Eng. Chem. proc. Des. dev, 25, pp. 561-569, 1986. 79. M.J. Locket, Distillation tray fundamentals, Cambridge University Press, 1986. 80. D.G. Luenberger, Dynamic equations in descriptor form, IEEE Transactions on Automatic Control, Vol. AC-22, No.3, pp. 312-321, June 1977. 81. D.G. Luenberger, Time-invariant descriptor systems, Automatica, Vol.14, pp. 473-480, 1978. 82. Luyben, Process modeling, simulation and control for chemical engineers, McGraw Hill, New York, 1990. 83. A.I. Lygeros, K.G. Magoulas, Column flooding and entraintment, Hydrocarbon Processing, pp. 43-44, December 1986. 84. J.A. Mandler et.al, Dynamic modelling and control of cryogenic air separation plants, IFAC Symposium on Dynamics and Control of Chemical Reactors, Distillation Columns and Batch Processes, Maastricht, The Netherlands, 1989. 188 References 85. W. Marquardt, Towards a process modelling methodology, in Methods of model based process control, edited by R. Berber, Kluwer Academic Publisher, 1995. 86. S.E. Mattsson and G. Söderlind, Index reduction in differential-algebraic equations using dummy derivates, SIAM J. Sci. Comput.,14 (3):677-692, May 1993. 87. W. Marquardt, Numerical methods for the simulation of differential-algebraic process models, In : Methods of Model Based Process Control edited by R. Berber, pp. 41-79, 1995. 88. C. Majer, W. Marquardt, E.D. Gilles, Reinitialization of DAE’s after discontinuities, Computers chem. Engng, Vol. 19, Suppl., pp. S507-S512, 1995. 89. W. Marquardt, Trends in computer-aided process modelling, Computers. chem. Engng. Vol. 20, No. 6/7, pp. 591 – 609, 1996. 90. B. Maschke, A. van der Schaft, Interconnected Mechanical Systems – Part I & Part II, Modelling and Control of Mechanical Systems – editorial. A. Astolfi, Imperial College Press, London, 1997. 91. K. Mehlhorn, S. Naeher, and C. Uhrig. The LEDA User Manual. LEDA Software GmbH, 66123 Saarbruchen, Germany, 3.5.1.edition, 1997. 92. C.J. Nagel, et al, Modelling languages: declarative and imperative descriptions of chemical reactions and processing systems, Advances in Chemical Engineering, Vol. 21, Academic Press, 1995. 93. B.Nilsson, Object-oriented modelling of chemical processes, PhD thesis, Department of Automatic Control, Lund Institute of Technology, 1993. 94. O. Ogboja, A. Kuye, A procedure for the design and optimisation of sieve trays, Trans. IChemE, Vol. 68, Part. A., pp. 445-452, September 1990. 95. Olimans, Lecture notes: Multiphase flow and heat transport, Department of Mechanical Engineering, Delft University of Technology, 1997. 96. J. Olsen, G.O. Endrestol, T. Sira, A rigorous and efficient distillation column model for engineering and training simulators, Computers Chem. Engng., Vol. 21, Suppl, pp. S193-S198, 1997. 97. C.C. Pantelides, et al, The mathematical modelling of transient systems using differential-algebraic equations, Computers chem. Engng., Vol.12, No.5, p.449454,1988. 98. C.C. Pantelides, The consistent initialization of differential-algebraic systems, SIAM J. Sci. Stat. Comput, Vol. 9, No. 2, March 1988. 99. C.C. Pantelides and P.I. Barton, Equation-oriented dynamic simulation current status and future perspectives, Proceedings of European Symposium on Computer Aided Process Engineering-2, 1992. 100. C.C. Pantelides, Lecture notes : Dynamic behaviour of process systems. Centre for Process Systems Engineering, Imperial College of Science, Technology and Medicine, London , 1996. 101. L.R. Petzold, Y. Ren, T. Maly, Regularization of high-index differential-algebraic equations with rank deficient constraints, SIAM J. Sci. Comput, Vol. 18, No. 3, preprint, May 1997. 102. A.A.G. Perez, Modeling of a Gas Turbine in Modelica, Master Thesis, Lund University, 2001. 103. J.W. Ponton, P.J. Gawthrop, Systematic construction of dynamic models for phase equilibrium processes, Computers Chem. Engng, Vol. 15, No. 12, pp. 803808, 1991. 104. H.A. Preisig, Modelling of chemical physical processes, DISC Summer School on the Behavioural and Computer-Assisted Approaches to Modelling for Control, Groningen, The Netherlands, 9-12 June 1998. 189 References 105. A.C. Pugh, On Composite systems that preserve the degrees of their subsystems, International Journal of Control, Vol. 21, No.3, pp. 465-473, 1975. 106. E. Ranzi, M. Rovaglio, T. Faravelli and G. Biardi, Role of energy balances in dynamic simulation of multicomponent distillation columns. Comput. chem. Engng. Vol. 12, No.8, pp. 783-786, 1988. 107. H.H. Rosenbrock, State-space and multivariable theory, Thomas Nelson and Sons Ltd.,1970. 108. H.H. Rosenbrock, Order, degree, and complexity, International Journal of Control, Vol. 19, No. 2, pp. 323-331, 1974. 109. Rosenbrock, A.C. Pugh, Contributions to hierarchical theory of systems, International Journal of Control, Vol. 19, No.5, pp. 845 – 867, 1974. 110. S.I. Sandler, Chemical and engineering thermodynamics, Wiley Series in Chemical Engineering, John Wiley & Sons, New York, 1989. 111. R. F. Sincovec, A.M. Erisman, E.L. Yip, M.A. Epton, Analysis of descriptor systems using numerical algorithms, IEEE Transactions on Automatic Control, Vol. AC-26, No.1, february 1981. 112. P. Schoen, Dynamic modelling and control of integrated coal gasifiaction combined cycle units, PhD Thesis, Delft University of Technology, 1993. 113. Simulink User’s Guide. A program for simulating dynamic systems, The Math Work Inc., 2000. 114. J. Soetjahjo, Sj. Dijkstra, Strategy on large scale processmodelling – case dynamic modelling of an air separation plant, Benelux – Systems and Control Meeting, March 1995. 115. J. Soetjahjo, O.H. Bosgra, J. Grievink, Modelling and control strategy of an Integrated Coal Gasification Combined Cycle Plant, 3rd Annuals Control Specialist Shell Meeting – Noorde-wijkerhout, 18 Juni 1996. 116. J. Soetjahjo, Sj. Dijkstra, Structural and numerical aspects of high index process models, Benelux – System and Control Meeting, 6 March 1997. 117. J. Soetjahjo, Y.G. Go, O.H. Bosgra, Diag – a structural diagnose tool for interconnection assignment in model building and re-use. Computers chem. Engng. Vol. 22, Suppl., pp. S933-S936, 1998. 118. SpeedUp User’s Manual. Aspen Technology, Cambridge, United Kingdom, 1994. 119. T. Take, et.al. Fuel substitution characteristics in phosphoric acid fuel cells, Fuel Cell Seminar, November 29 – December 2, 1992, Tucson, Arizona, USA. 120. R. Taylor, R. Krishna, Multicomponent mass transfer, Wiley Series in Chemical Engineering, 1993. 121. R. Taylor, H.A. Kooijman, J.S. Hung, A second generation nonequilibrium model for computer simulation of multicomponent separation processes, Computers Chem. Engng., Vol. 18, No. 3, pp. 205-217, 1994. 122. J.A. Tap, Verification of stationary model of integrated coal gasification combined cycle plant, Master Thesis, Department of Chemical Engineering, Delft University of Technology, 1995. 123. J.Top, Conceptual modelling of physical systems, PhD thesis, Department Informatics, Twente University of Technology, The Netherlands, 1993. 124. F. Trankle, A. Gerstlauer, M. Zeitz, E.D. Giles, Application of modeling and simulation environment PROMOT/DIVA to the modeling of distillation processes, Computers Chem. Engng., Vol. 21, Suppl., pp. S841-S846, 1997. 125. J. Unger, W. Marquardt, Structural analysis of differential-algebraic equation systems, Computer-Oriented Process Engineering - edited by L. Puigjaner and A. Espuna, pp. 241-246, Elsevier Science Publishers, Amsterdam, 1991. 190 References 126. J. Unger, A. Kröner, W. Marquardt, Structural analysis of differential-algebraic equations systems – theory and applications, Computers chem. Engng., Vol. 19, No. 8, p. 867-882, 1995. 127. G.C. Verghese, B.C. Lévy, and T. Kailath, A generalised state-space for singular systems, IEEE Transactions on Automatic Control, ac-26(4):811-831, August 1981. 128. A.J.J. Van der Weiden, The use of structural properties in linear multivariable control system design, PhD thesis, Department of Mechanical Engineering, Delft University of Technology, 1982. 129. J.H. Wilkinson, Linear differential equations and kronecker’s canonical form, In: Recent Advances in Numerical Analysis edited by C. de Boor and G.H. Golub, Academic Press, New York, 1978. 130. K.D. Wiegner, P.J.A. Tijm, F.A.M. Schrijvers, Clean power from the Shell Coal Gasification Process – VGB Conference – Coal Gasification, Essen, 1991. 131. J.C. Willems, Paradigms and puzzles in the theory of dynamical systems, IEEE Transactions on Automatic Control, 36 (3), March 1991 132. J.C. Willems, The behavioral approach to systems and control, Nieuw Archief voor Wiskunde – Vierde serie Deel 14 no.1, pp.145-158, Maart 1996. 133. P.M.E.J. Wijckmans, Conditioning of differential algebraic equations and numerical solution of multibody dynamics, PhD Thesis. Scientific Computing Group, Eindhoven University of Technology. 1996 134. W. M. Wonham, Linear Multivariable Control: A geometric Approach, SpringerVerlag, second edition, 1979. 135. Westerweele, M.R. Five Steps for Building Consistent Dynamic Process Models and their Implementation in the Computer Tool Modeller, PhD Thesis. Eindhoven Technical University 2003. The Netherlands 136. Zuiderweg, Lecture note : Separation methods, Department of Mechanical Engineering, Delft University of Technology, 1988. 191 References 192 Samenvatting Proces modellering speelt een belangrijke rol in de proces engineering en de bedrijfsvoering van processen. Procesmodellen worden gebruikt voor het ontwerpen van procesapparatuur en procesregelingen, het voorspellen van procesgedragingen en de optimalisatie van producteigenschappen bij de bedrijfsvoering van processen. Gewoonlijk bestaat een procesmodel uit meerdere, onderling met elkaar verbonden, submodellen, namelijk uit een netwerk van submodellen, opgebouwd uit verschillende lagen, met op elke volgende laag een toenemende detaillering van de modelbeschrijving. Modellering van elk afzonderlijk subsysteem wordt gepresenteerd door een 1e orde niet lineair DAE (Differential Algebraic Equations). Een consequentie van proces modellering met een DAE model is de kans op een hoog index en/of een consistent (re-) initialisatie probleem. Een index van een DAE model kan eenvoudig worden samengevat als het aantal keren van differentiëren welke nodig zijn om het originele DAE model te transformeren naar een expliciet ODE model. Een hoge index ontstaat indien deze differentiatie meer dan een keer dient te worden uitgevoerd. Een hoog index probleem kan worden veroorzaakt door een verkeerde keuze van de ingangsvariabelen, interne afhankelijkheid tussen de toestandsvariabelen (bijvoorbeeld door evenwicht reactie vergelijking, of door een fasen evenwicht vergelijking) of door interconnectie van verschillende submodellen. Een consistent (re-) initialisatie probleem betekent dat het niet mogelijk is om een willekeurige waarde te geven voor de opslag/toestand variabelen. Een hoog index model en een laag index model met niet minimale differentiële variabelen geeft altijd een consistent (re-) initialisatie probleem. In principe vraagt de oplossing van een hoog index probleem om differentiatie in plaats van alleen maar integratie. Afgezien van het feit dat de meeste numerieke algoritmes niet beschikken over een differentiatie algoritme, is het niet praktisch om wederzijds verbonden hoog index modellen op te lossen omdat een hoog index DAE zich ook manifesteert als een consistent (re-) initialisatie probleem. Een modelbouwer kan te maken krijgen met onvoorspelbare gedragingen van het model op de gedefinieerde of gekozen opgeslag/toestand variabelen, namelijk deze opslag/toestand variabelen kunnen een ‘sprong’ maken in hun tijd respons. Wanneer men een grootschalig verbonden systemen modelleert dient men een hoog index DAE model te vermijden. Er is veel onderzoek gedaan naar het oplossen van een hoog index DAE model. Het verschil van het werk in deze thesis in vergelijking met dat van anderen is het feit dat het vaststellen van een hoog index probleem en index reductie technieken worden ontwikkeld vanuit de originele theorie van Kronecker en Rosenbrock [107], namelijk de strikte systeem equivalente operatie. Deze strikte systeem equivalente operatie voert de gewenste differentiatie met behoud van het ingang uitgang gedrag van het systeem. De theorie van Kronecker en Rosenbrock [107] is uitgebreid voor een 1e orde vi Samenvatting niet lineair DAE model door gebruik te maken van de structurele informatie van de vergelijkingen in plaats van de exacte numerieke variabelen. Deze thesis laat zien dat het voor een 1e orde DAE procesmodel mogelijk is een procedure te vinden (gebaseerd op een strikte systeem equivalent operatie) voor een hoog index reductie welke geen gebruik maakt van niet lineaire algebraïsche bewerkingen. Door toepassing van deze methodiek worden de originele modelvergelijkingen en variabelen niet aangetast. Bovendien is het mogelijk voor een gegeven DAE model vast te stellen welke input variabelen geen hoog index probleem veroorzaken ervan uitgaande dat er geen toestand begrenzende vergelijkingen aanwezig zijn. Deze toestand begrenzende vergelijkingen kunnen worden gedetecteerd door elke gekozen input variabelen, welke geeft een maximale aantal toestandsvariabelen van het model. Interconnectie van DAE sub modellen vraagt om informatie over mogelijke ingangsvariabelen van elk afzonderlijk submodel. Deze ingangsvariabelen zijn niet per definitie uniek. Interconnecties veroorzaken geen hoogindex probleem als er geen toestand begrenzende vergelijking ontstaat door deze verbinding, dit wil zeggen dat laag index modellen resulteren in laag index samengestelde modellen. Ondanks de voordelen van toepassing van deze methode (gebruik maken alleen van de structurele informatie), komt het in uitzonderlijke gevallen voor dat een exact analytische methode geen hoge index geeft, maar structurele methode wel. Een combinatie van een symbolische en gestructureerde benadering kan dit probleem oplossen en de theorie in deze thesis kan worden gebruikt bij dergelijke toepassingen. Verder is onderzoek noodzakelijk van de hoge index theorie voor gedistribueerde systemen PDAE (Partial Differential Algenbraic Equations) omdat een toestand begrenzingprobleem zich kan manifesteren in een tijdgebied of een ruimtelijk gebied of in een combinatie van beide. vii Curriculum Vitae A.T.M. Judi Soetjahjo was born in Malang, Indonesia, 21 January 1964. He obtained his MSc. in Mechanical Engineering – Process Control and Dynamics at Delft Technical University, The Netherlands in 1992. It was here that he commenced his extensive research on dynamic process modelling until his departure in 1997. He is currently employed as a Senior (Principal) Engineer for an International Offshore Oil and Gas Engineering Company, GustoMSC Bv., based in The Netherlands. His most current assignment is as the Department Head of Electrical and Instrumentation at SBM (Single Buoy Mooring) Malaysia SDN.BHD, (Sister Company of GustoMSC Bv.) viii