MATERIAL AND ENERGY BALAN CIN G IN THE P R O C E S S INDUSTRIES From Microscopic Balances to Large Plants
COMPUTER-AI...
166 downloads
1528 Views
25MB Size
Report
This content was uploaded by our users and we assume good faith they have the permission to share this book. If you own the copyright to this book and it is wrongfully on our website, we offer a simple DMCA procedure to remove your content from our site. Start by pressing the button below!
Report copyright / DMCA form
MATERIAL AND ENERGY BALAN CIN G IN THE P R O C E S S INDUSTRIES From Microscopic Balances to Large Plants
COMPUTER-AIDED CHEMICAL ENGINEERING Advisory Editor: L.M. Rose Volume 1: Volume 2: Volume 3: Volume 4:
Distillation Design in Practice (L.M. Rose) The Art of Chemical Process Design (G.L. Wells and L.M. Rose) Computer-Programming Examples for Chemical Engineers (G. Ross) Analysis and Synthesis of Chemical Process Systems (K. Hartmann and K. Kaplick) Volume 5: Studies in Computer-Aided Modelling, Design and Operation Part A: Unit Operations (1. Pallai and Z. Fony6, Editors) Part B: Systems (1. Pallai and G.E. Veress, Editors) Volume 6: Neural Networks for Chemical Engineers (A.B. Bulsari, Editor) Volume 7: Material and Energy Balancing in the Process Industries - From Microscopic Balances to Large Plants (V.V. Veverka and F. Madron)
COMPUTER-AIDED CHEMICAL ENGINEERING, 7
MATERIAL A N D E N E R G Y B A L A N C I N G IN THE P R O CES S I N D U STRIES From Microscopic Balances to Large Plants
Vladimir V. Veverka Franti~ek Madron
ChemPlant Technology, Ostf nad Labem, Czech Republic
1997 ELSEVIER Amsterdam
--
Lausanne
--
New York --
Oxford
--
Shannon
--
Tokyo
ELSEVIER SCIENCE B.V. Sara Burgerhartstraat 25 P.O. Box 211, 1000 AE Amsterdam, The Netherlands
ISBN: 0-444-82409-x 91997 Elsevier Science B.V. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, without the prior written permission of the publisher, Elsevier Science B.V., Copyright & Permissions Department, P.O. Box 521, 1000 AM Amsterdam, The Netherlands. Special regulations for readers in the USA - This publication has been registered with the Copyright Clearance Center Inc. (CCC), 222 Rosewood Drive, Danvers, MA 01923. Information can be obtained from the CCC about conditions under which photocopies of parts of this publication may be made in the USA. All other copyright questions, including photocopying outside of the USA, should be referred to the copyright owner, Elsevier Science B.V., unless otherwise specified. No responsibility is assumed by the publisher for any injury and/or damage to persons or property as a matter of products liability, negligence or otherwise, or from any use or operation of any methods, products, instructions or ideas contained in the material herein. This book is printed on acid-free paper. Printed in The Netherlands
Contents Chapter 1
Introduction
Chapter 2
Balancing in Process Industries . . . . . . . . . . . . . . . . . . 2.1 The Problem Statement . . . . . . . . . . . , ....... 2.2 Balancing F l o w s h e e t - Graph Representation . . . . 2.3 Balancing Variables and Data Preprocessing . . . . 2.4 Data Reconciliation . . . . . . . . . . . . . . . . . . . . . . 2.5 Classification of Variables . . . . . . . . . . . . . . . . . 2.6 Data Collection and Processing . . . . . . . . . . . . . 2.7 R e c o m m e n d e d Literature . . . . . . . . . . . . . . . . . . .
7 7 12 15 19 20 22 24
Chapter 3
Mass (Single-Component) B a l ~ c e ................ 3.1 Steady-State Mass Balance and its Graph Representation . . . . . . . . . . . . . . . 3.2 More on Solvability . . . . . . . . . . . . . . . . . . . . . 3.2.1 Partition of variables and equations . . . . . . 3.2.2 Transformations . . . . . . . . . . . . . . . . . . 3.3 Observability and Redundancy . . . . . . . . . . . . . . 3..3.1 Definitions and criteria . . . . . . . . . . . . . . 3.3.2 Classification methods and transformation of equations . . . . . . . 3.4 Illustrative Example . . . . . . . . . . . . . . . . . . . . . 3.5 Just Determined Systems . . . . . . . . . . . . . . . . . . 3.6 Main Results of Chapter 3 . . . . . . . . . . . . . . . . . 3.7 R e c o m m e n d e d Literature . . . . . . . . . . . . . . . . . .
25
39 42 49 55 58
Multicomponent Balancing . . . . . . . . . . . . . . . . . . . . . 4.1 Chemical Reactions and Stoichiometry . . . . . . . . 4.2 C o m p o n e n t Mass Balances . . . . . . . . . . . . . . . . . 4.3 Reaction Invariant Balances . . . . . . . . . . . . . . . . 4.4 Element Balances . . . . . . . . . . . . . . . . . . . . . . . 4.5 Reaction Invariant Balances in a System of Units . 4.6 E x a m p l e of Multicomponent Balance . . . . . . . . . 4.7 Unsteady-State Balances . . . . . . . . . . . . . . . . . . 4.8 Main Results of Chapter 4 . . . . . . . . . . . . . . . . . 4.9 R e c o m m e n d e d Literature . . . . . . . . . . . . . . . . . .
59 59 63 70 77 79 83 87 91 96
Chapter 4
.................................
25 31 31 34 37 37
vi
Chapter 5
Material and Energy Balancing in the Process Industries
Energy Balance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Enthalpy Balance . . . . . . . . . . . . . . . . . . . . . . . 5.1 Graph and Matrix Representation 5.2 of the Enthalpy Balance . . . . . . . . . . . . . . . . . . . Example of Enthalpy Balance . . . . . . . . . . . . . . . 5.3 Heat and Mass Balancing . . . . . . . . . . . . . . . . . . 5.4 Remarks on Solvability . . . . . . . . . . . . . . . . . . . 5.5 Unsteady Energy Balance . . . . . . . . . . . . . . . . . 5.6 Main Results of Chapter 5 . . . . . . . . . . . . . . . . . 5.7 Recommended Literature . . . . . . . . . . . . . . . . . . 5.8
108 111 118 123 124 127 132
Chapter 6
Entropy and Exergy Balances . . . . . . . . . . . . . . . . . . . 6.1 Exergy and Loss of Exergy . . . . . . . . . . . . . . . . 6.2 Simple Examples . . . . . . . . . . . . . . . . . . . . . . . 6.3 Examples of Exergetic Analysis . . . . . . . . . . . . . 6.3.1 Heat exchanger network . . . . . . . . . . . . . 6.3.2 Distillation unit . . . . . . . . . . . . . . . . . . . 6.3.3 Heating furnace . . . . . . . . . . . . . . . . . . . 6.4 Concluding Remarks . . . . . . . . . . . . . . . . . . . . . 6.5 Recommended Literature . . . . . . . . . . . . . . . . . .
135 135 137 170 170 172 173 175 176
Chapter 7
Solvability and Classification of Variables I Linear Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.1 General Analysis . . . . . . . . . . . . . . . . . . . . . . . . 7.2 Canonical Format of the System of Equations 7.3 Commentary and Examples . . . . . . . . . . . . . . . . 7.4 Main Results of Chapter 7 . . . . . . . . . . . . . . . . . 7.5 Recommended Literature . . . . . . . . . . . . . . . . . .
177 177 184 191 196 199
Chapter 8
99 99
...
Solvability and Classification of Variables II Nonlinear Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.1 Simple Examples . . . . . . . . . . . . . . . . . . . . . . . 8.2 Solvability of Multicomponent Balance Equations 8.2.1 Transformation of the equations . . . . . . . 8.2.2 Additional hypotheses . . . . . . . . . . . . . . 8.2.3 Independent variables . . . . . . . . . . . . . . 8.2.4 Degrees of freedom . . . . . . . . . . . . . . . . 8.2.5 Solution manifold . . . . . . . . . . . . . . . . . 8.2.6 Remarks . . . . . . . . . . . . . . . . . . . . . . . . 8.2.7 Example . . . . . . . . . . . . . . . . . . . . . . . . General Solution Manifold . . . . . . . . . . . . . . . . . 8.3 8.3.1 Energy balance equations . . . . . . . . . . . .
201 201 213 213 217 224 228 234 235 238 244 244
vii
8.4 8.5
8.6 8.7
Chapter 9
Chapter 10
Chapter 11
8.3.2 The whole system of balance equations 8.3.3 Heat exchangers . . . . . . . . . . . . . . . . . . 8.3.4 Heat and mass balances . . . . . . . . . . . . . 8.3.5 General nonlinear models . . . . . . . . . . . . Jacobi Matrix and Linearisation . . . . . . . . . . . . . Classification Problems; Observability and Redundancy . . . . . . . . . . . . . . 8.5.1 Examples . . . . . . . . . . . . . . . . . . . . . . . 8.5.2 Theoretical analysis . . . . . . . . . . . . . . . . 8.5.3 Theoretical classification . . . . . . . . . . . . 8.5.4 Classification in practice . . . . . . . . . . . . Main Results of Chapter 8 . . . . . . . . . . . . . . . . . R e c o m m e n d e d Literature . . . . . . . . . . . . . . . . . .
..
250 251 255 257 258 265 265 270 277 284 288 295
Balancing Based on Measured D a t a - Reconciliation I Linear Reconciliation . . . . . . . . . . . . . . . . . . . . . . . . . 9.1 Problem Statement . . . . . . . . . . . . . . . . . . . . . . 9.2 Reconciliation Formulae . . . . . . . . . . . . . . . . . . 9.3 Statistical Characteristics of the Solutions; Propagation of Errors . . . . . . . . . . . . . . . . . . . . 9.4 Gross Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.5 Systematic Errors . . . . . . . . . . . . . . . . . . . . . . . 9.6 Main Results of Chapter 9 . . . . . . . . . . . . . . . . . 9.7 R e c o m m e n d e d Literature . . . . . . . . . . . . . . . . . .
312 329 342 345 350
Balancing Based on Measured D a t a - Reconciliation II Nonlinear Reconciliation . . . . . . . . . . . . . . . . . . . . . . 10.1 Simple Examples and Problem Statement . . . . . . 10.2 Conditions of M i n i m u m . . . . . . . . . . . . . . . . . . . 10.3 Properties of the Solution . . . . . . . . . . . . . . . . . 10.4 Methods of Solution . . . . . . . . . . . . . . . . . . . . . 10.4.1 Improving the initial guess . . . . . . . . . . . 10.4.2 Suboptimal reconciliation . . . . . . . . . . . . 10.4.3 Final reconciliation . . . . . . . . . . . . . . . . 10.4.4 Short-cut method . . . . . . . . . . . . . . . . . . 10.4.5 Remarks . . . , . . . . . . . . . . . . . . . . . . . . 10.5 Gross Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.6 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.7 Main Results of Chapter 10 . . . . . . . . . . . . . . . . 10.8 R e c o m m e n d e d Literature . . . . . . . . . . . . . . . . . .
353 353 364 367 374 374 376 380 384 387 394 399 409 414
Dynamic Balancing . . . . . . . . . . . . . . . . . . . . . . . . . . 11.1 Mass Balance Model with Accumulation . . . . . . .
417 417
297 297 303
viii
Chapter 12
Chapter 13
Material and Energy Balancing in the Process Industries
11.2 Daily Balancing . . . . . . . . . . . . . . . . . . . . . . . . 11.3 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.4 Recommended Literature . . . . . . . . . . . . . . . . . .
422 434 435
Measurement Planning and Optimisation . . . . . . . . . . . 12.1 Single-Component Balancing . . . . . . . . . . . . . . . 12.1.1 Finding the first solution . . . . . . . . . . . . 12.1.2 Optimal measurement placement from the standpoint of measurement precision 12.2 The General Case . . . . . . . . . . . . . . . . . . . . . . . 12.2.1 Problem statement . . . . . . . . . . . . . . . . . 12.2.2 Objective functions . . . . . . . . . . . . . . . . 12.2.3 Theory . . . . . . . . . . . . . . . . . . . . . . . . . 12.2.4 Solution of the problem . . . . . . . . . . . . . 12.2.5 Results . . . . . . . . . . . . . . . . . . . . . . . . . 12.2.6 Example . . . . . . . . . . . . . . . . . . . . . . . . 12.2.7 Optimality of the solution . . . . . . . . . . . . 12.3 Main Results of Chapter 12 . . . . . . . . . . . . . . . . 12.4 Recommended Literature . . . . . . . . . . . . . . . . . .
437 437 438 .
440 441 441 442 443 444 447 449 452 453 454
Mass and Utilities Balancing with Reconciliation in Large Systems A Case Study . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457 13.1 The Problem Statement . . . . . . . . . . . . . . . . . . . 457 13.2 Requirements on the Industrial Balancing System . 460 13.3 Important Attributes of an Industrial Balancing System463 13.4 Balancing Errors . . . . . . . . . . . . . . . . . . . . . . . . 465 13.4.1 Mistakes in the balance flowsheet - topology errors . . . . . . . . . . . . . . . . . . 465 13.4.2 Analysis of balance inconsistency - balance differences . . . . . . . . . . . . . . . 467 13.4.3 Identification of the cause of a gross error 468 13.5 Structure of the Balancing System IBS . . . . . . . . 469 13.6 Configuration of the Balancing System - A Case Study . . . . . . . . . . . . . . . . . . . . . . . . . 472 13.7 Examples of Balancing Proper . . . . . . . . . . . . . . 475 13.7.1 Correct balance - the base case . . . . . . . . . . . . . . . . . . . 475 13.7.2 Balancing with a gross error . . . . . . . . . . 477 13.7.3. Some quantities unobservable . . . . . . . . . 478 13.7.4 Topology e r r o r - some streams missing . . 479 13.7.5 Topology errors - too many fixed streams 480 13.7.6 Reporting . . . . . . . . . . . . . . . . . . . . . . . 481
ix 13.8
13.9
Experience with C o m p a n y - W i d e Mass and Utilities Balancing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13.8.1 Balancing in operating plants . . . . . . . . . 13.8.2 Implementation of a company-wide balancing system . . . . . . . . . . . . . . . . . . Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . .
481 482 482 485
A p p e n d i x A Graph Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A.1 Basic Concepts . . . . . . . . . . . . . . . . . . . . . . . . . A.2 Subgraphs and Connectedness, Circuits and Trees A.2.1 Subgraphs and connected components . . . A.2.2 Connected graphs, circuits, trees . . . . . . . A.3 Properties of the Incidence Matrix . . . . . . . . . . . A.3.1 Case when G is a tree . . . . . . . . . . . . . . A.3.2 General connected graph, elimination of circuits . . . . . . . . . . . . . . . . . . . . . . . A.4 Graph Operations . . . . . . . , ............... A.4.1 Finding connected components . . . . . . . . A.4.2 Derived operations . . . . . . . . . . . . . . . . . A.4.3 Merging of nodes . . . . . . . . . . . . . . . . . A.5 Costed Graphs . . . . . . . . . . . . . . . . . . . . . . . . . A.6 R e c o m m e n d e d Literature . . . . . . . . . . . . . . . . . .
487 487 491 491 493 497 498
Appendix B Vectors and Matrices . . . . . . . . . . . . . . . . . . . . . . . . . B.1 Vector Spaces . . . . . . . . . . . . . . . . . . . . . . . . . .
515 515 518 521 523 526 532 538 543 551 554 562
B.2 B.3 B.4 B.5 B.6 B.7 B.8 B.9 B.10 B.11
Dimension and Bases . . . . . . . . . . . . . . . . . . . . Vector Subspaces . . . . . . . . . . . . . . . . . . . . . . . Classical Vector Spaces . . . . . . . . . . . . . . . . . . . Linear Maps . . . . . . . . . . . . . . . . . . . . . . . . . . . Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . More on Matrices; Elimination . . . . . . . . . . . . . . Matrix Operations . . . . . . . . . . . . . . . . . . . . . . . Symmetric Matrices . . . . . . . . . . . . . . . . . . . . . Orthogonality . . . . . . . . . . . . . . . . . . . . . . . . . . Determinants . . . . . . . . . . . . . . . . . . . . . . . . . .
A p p e n d i x C Differential Balances . . . . . . . . . . . . . . . . . . . . . . . . . C.1 Material Continuum . . . . . . . . . . . . . . . . . . . . . C.2 Interface Balances . . . . . . . . . . . . . . . . . . . . . . . C.3 Thermodynamic Consistency . . . . . . . . . . . . . . . C.4 Exact Integral Balances . . . . . . . . . . . . . . . . . . . C.5 Electrochemical Processes . . . . . . . . . . . . . . . . . C.6 R e c o m m e n d e d Literature . . . . . . . . . . . . . . . . . .
500 503 503 506 506 507 513
571 571 575 576 578 582 584
X
Material and Energy Balancing in the Process Industries
A p p e n d i x D Differential form of the 2nd Law of Thermodynamics . . D.1 Recommended Literature . . . . . . . . . . . . . . . . . .
585 588
Appendix E Probability and Statistics . . . . . . . . . . . . . . . . . . . . . .
589 589 597
E.1 E.2 Appendix F
Random Variables and their Characteristics . . . . . Special Probability Densities . . . . . . . . . . . . . . .
Exercises
609
List of Symbols
623
Subject Index
633
Chapter 1 INTRODUCTION
Material and energy balancing belongs to very frequent chemical engineering activities. In spite of this fact, a systematic treatment of this topic in the form of a monograph is quite rare. Balancing also usually forms one or more introductory chapters in general chemical engineering textbooks, but the limited space available there usually makes not possible to cover this subject in depth. The classical treatment of balances in the literature available (which was excellent at the time of publishing) needs to be complemented nowadays for several reasons. Balancing belonged to the first successful use of computers in chemical engineering in early sixties. Since then the spread of computers (and especially personal computers) influenced balancing significantly. The classical steady state balancing in the stage of process design now represents only a part of balancing problems we can meet in practice. Mass and energy balancing (accounting) now becomes to be a standard feature of plant information systems as a part of efforts to guarantee good housekeeping of operating plants. Process plants very often represent complex systems linked to one another to enable functioning in the most efficient way. The automatic computerised analysis and synthesis of balancing relations among hundreds or thousands of process streams requires a systematic approach respecting all possible situations which can occur in practice. This fact brought the need for new balancing techniques based on graph theory and
statistics. The other important feature of balancing calculations is the danger of
insufficient accuracy of results. Unmeasured flows and concentrations calculated on the basis of imprecise data are in most cases differences of big numbers. This fact influences adversely the accuracy of results and in some situation makes them useless. The confidence intervals should be an integral part of balancing results based on imprecise data. Even more dangerous is the possible occurrence of gross measurement errors which can devalue results even more seriously. The problems of confidence intervals and gross errors detection and elimination can be solved by data reconciliation. Instrumentation in process plants is very often not sufficient for setting up detailed and reliable balances. Design and maintenance of instrumentation systems is strongly influenced by control engineers with the primary target of process control. To improve situation in this area new techniques of instrumenta-
2
Material and Energy Balancing in the Process Industries
tion design and optimisation for balancing purposes are now available (optimum measuring placement). Retrofitting and revamping of operating plants is now important part of investment to process industries. The new design of the plant relies heavily on underlying process data. Material and energy balances needed for retrofitting and revamps must be much more detailed than is common in regular plant operation. Special plant tests are run with additional (portable) instrumentation. The reliability and completeness of balances influences the success of overall project significantly. Increased interest in energy conservation in large systems requires a systematic approach to consistent problem definition. Particularly successful is the use of pinch technology. The application of pinch technology to existing plants (revamps) depends on reliable heat and energy balances. The Classical energy (or enthalpy) balances are now complemented by balancing of entropy and exergy (availability). There are also new balancing techniques used in the process control (dynamic balances, instrumentation design and maintenance, etc.). Advanced control techniques incorporated in process computers are very often based not only on directly measured variables but also on secondary variables calculated from balance models. The present book will complement the information present in classical balancing literature by the following topics: systematic analysis of large systems by Graph theory comprehensive thermodynamic analysis (entropy and availability) balancing on the basis of redundant raw plant data (reconciliation, propagation of random measurement errors, detection and elimination of gross errors) measurement design and optimisation (optimal measurement placement) dynamic balancing experience with plant-wide regular mass and energy balancing as a part of plant's process information system. The structure of the book is as follows: The most elementary and unequivocal balance of a technological system is its mass balance, dealt with in Chapter 3. Although the balance of a node (unit of the system) is almost trivial (mass in = mass out + possible accumulation), the fact that the individual nodes are connected by streams where output stream from one unit becomes input stream into another unit gives rise to a complex structure represented by the graph of the system. The methods of Graph theory enable one to analyse completely the problems of solvability in a mathematically precise
Chapter 1- Introduction
3
manner. They are treated rather extensively with the aim to give the reader an idea of the basic concepts used henceforth: the graph representation, the partition of the streams into measured and unmeasured, solvability conditions, observability and redundancy. Generally, the streams are mixtures of several chemical species (components of the mixture). The multicomponent balancing is dealt with in Chapter 4. Certain nodes of the system can be reaction nodes. Having specified the chemical reactions considered admissible in a reaction node, by the laws of chemical stoichiometry the balance of a reacting species involves a source term due to the (positive or negative) production of the species by the reactions. Using an algebraic procedure described in Section 4.3, the (usually a priori unknown) source terms can be eliminated giving a set of'reaction invariant balances'; so the number of unknown variables (parameters) is reduced. Of main interest are steady-state balances neglecting the terms due to accumulation in the nodes. The formulation of an unsteady-state balance brings no theoretical problem (see Section 4.7); specified is the balance of a batch reactor. The exact energy balance (Chapter 5) is only hypothetical. In practice, less relevant items (such as kinetic and potential energy) are neglected and neglecting also the accumulation terms, we have the steady-state enthalpy balance. Each material stream is assigned its specific enthalpy with the condition that the specific enthalpies are thermodynamically consistent. In addition we introduce net energy streams representing heat transfer or also mechanical power supply completing the balance of any node. For the case that only total mass is balanced along with energy (enthalpy), a simplified version of the balance is presented in Section 5.4 (heat and mass balancing); an important special case is a heat exchanger network. For completeness, in Section 5.6 we give general form and examples of unsteady energy balance. Of different nature is the entropy balance dealt with in Chapter 6. It is not a balance in the proper sense because no quantity is conserved. In fact it is a method of thermodynamic analysis of the processes in the system. More familiar to engineers is the notion of exergy (availability). The (necessarily positive) production of entropy in any node is proportional to the loss of exergy in the node; the goal is to reduce the loss as far as possible. The chapter gives a number of examples of such thermodynamic analysis, along with critical comments. Chapters 7 and 8 are devoted to the problems of solvability. We call a set of equations solvable when there exists some vector of solutions, not necessarily unique. In Chapter 3, we have shown that the set of mass balance equations is always solvable if no variable has been fixed a priori. With redundant measured variables, the equations need not be (and usually are not) solvable, unless the fixed variables have been adjusted. Then certain unknown (unmeasured) variables are uniquely determined (observable), other still not (unobservable variables). Certain measured variables can be nonredundant: they
4
Material and Energy Balancing in the Process Industries
are not affected by the solvability conditions thus their values are arbitrary. The set of mass balance equations is an example of a linear system. In Chapter 7 we analyse the solvability of a linear system in general, using the methods of linear algebra. In particular we transform the equations to (what we call the) canonical format (Section 7.2) and give explicit criteria for the solvability classification. The main goal is to give methods that can be applied to the (considerably more difficult) analysis of non-linear systems. The multicomponent chemical species and energy balances are mostly non-linear in the primary variables (mass flowrates, mass fractions, temperatures, possibly also pressures of the streams). The solvability analysis of non-linear systems in Chapter 8 begins with examples showing that even in simple cases, the terminology introduced for linear systems (in particular observability and redundancy) becomes somewhat vague: certain problems can be 'not well-posed'. We then first analyse the solvability of the whole system of balance equations without a priori fixed variables (Sections 8.2 and 8.3) and show that under certain plausible structural hypotheses, the system is solvable. If the values of certain variables have been fixed a priori (for example measured), there is no mathematically precise general solution to the observability and redundancy classification problem. We did not attempt to arrive at a complete analysis. Still, we have shown that remitting somewhat the mathematical precision, a pragmatically plausible classification is possible if the problem is linearized. In Chapters 9 and 10, we deal with balancing based on measured data. The measured data are subject to random errors, and are processed by statistical methods. A statistically rigorous approach is possible if the balance constraints are linear; see Chapter 9. The measured data are first adjusted so as to obey the solvability conditions and minimise the generalised sum of squares of the adjustments; the procedure is called reconciliation. In particular if the distribution of measurement errors is Gaussian with zero mean, we thus obtain the maximum likelihood estimates. Also the estimates of the unmeasured observable variables can then be computed. Even if the distribution is not Gaussian, we can compute statistical characteristics (in particular standard deviations) of the estimates (and possibly also of other variables dependent linearly on the former). With a Gaussian distribution, the confidence intervals for the estimates are thus found. Important is the fact that the presence of redundant measured variables generally improves the precision of the results. On the other hand a measurement error in one variable affects also the estimates of other variables (so-called propagation of errors); in particular the presence of gross errors can spoil the whole result of reconciliation. Methods of detection and elimination of gross errors can be based on the statistical analysis of data; see Section 9.4. A rigorous formulation of the reconciliation problem is possible even with non-linear constraints; only the general existence and uniqueness of a
Chapter
1 -
Introduction
5
solution is not warranted theoretically. Still, with possible exception of considerable gross errors or inadequate selection of the measured variables the problem appears as solvable in practice as shown in Chapter 10. The methods are based on successive approximations (such as successive quadratic programming), where the special character of the criterion to be minimised can be made use of; see Section 10.4. Although not rigorous from the statistical point of view, the approximate statistical characteristics of the estimates can be computed if the constraints are linearised at the final solution. The latter linearisation makes also possible to classify the variables according to Subsection 8.5.4 of Chapter 8. Finally the methods of detection and elimination of gross errors according to Chapter 9 can be applied to the linearised system of equations (Section 10.5). Chapter 11 deals with dynamic (unsteady-state) mass balancing of a technological system involving inventories. A straightforward method of reconciliation is presented avoiding accumulation of small systematic errors in the time series of measurements. The method has proved successful in practice and can also be supported by theoretical arguments. There is generally a great number of possibilities how to select the set of values to be measured, thus the measuring points. The criteria of optimality and the ways leading towards an optimum are analysed in Chapter 12. A more or less heuristic procedure is suggested eliminating successively measuring points that involve high costs and/or give unprecise estimates of the required quantities. If theories and methods presented in the book should to be successful in the practice, many prerequisites must be fulfilled. Typical example of the complexness of the problem can be regular (e.g. daily) balancing in process plants based on measured data. Chapter 13 deals with problems which can be encountered in regular balancing of mass and utilities in refinery and petrochemical complexex. The analysis of the problem is complemented by the experience gained during development and implementation of mass and utilities balancing with reconciliation in the framework of company's process information system. It is the intention of authors to present balancing techniques in a systematic and rigorous way. To make the book at the same time more readable, some parts are included in 5 Appendices. The appendices A,B, and E will enable the reader to brush up and possibly extend his knowledge of graph theory, vector and matrix algebra, and statistical theory pertaining to the problems of balancing. For the interested reader's convenience, the theory is presented in a largely selfcontained manner, with (at least outlined) mathematical proofs. In perusing Chapters 3-8, the reader can manage with Appendix A and Sections B.1-8 of Appendix B. Sections B.9-11 and Appendix E constitute the theoretical basis of Chapters 9-11. The subtitle of the book reads 'From microscopic balances to large plants'. The first part of the promise is fulfilled in Appendices C and D. If the reader is more deeply interested in the physics underlying the ('macroscopic') node balances, before perusing Chapters 4 and 5 he can begin with Appendix C,
6
Material and Energy Balancing in the Process Industries
and with Appendix D before Chapter 6. He will then perhaps better understand the complex nature of the processes in the technological units, and the (necessary) simplifications adopted in setting-up the balances of a technological system. There are many examples throughout the book which serves for better understanding of theory presented there. To gain more practice in solving balancing problems, Appendix F presents several exercises dealing mostly with balancing with reconciliation. The exercises are used in reconciliation courses given by one of the authors of the book. Unfortunately, the data reconciliation is out of reach of the power of pocket calculators even for very simple flowsheets. If the reader wants to go through the workshop based on Appendix F, he can obtain (free of charge) mass and heat balancing software RECON suitable for IBM compatible personal computers (see the coupon at the end of the book). This software is sufficient for the complete solution of exercises including the statistical analysis of data.
Chapter 2 BALANCING IN PROCESS INDUSTRIES 2.1
THE PROBLEM STATEMENT
Let's start with several simple examples illustrating basic balancing tasks encountered in different branches of process industries (refineries, petrochemical plants, inorganics, etc.). Fig. 2-1. depicts a simple scheme for a mass balance. Besides the distillation column (1) and a distillate storage tank (2), the scheme comprises also more complex subsystems of apparatuses which are balanced here as "black boxes". Node (5) represents here a distributor of electric energy supply.
2
3
12 I .....................................
3
'I
"-O I I
Fig. 2-1. A flowsheet for a single-component balance
Streams are usually classified as process streams (streams 1 to 8) and utilities, such as electricity or cooling water (streams 9 to 11). This classification is useful, because process streams usually don't mix with utilities. Systems of balancing equations of process streams and of individual utilities are often independent and can be solved separately. The classification of the stream (12)
8
Material and Energy Balancing in the Process Industries
is problematic. In the subsystem (4) arises the process off-gas which is further led to the subsystem (3) to be burned in a furnace; so it becomes here a utility stream. The most simple balance of the system in a certain (usually integral) time interval means the complete information about exchange of balanced quantities (overall mass, components, different forms of energy, etc.) among separate elements (nodes) of the system or among nodes and the environment inventories of balanced quantities in nodes at the beginning and at the end of the balancing interval, or how the inventories have changed (accumulation) At this moment we are interested in the overall mass flows in the case of mass streams (for example in tons) and electric energy (for example in GWh). We are not interested in other characteristics of streams as chemical composition, because it can be supposed that the quality of the individual streams is guaranteed by the control system. Balance equations for this problem can be expressed as sum of inputs = sum of outputs + increase of inventory for every node in the system. It is the case of so-called single component balance when there is one balancing equation around any node. The balance can be also classified as dynamic because the process need not be at steady state as we admit the change of inventory in the tank (2). The incentive for setting up the balance in such system is regular monitoring of yields of main products and of specific consumption of utilities as a part of "good house keeping" of the plant. Let's consider the second flowsheet in Fig. 2-2. where is the distillation/absorption train for processing of refinery off-gases. Refinery off-gas (1) consists of light hydrocarbons (C1 to C7), hydrogen and inert gases (N2, Ar). The column No. 1 serves as absorber/desorber. Hydrogen, inerts and C1 and C2 hydrocarbons are boiled up in the bottom part of the column and heavier hydrocarbons (C3, C4) are absorbed in the upper part of the column by heavy hydrocarbons (C6 and C7). The lean gas (2) leaving the head of the column is later burned in the furnace. The second column serves for separation of C3 and C4 hydrocarbons from the absorbent (6) which circulates among columns (1) and (2). The middle hydrocarbons (4) consisting mostly of propane and butanes are separated in the third column which produces commercial products propane (7) and butane (8).
Chapter 2 - Balancing in process industries
9
2t
7
2
v
3
I Fig. 2-2. Separation of light hydrocarbons
In this case we are interested in so-called multicomponent balance when individual components (inerts, individual hydrocarbons and hydrogen) are conserved. We can write one component balance equation for every component and the column (if the component is present in this column). The result of the balance is the complete information not only about overall flows but also about the composition of individual streams. Such multicomponent balance is important for tracing valuable components in the process. The value of commercial products (propane and butane) is much higher than the value of the lean gas. Significant economical losses can occur if the absorption in the first column does not operate properly and valuable hydrocarbons are lost in the lean gas. There are also other incentives for setting up such multicomponent balance. The balance in a multicomponent system can serve for validation of sampling and analytical methods. The analysis of imbalances (inputs minus outputs) can reveal errors caused by improper sampling or erroneous analytical methods. Nowadays, process simulators which can simulate the behaviour of the plant on the computer are more and more used for the optimisation and control of processes. The major problem in using simulators is their tuning to simulate properly all important features of the real process. This can be done only by comparison of the result of simulation with the complete component balance set up on the basis of plant data. input
output
reactor C12,CH4
Fig. 2-3. A chlorination reactor
CI_,,CH4,CH3C1,CH2C12, CHCls, CC14,HC1
10
Material and Energy Balancing in the Process Industries
There is a chlorination reactor in Fig. 2-3. Methane is chlorinated in a complex reaction set which can be summarised as CH 4
+ C12 CH3C1 + C12 CH2C12 + C12 CHC13 + C12
= CH3C1 + HC1 = CH2C12 + HC1 = CHC13 + HC1 = CC14 + HC1.
In this case the individual components are not conserved in the reactor as they can be consumed or created by reactions. The balance of the reactor is governed by the stoichiometry of the reaction system. In this case we speak about the multicomponent balance with chemical reaction. The result of balancing is the complete information about amount of individual components entering and leaving the reactor and also about reaction characteristics as reaction rates or extents of reaction. Balancing of reacting systems is important for detailed analysis of processes running in the reactor, either in the stage of laboratory or pilot plant studies, or as regular monitoring of industrial reactors behaviour (yields, selectivity). In the last case it is possible to reveal important changes as improper control, ageing of the catalyst, etc., which can cause serious economic losses or even jeopardise the safety of the whole process. Another flowsheet is in Fig. 2-4. The distillation column is complemented by two heat exchangers which makes possible preheating of the feed by the contact with hot bottom product. In practice, especially in refinery and petrochemical industries, we can meet even with much complicated heat exchange systems consisting of dozens of heat exchangers which make processes economically viable. ~9 distillate
feed
I
bottom product
Fig. 2-4. A feed of the column preheat
To analyse such system the heat or enthalpy balance must be set up, which includes the complete information about enthalpy of streams and also
Chapter 2
-
Balancing in process industries
11
about heat fluxes occurring among some parts of the system. We can meet with this kind of balancing either when designing a new process, or during monitoring or control of the existing process (evaluation of heat transfer coefficients, calculation of unmeasured temperatures, etc.). Such monitoring can reveal, for example a common quiet "thief' in process plants - a heat exchange area fouling. All these examples given above represent a broad class of needs we can meet in practice. The information about balanced quantities are obtained by solving the system of balance equations on the basis of measured or otherwise specified values of variables. There are two basic types of balance calculations. For the first case is typical that some variables (flows, inventories, etc.) are fixed and the other are calculated by direct solving the system of equations. The number of unknowns equals the number of independent equations and the selection of unknowns must guarantee the solvability of the system. This situation is typical for example for steady-state balancing in the stage of the design of the process. This type of balancing which can be reduced to equations solving was the main topic in earlier chemical engineering balancing literature. The solution is relatively easy (with the use of computers and balancing software which is now available). The one problem can be the selection of the set of independent variables which makes the problem just solvable. Such a system of independent variables can differ from the set we would like to specify independently. The other problem can be the consistent set of enthalpy data in the case of energy balancing. Nowadays process simulators are widely used for designing of new processes which are capable of setting up the complete material and energy balance of even very complicated processes. The other area of mass and energy balancing concerns the analysis of operating processes. The advent of process computers brought the huge amount of process data from operating plants, sometimes of dubious quality. At the same time the widely spread personal computers brought an immense computing power to process engineers. The situation here is much more complicated than in the case of balancing in the design area. The occurrence of measured variables in operating processes depends mostly on the instrumentation which is usually dictated by control engineers to guarantee good controllability of the process. Less attention is given to balancing needs, where very often only basic inputs and outputs are measured with sufficient precision (the custody measurement). On the other hand, in some areas where the control is critical there is more information for balancing than needed, we say that the instrumentation is redundant. So we can meet very often with insufficient instrumentation in one part of the plant and with huge amount of redundant data in the rest. All this influences the unique solvability of the system of balancing equations and makes the balancing more difficult. This situation which started in early sixties brought the need for systematic methods for the second type of balancing- the balancing based on
12
Material and Energy Balancing in the Process Industries
measured data. Besides problems with redundant or insufficient data also other problems have to be solved. Statistical methods were used for the adjustment of controversial data by reconciliation. Reconciliation which was developed about two hundred years ago was re-invented for balancing in early sixties. Since then many problems typical for the use of reconciliation in process engineering were successfully solved. Results of balancing based on measured data are significantly influenced by measurement errors. The propagation of measurement errors in the process of balancing provides the information about the reliability of results by confidence intervals. Very useful are techniques of the statistical analysis of process data aimed at detection and elimination of gross measurement and other gross errors. It is also possible to optimise the instrumentation to improve results of balancing. All this theory and techniques are now available to improve the quality of mass and energy balancing in process plants.
2.2
BALANCING
FLOWSHEET
- GRAPH
REPRESENTATION
In the plant documentation we can usually meet with process and instrumentation (P&I) diagrams which contain the process equipment and the instrumentation and control loops. P&I diagrams are usually too much detailed for balancing purposes. We can simplify them by deleting control loops and a part of instrumentation which is not needed for balancing purposes. Very often the flowsheet can be further simplified by ignoring of some parts of equipment or by merging some pieces into one equipment. For example, in the case of mass balance, pumps can be neglected because they have only one input and one output and their mass balance is a trivial one. Even in the case of enthalpy balance, pumps are often neglected as the shaft work exerted on the pump is often negligible in comparison with the enthalpy changes of streams. Similarly, if only the multicomponent balance is set up around a distillation column, the column proper is usually merged with the condenser, boiler, or other supporting equipment. The resulting flowsheet whose complexness is just sufficient for the purpose of the balance is finally redrawn in the graph form. The graph representation of the flowsheet for the single-component balance shown in Fig. 2-1 is in Fig. 2-5. The graph consists of nodes (circles) and streams (arrows). Every stream is incident either with two nodes or with one node and the environment (which can be viewed also as one of the nodes).
Chapter 2 - Balancing
13
in process industries
T
13
,
~
~
3
8
w--
Fig. 2-5. A graphrepresentationof balancingflowsheet
By comparing Figs. 2-1 and 2-5, we can see that the new stream (13) occurred in Fig. 2-5. This stream represents the artificial (fictitious) stream - the accumulation of mass in the tank (2). We will meet with artificial streams more in the next parts of the book. The direct application of conservation laws to the graph in Fig. 2-5 in the present form would lead to some problems. For example, there are different kinds of streams incident with the node (3) - mass streams, electric energy streams and the heating gas (12). As we try to set up the single-component balance (only one balancing equation around every node), we must separate streams according to the kind of the stream. The final graph representation of the balancing flowsheet is in Fig. 2-6. The original graph breaks into two parts which have the only node common - the environment (the environment node is not shown in the Fig. 2-6 explicitly). It is also worth mentioning the stream 12 which is used as the fuel in the node 3. This stream can't be taken into account in the mass balance of the node 3, so that the direction of this stream is from the node 4 to the environment.
14
Material and Energy Balancing in the Process Industries
13 2
3
4
~.
l l 212 7
5
/'@,
8 v
Fig. 2-6. A balancing graph after decomposition
Nodes in balancing flowsheets can be classified in several groups. The most common are nonreaction nodes. Typical representatives are distillation and absorption columns, heat exchangers or pipe junctions. Pipes are usually represented by arrows, but in some special situations pipes can be viewed as nodes. Examples here are balancing heat losses from the pipe or dynamic balancing flows of a compressible fluid in a distribution network. Special types of nonreaction nodes are so-called splitters with two or more outgoing streams of the same composition, temperature, etc. Some unit operations can be split in two or more fictitious nodes. For example, heat exchangers are usually balanced as tube and shell sides connected by a fictitious stream which represents the heat flux in the exchanger. Reactors are nodes where chemical transformation occurs. To maintain the conservation law, the fictitious streams representing sources or sinks of reacting components going to or from the environment can be defined. It is also possible to eliminate the fictitious streams by an algebraic procedure expounded in Chapter 4. Separate units (such as storage tanks) where the material is only stored (and the inventory can be measured) can be called inventory nodes. They are each connected by a fictitious stream (accumulation) with the environment.
Chapter 2 - Balancing in process industries 2.3
15
BALANCING VARIABLES AND DATA PRE-PROCESSING
Process variables which characterise process streams are of different nature (volume flows, temperatures, composition, pH, electric conductivity, etc.). It is important to transform the primary data to so-called balancing variables. The system of balancing variables must be consistent as concerns the physical dimensions of balancing variables. In general, the balance can be set up in extensive quantities, as mass, or in intensive quantities which are related to a unit of time. In the second case the extensive quantities are divided by the length of the time interval and so-called mean integralflowrates are created. In the limit (for short intervals), they can be regarded as 'instantaneous' and conversely, the former (extensive) as time-integrated. If also energy is being balanced, the streams can comprise 'net energy streams' such as in Fig. 2-1. The other streams represent material flow. The flow of energy in a material stream can be expressed as product of the (instantaneous or integrated) mass flowrate and energy per unit mass. The relevant part of the energy associated with the material is its enthalpy; thus the energy factor is specific enthalpy. In balancing several chemical components, the factor is component mass/total mass, hence the mass fraction of the component. In this book, we prefer the mass system of variables (mass, specific enthalpy, mass fractions). Nevertheless, also the molar system is worth mentioning. The molar system is widely used in chemistry and classical chemical thermodynamics. Based on the elementary idea that matter is composed of molecules, a conventional number of molecules is taken as a unit; traditionally (and later precised for scientific purposes), it is the number of molecules in 32 grammes of oxygen 02, which equals 0.602x1024 (Avogadro's number). This quantity of matter is called mole, or g-mole more precisely. Then 1 0 3 g-moles (1 kg-mole) is denoted as 1 kmol in the system of units consistent with 1 kg as unit of mass. Let generally a chemical species X be assigned chemical formula E a F b G c ... where E, F, G, ... are atoms (atom species) constituting the molecule, with atom masses (atomic weights) M E , MF, MG, "'" , respectively. Then the quantity Mx = aME + bMF + cM C + ... represents the number of kilogrammes in 1 kg-mole of species X (thus 32 kg for X = 02 ). Mx is called the mole mass (molecular weight) of species X or, having been derived from the chemical formula, its formula mass. Its physical unit is kg kmol -~. The molar quantities in chemical thermodynamics are related to unit mole. Thus i f / ) x is specific enthalpy of species X (that of unit mass of the species) then the molar enthalpy equals
Material and Energy Balancing in the Process Industries
16 m
Hx - Mxtlx ; m
if/Qx is evaluated in J kg -1 and M x in kg kmol -~ then Hx is in J kmol -~. [Attention: Classical thermodynamical tables use frequently 1 g-mole as unit; then the numerical values have to be multiplied by l0 3 to have the quantity per 1 kmol.] In a mixture of several components (A, B, C, ... ), we can introduce the m e a n mole mass M-
x A M A + x B M B + x c M c + "'"
where XA is mole fraction of_component A etc. If/4 is specific enthalpy of the mixture, its molar enthalpy H equals H
-
MH
.
In Table 2-1 are summarised the balancing variables for the two systems, making each of them consistent. The generic symbols made use of in this book will later be written with indices such as mj for mass flowrate in j-th stream or y~, for k-th component mass fraction in j-th stream. In the last column, in addition to heat or (mechanical) work also electric energy can be considered. Tab. 2-1. Consistent systems of balancing variables Mass system Generic symbol
a
m
!
Quantity Unit
mass fraction
mass kg
specific enthalpy J kg -I
heat, work
specific enthalpy J kg -I
heat flow rate, power W
J !
Quantity Unit
mass flowrate kg s ~
mass fraction Molar system
O
Generic symbol Quantity unit Quantity Unit
number of moles
mole fraction
kmol s-t
heat, work
J kmol -~
kmol mole flowrate
molar enthalpy
mole fraction
molar enthalpy J kmol ~
heat flow rate, power W
i !
Chapter
2 -
17
Balancing in process industries
In the case of energy balancing the requirement of consistency means not only the system of units, but also the consistent system of zero-levels for enthalpy, especially for reacting systems. All these problems will be dealt with in next chapters of this book. The transformation of primary variables to balancing variables is a part of data pre-processing which precedes the balancing proper. Data pre-processing begins with calculating basic statistics, as integration of flows or averaging of other process variables in the selected time interval. After that balancing variables are calculated from pre-processed data. This step can range from basic mathematical operations as multiplication of the volume and density to obtain the mass, to calculation of specific enthalpy of streams which can be based on very complex thermodynamic correlations. A special sort of data pre-processing are so-called compensations of instrument readings. Typical example here can be the compensation of orifice for the temperature and pressure which depart from values supposed when designing the instrumentation. In practice we can often meet with the situation when underlying data belong to different systems of units which can be even inconsistent. The information about composition can be in grammes per litre, the composition of gases can be based on the dry gas, etc. The original data must be further recalculated to the specific consistent set. Consistent composition variables are mass fractions in the mass system and mole fractions in the molar system. Quite common are, however, also the component densities expressed per unit volume of the mixture. The relations among the composition variables are summarised in Table 2-2 below. Let us first summarise the definitions and notation. Ck "'" k-th component of the mixture, of mole mass Mk m ... total mass of the mixture, m k ... mass of n ... total number of moles, r/k
.-"
C k
in the mixture
number of moles of Ck
V ... volume of the mixture (m 3 ), P "'" its (mass) density (kg m -3 )
9V=m. Then mass fraction of
Ck:Y
k --
mk , m
where Y~kYk - k~ Xk - - 1 The densities are
mole fraction
of Ck'X
k -
nk r/
18
Material and Energy Balancing in the Process Industries
partial mass density of Ck "Ok =
mk
(kg m -3)
V nk
partial mole density of Ck :Ck -- -7_ (kmol m-3). v We then have the table Table 2-2. The most common systems of composition variables function of Yk Yk
Yk =
Xk
M kx k
Pk
X m. x.
p
h
Yk
Xk
Xk =
MkE Yh M~ l h [3 Yk
Pk "-
Pk
Pk MkE PhMh i h
gk Xk ~ p X Mhxh
Pk
Mk Ck
Ck ]~ C h
h
M~ck
h
Ck =
P Yk
P Xk
m~
x m~ x~
Pk Ck
h
Observe that B
X; Mh Xh = M (mean mole mass) h
and ]~ Ch --
h
p -- =
M
n
V
is mole density (kmol m -3) of the mixture. Still other composition variables can occur. For example if the mixture can be regarded as solution of components C2, C3, "-" in solvent C~, the concentrations of the former can be expressed as mass (moles) of Ck (k > 2) per unit mass (mole) of C~, say Zk. Thus for instance in the mass system k>2:
Yk
Zk = ~ Yl
(Zl= 1)
Chapter 2
-
Balancing in process industries
19
and conversely -1 Yk = Zk
1 + Z Zh h>2
the same in the molar system with x instead of y.
2.4
DATA R E C O N C I L I A T I O N
If some measured variables are redundant, the solution of the balancing problem is based on reconciliation. In this case the measured values must be complemented by the information about their precision, which characterises random measurement errors, or the accuracy, which takes into account also the systematic part of overall error. Measurement error is defined as the difference between measured and true (usually unknown) value. The errors can be classified as random, systematic gross. Random errors are unpredictable errors whose values oscillate around zero. Their existence in the measuring process is inevitable. Random errors are governed by probabilistic laws and are fully described by the probability density function. The most important is so-called normal (Gauss) distribution which is fully characterised by the standard deviation (the mean value equals zero for random errors). The square of standard deviation is the variance of the measurement. The standard deviation c can be estimated from repeated measurement of one value: s=
F /Z (xi- m)2 N
n-1
(1)
where s is the estimate of the standard deviation; xi are measured values; m is the arithmetic average of measured values and n is the number of measured values. Systematic errors have deterministic character. There are e.g. systematic errors in time, varying in some systematic manner (linear drift of zero of measurement instruments, etc.). Systematic errors can be often eliminated by the calibration of instruments, by the use of standards, etc. Gross errors (outliers) are large errors occurring from time to time as a result of inattention, measurement devices failures, unsteady state, etc. In data
20
Material and Energy Balancing in the Process Industries
measured in process plants, gross errors are important as a single gross error can invalidate all the results, disable process control systems and the like. As gross errors may be quite frequent in plant measurements, their detection and elimination is very important. In some situations we have the information about maximum measurement errors. Such maximum errors are provided by vendors of measuring instruments (sometimes as the class of accuracy). As the information about measurement accuracy must be provided in a consistent manner, the basic question concerns the relation between the standard deviation and the maximum error of measured value. The rigorous answer to this question probably does not exist. In practice we can recommend to take the standard deviation as one half of the maximum error. For more discussions about this controversial topic see (Madron, 1992). After preparing values of measured or otherwise fixed balancing variables which are available before balancing proper, there remains to specify the set of first guesses of unmeasured variables which are supposed to be the result of balancing. In the case of single-component (linear) balancing the situation is simple. The solution in this case (if exists) is unique and is obtained in the single calculation step regardless of the first guesses of unmeasured variables. If the balancing model is non-linear (all balancing except the singlecomponent one), the first guesses of unmeasured variables are required. There are several reasons to provide the best estimates of unmeasured variables available. The solution of a non-linear balance is based on an iterative solution of the system of equations. If the starting data set is far from the final solution, the number of iterations can be high or the iteration process may diverge. It is also known that there exist multiple solutions of which only one is reasonable. The situation is even more complicated in redundant systems with some unobservable variables; such situations will be discussed more throughout the book. To summarise, it is worthwhile to spend some effort in providing good estimates of unmeasured variables in non-linear balancing.
2.5
C L A S S I F I C A T I O N OF VARIABLES
This section deals with classification of variables which has close relation to solvability of the balancing problem. Let's start with some simple examples of single-component balance shown in Fig. 2-7.
21
C h a p t e r 2 - Balancing in process industries
s
ti
,"
2
a}
b) tI ff 2
.3 ....
"-, 93 ~'.,~7
c)
d)
Fig. 2-7. Balancing graphs - classification of variables measured flow; .......... unmeasured flow
Graph 2-7a represents one balancing equation around one node. There is also one unknown flow which can be calculated from the equation. The system is just solvable and the unmeasured flow is observable. The two measured flows are nonredundant. In graph 2-7b all three streams are measured. The system is redundant as one of the streams need not be measured and could be calculated. All three streams are redundant but the degree of redundancy is only one (as only one measurement is more than needed to make the system uniquely solvable). The flows in a system with all streams measured will not probably be consistent with the balancing model (the sum of inputs will not equal the sum of outputs). This problem is solved by reconciliation which means adjustment of flows to meet the overall balance. In graph 2-7c there are two unmeasured streams. The problem (one equation and two unknowns) is still solvable, but the solution is not unique. We say that the two unmeasured flows are not observable (they are unobservable). The only solution of this obstacle is to complete the measurement (at least one more stream must be measured to make the system fully observable). In practice we can meet with even more complicated situations - see Fig. 2-7d. Streams 1, 2, 4 and 5 are measured and redundant (one stream can be calculated from the others). Stream 6 is measured, but nonredundant. Streams 3 and 7 are unmeasured and observable. Streams 8 and 9 are unmeasured and unobservable. The general classification of balancing variables is presented in Fig. 2-8. Anyway, we can see that even in a relatively simple flowsheet with the
22
Material and Energy Balancing in the Process Industries
most simple balancing model (single-component balance) the situation starts to be a little bit difficult to interpret. variable
I
J
measured
1
( unmeasured )
(c~
(fixed)l
just determined1 ( redundant I [ observable I (unobservable I Fig. 2-8. Classification of variables The problem of solvability of balancing systems is usually solved in chemical engineering literature by the concept of degrees of freedom. Every balancing node (or unit operation) has its own number of degrees of freedom which is the difference between the number of variables and the number of equations among them. Full solvability of such a node is achieved by specification of some variables. The number of degrees of freedom of the whole system is the sum of degrees of freedom of individual nodes corrected for variables common to neighbouring nodes. This approach is useful in education of chemical engineers and may play some role in balancing in the stage of the design of new processes. For general case with possible redundancy this approach is difficult to apply. Throughout the present book the analysis of solvability and classification of variables is based on more general approach - the detailed analysis of the system of balancing equations or on the analysis of graphs in the case of single-component balance.
2.6
DATA C O L L E C T I O N AND PROCESSING
If someone meets with the need of setting up the balance of some process based on one set of data, the problem of data collection seems to be relatively simple and straightforward. The major problem usually is obtaining thermodynamic properties of streams in the case of energy balance. A different situation can be met in balancing used in daily operation of process plants. Typical applications here are
Chapter 2- Balancing in process industries
23
daily mass and utilities balancing for accounting purposes monitoring of heat recovery systems monitoring of operation of chemical reactors regular balancing of separation systems balancing as a part of control of processes. If the balancing is done on regular basis, the data collection and processing must be well organised. The experience in this area shows that the data collection can be hardly based only on manual inputs. The systematic use of process control systems and process databases provides the way of efficient solving of this problems. The modem process information system is shown in Fig. 2-9. The basis of the whole system is the core database of process variables. Typical variables which are stored in such database are flows, inventories, temperatures, laboratory data, etc. The other data needed for balancing are in a databank of physical properties needed for setting up energy balances. The system is based on a Local Area Network (LAN) which makes possible the use of the database by other software and plant staff (clients of the information system). The data input to the core database can be from Distributed Control Systems (DCS), laboratory systems or other process databases. In practice also the manual entries must be available as DCS are usually not available in all plants of the company. DATA INPUT
(communication with ~ DCS systems
//
,,/ [HISTORYJ ,"
importfrom I ( external databases
/Laboratory Labc ]
N,.
~
manual input
e core of a pro (Database of process] I~ variables )
.
/
(
( data ] ~
)
(Physicalproperty~
~
datal~ard~ " J . ~
~
QEmissionsreporting)
APPLICATIONS
Fig. 2-9. Balancing as a part of a plant information system
)
~
x,,,N
~/ r _" , [PLANNINGJ
I REPORTING)
24
Material and Energy Balancing in the Process Industries
Above the core database work so-called applications where belong also balancing systems. They usually import data from the core database, make data pre-processing and the balancing calculations proper. After that, balancing results are checked by the administrator of the balancing system for correctness and the results are stored in a special database. Balancing data are from this moment available via the LAN to all plant personnel and also to other information systems. The raw balancing data are usually presented to users in well shaped form of reports highlighting the most important results of the balance. Such an information system must be integrated, which means that the individual users of the database (applications) know where the relevant data are and are able to use them.
2.7
RECOMMENDED LITERATURE
Madron, F.(1992) Process Plant Performance. Measurement and data processing for optimization and retrofits. E. Horwood, New York Mah, R.S.H. (1990) Chemical Process Structures and Information Flows. Butterworths, Boston Reklaitis, G.V. and D.R. Schneider (1983) Introduction to Material and Energy Balances. John Wiley, New York
25
Chapter 3 MASS (SINGLE-COMPONENT)
BALANCE
Single-component balancing means setting-up the balance of one quantity obeying a conservation law; one balance is set up around each node. In chemical technology, it is the total mass (possibly the sum of masses of individual components of a mixture) that remains conserved in any process. Another example is the conservation of electric charge expressed as First Kirchhoff' s Law for (direct-current) electrical networks. It is also possible to consider thebalance of one selected chemical element (irrespective of in what chemical component it occurs), or also of a component not participating in any chemical reaction. This chapter deals with mass balancing. The reader is recommended to peruse Sections A. 1-A.4 of Appendix A. For the necessary notions of linear algebra, see Sections B. 1-B.8 of Appendix B.
3.1
STEADY-STATE MASS BALANCE AND ITS GRAPH REPRESENTATION Generally, the mass balance of a unit (node) reads
Z mj in.Z mj - out
an
(3.1.1)
an .I
h.
node n "k
Fig. 3-1a. Node balance
"~} (mj)~ Jr"
26
Material and Energy Balancing in the Process Industries
where mj is (possibly integral or integral mean) mass flowrate of j-th stream, 'in' means input, 'out' means output streams j; an is increase (per unit time or per period) of accumulation in the (say, n-th) node. A 'steady-state' balance means formally a n = 0. With the above interpretation of an, the change in accumulation (holdup) is then neglected. It is also possible to regard a n as a fictitious rate of mass flow directed outwards; then a n becomes one of the output flowrates mj and the RHS in Eq.(3.1.1) becomes zero.
an (mj)i" {
(mj)out
node n
Fig. 3-lb. Accumulation stream regarded as output stream
The fictitious flowrate a n can be positive or negative. In a system of units n ~ N u (set of units) connected by streams j ~ J (set of streams), the (formally steady-state) balances can be written in the form Z Cnjmj = 0
j~J
(n ~
N u)
(3.1.2)
where Cnj = 1 if stream j is input into node n Cnj = -1 if stream j is output from node n
(3.1.3)
Cnj = 0 if stream j is neither input nor output. The notation ~ means sum of terms j over set J, independent of the order in the summatioJ~.JThis kind of notation will be used henceforth for convenience, as in further analysis the sets will be re-arranged in different manners. Also the number of elements of a (general finite) set M is independent of the order and will further be denoted by [ M I . Recall now Appendix A. Clearly, whatever be the index orders the matrix C of elements Cnj is the reduced incidence matrix of an oriented graph (say) G. The set of arcs of G is J and any arc j ~ J is incident to one node n ~ N u at least (Cnj ~ 0), to two,such nodes at most. Let us now introduce the node n o in the
27
Chapter 3 - Mass (Single-component) Balance
following manner: the other endpoint of any arc j ~ J that has only one endpoint in the set N u of units, is no. Thus for example the balancing scheme
I
Fig. 3-2a. Balancing scheme
is completed to a graph
.
-
.
no en
l
-'x..
-•set
Nu of units
Fig. 3-2b. Graph of the balancing scheme
Clearly, the streams incident to node n o , according to the direction, either represent a material supplied to the system, or produced by the system as a whole; hence node n o is called the node environment. But observe that formally, also the fictitious streams such as in Fig. 3-1b (a n) are arcs incident to node n o . We thus have identified the graph G[N, J] whose node set is N = N u u {no} ; {no} m e a n s s e t of one element n 0.
(3.1.4)
28
Material and Energy Balancing in the Process Industries
A natural requirement is that G is connected: any node (unit) n attainable by a path, thus also by a sequence of (arbitrarily oriented) arcs at node no; otherwise certain subsystem of units would have no input output, which is technologically absurd. The immediate consequence system of equations (3.1.2) is, by (A.7 and 8) rankC = I Nu I
~ N u is starting and no for the
(3.1.5)
where IN u [ is the number of elements of set Nu; hence the matrix C is of full row rank. If we introduce some orders of elements n s N u and of elements j ~ J, the system (3.1.2) reads Cm = 0 ;
(3.1.6)
here, m is column vector of components mj (j e J), an element of t J l -dimensional space (say) q/'. The set of solutions is the null space KerC of matrix C, a vector subspace of q/', of dimension I J I-INn I. Clearly, the system as a whole has at least one input and one output, and the graph G contains a circuit, hence IJI > INul ;
(3.1.7)
see (A.3), with [Ni - I Nu I + 1. Consequently (and of course), there are always nonnull solutions to Eq.(3.1.6). A correctly written technological scheme (graph) has to satisfy certain other natural requirements. The equation (3.1.6) has, by (3.1.7), always a nonnull solution (m~:0), but it can still happen that certain mi is uniquely determined as mj = 0; such stream is then, in effect, absent. Let us consider first an arc (stream) jl ~ J that lies on a circuit of the graph G; for example
29
Chapter 3 - Mass (Single-component) Balance
Fig. 3-3. A circuit
(recall that the notion of a circuit is independent of orientation). It is then easily shown that if vector m (of j-th component mj) is a solution then if a is arbitrary, there exists always a solution m such that mj, = r~j, + a. The idea of the proof consists in adding a fictitious circulation a along the circuit as indicated in Fig. 3-3; in any of the node balances, the circulation term cancels and all the balance equations are again obeyed. Conversely let arc J2 separate the graph, thus J2 lies on no circuit according to the terminology of Appendix A; then if m is an arbitrary solution, we have uniquely mJ,_= o. The conclusion follows formally from (A.9)-(A.13), where Arcd stands for C (3.1.6). We can also imagine Fig. A-7 as an example. More generally, the graph G is decomposed m
./'2
Fig. 3-4. Arc J2 separates the graph The node n o (environment) belongs to, say, subgraph G1, while G2 is connected by just one stream with G i" when balancing G2 as a whole, the input/output results mi_, = o. Technologically, such case is absurd; the units of G2 would be constantly out of operation. For a correctly written technological scheme, such cases are precluded.
30
Material and Energy Balancing in the Process Industries
In what follows, we shall always suppose that the equation (3.1.6) has some solution in such that mj ~ 0 whatever be j ~ J (and even mj > 0 if j is not a fictitious accumulation stream).
Remark In mass- and energy balancing problems can occur the case when two or more separate plants (systems of units) cooperate via certain streams of energy from one plant into another.
energy stream Fig. 3-5. Cooperating plants
Thus in Fig. 3-5, the input/output streams into/from separate plants G~ and G 2 are incident to environment node no; in addition the plants G~ and G 2 are connected via certain energy stream(s), and some energy stream(s) can connect directly G 2 with n 0. We can obtain connected graph G whose node set consists of Nu~ (units of G1), Nu2 (units of G2), and n 0. The arc set J of G consists of: arcs between the units of G~ , arcs between the units of G 2, and the arcs connecting G~ and G 2 with environment node as drawn. In the set of mass- and energy balance equations as considered later in Chapter 5, we can take the whole G[N,J] as the graph of material streams. On the other hand, the mass balances of G1 and G2 are independent. Indeed, with reduced incident matrices C 1 and C2, respectively, we have the balances (3.1.2) thus (3.1.6) C~m~ = 0
and
Czm 2 = 0
(3.1.8)
w h e r e m I and m 2 are the respective vectors of mass flowrates. This corresponds
to a partition of the (full) incidence matrix of G
Chapter 3- Mass (Single-component) Balance no
~1 ~2
Nul
C1
Nu2
31
(3.1.9) C2
Here, the row vectors c~ resp. o~2 have nonnull elements (_+1 according to the orientation) in the columns i~, j~, k~ resp. i2, J2 according to Fig. 3-5. The void fields are zeros, because no arc incident to some node n ~ Nu~ is incident to any m ~ Nu2 . AS a consequence, we can analyze the two mass balances (3.1.8) separately. The corresponding full incidence matrices are
C1
N,2
/~176 C2
(3.~.1o)
Nu2
The reader can certainly imagine the case where there are more than two cooperating plants interconnected by energy streams only, with arbitrary numbers of streams connecting the plants with the environment. We obtain again a partition such as in (3.1.9), with several matrices C~, C 2 , .-. and row vectors ~ , 0~ 2 , "'" . Each of the matrices (3.1.10) is that of a connected graph (node no is formally split into two or more environment nodes). If we delete node n o and the incident arcs i 1, j~, k~, i 2 , J2 in Fig. 3-5, the graph G becomes disconnected into two separate parts G~ and G2. In graph theory, a node n o having such property is called cutnode of G. Conversely let us have a graph G, with reference (environment) node n 0. We perhaps don't know that the mass balances can be separated. The possibility is easily verified. We delete node no and all the arcs incident to n o. If the graph is disconnected then n o is a cutnode and the partition of the remaining set of nodes determines the cooperating plants; generally, they can be more than two.
3.2
MORE ON SOLVABILITY
3.2.1
Partition of variables and equations
In the set J of arcs j thus of variables mj, let us assume that certain variables have been fixed as (say) mj, +" let J+ be the corresponding set of arcs, j0 _ j _ j+ the remaining subset. Generally, the values m.+ j can be certain measured values, or also certain target values required when designing the plant or otherwise. Making abstraction from the way how the m~ have been determined, we see immediately that the set of equations (3.1.2)
32
Material and Energy Balancing in the Process Industries (n ~ Nu)
jeZ joCn.m. J J + j~Z j+C.m nj + j .-0
(3.2.1)
in variables mj (j e j0) can have generally an infinity of solutions, or also no solution; in a special case, it has just one solution, i.e. a unique subvector of components mj (j e j0) obeying (3.2.1) whatever be the fixed m~. In the first case, the system is undetermined, in the second overdetermined. The special third case where the system is just determined will be examined in more detail in Section 3.5. In the second case, there are certain conditions the variables m~ have to obey so as to make the system (generally not uniquely) solvable. If so, certain variables mi (J e j0) are uniquely determined by the equations, certain other still not in general. Let us analyze the solvability in more detail. When restricting the graph G to arcs j e j0, we obtain a subgraph (say) G~ its reduced incidence matrix is of elements Cnj where n e Nu and j e jo. The subgraph is generally not connected; it can even contain isolated nodes, not incident with any arc j e j0. Example:
Jl
-~ G,
no ~
li .
.
j
i
E: .
a
-:
! ,,,," k
.
J2
b
Fig. 3-6. Fixed and unknown streams j e J+ (fixed) j ~ jo (unknown)
0
G3 O
~t |
1i
G~
! !
O 0 G1
1 | 1i
.,o
1!
O 0 G2
|
1 1!
0
G4 Fig. 3-6a. Graph of unknown streams in G
1 ;
'
(3.2.5)
otherwise, by (3.2.4) 2, the only solution in m* would be m* - 0, a case precluded by our convention (see the last paragraph of section 3.1 before Remark). Observe finally that with J' - J+- J*
(3.2.6)
(the set of arcs j e J+ deleted by the graph reduction), the values m.+ for j e J' J are not subject to any condition; they are arbitrary. Let now 1 < k < K' and let m ~ be some solution of the k-th vector e q u a t i o n ( 3 . 2 . 4 ) 1 . If m k is an arbitrary solution, we must have Bk(m k - m ~ = 0 .
(3.2.7)
Now G~ is connected hence denoting y - m k - m ~ the equation in y has the same properties as Eq.(3.1.6). Making use of the same arguments as in the paragraphs below the latter equation (with Figs. 3.3 and 3.4), we conclude" If j e Jk~ then the j-th component yj of y - m k - m 0k is uniquely determined as yj - 0 if and only if arc j sepa.rates the subgraph G ~ This is also a necessary and sufficient condition for the uniqueness of mj in the solution m k. Given the connected graph G and the partition of the arc set J into j0 and J+, also the subgraph G o and its components G o are uniquely determined, as well as the reduced graph G*, hence the subsets J* and J' of J+. By each G ~ also the arcs separating the subgraph are uniquely determined. So the variables (arcs j) can be classified: for j e J+ into j e J* and j e J ' , and for j e j0, thus j e Jk0 for some k - 1,--., K' into those which separate G o and those which lie in some circuit of G o, hence also in some circuit of the whole G~ conversely if an arc lies in some circuit of G ~ it must lie in some circuit of a connected component G ~
Chapter 3
-
Mass (Single-component) Balance
3.3
OBSERVABILITY AND R E D U N D A N C Y
3.3.1
Definitions and criteria
37
In Section 3.2, we have classified the variables by the criteria of solvability. The classification is purely algebraic, but the names given in practice to the respective properties are those introduced in the theory of measurement and control: observability and redundancy. The notions were introduced in a more general context; restricting oneself to steady-state models one considers a system of algebraic equations (constraints) and one assumes that certain variables have been measured. Then an unmeasured variable is called observable when its value is uniquely determined by the measured values and the constraints. A measured variable is called redundant when deleting its measurement, it remains uniquely determined by the other measured variables (and the constraints). As a consequence the measured redundant values, if erroneous, have first to be adjusted so as to obey the constraints; only then the observable unmeasured variables can be computed. Despite of the apparent clarity, this verbal formulation is rather vague in general; see later comments in Chapters 5 and 8. In the present case of mass balance equations, a rigorous mathematical definition is possible. Irrespective of how the values m~ have been fixed, we call the j-th variable m e a s u r e d if j ~ J+, unmeasured if j ~ j0 in (3.2.1). Then an unmeasuredj-th variable is called observable if, whenever there exists a solution to the system (3.2.1), the j-th component mj is uniquely determined by the measured values; thus if m~ is the j-th component of any other solution, we have mi = m]. A measured j-th variable is called r e d u n d a n t if, whatever be the measured vector m § such that the system (3.2.1.) has a solution, the remaining components (say) m~+ where i ~ j determine uniquely mi, +" thus if rh + is another measured vector such that the system is solvable and if mi - + - mi+ f o r a l l i ~ j , we have also rh+ j - m j+ . Using the result following after Eq.(3.2.7) we see immediatly that:
k -
1,
The j-th unmeasured variable where j ~ j0, thus j ~ Jk~ for some 9.., K' is observable if and only if arc j separates subgraph Gk~
or also
The j-th unmeasured variable is observablei f and only if arc j does not lie in any circuit of subgraph G ~ Recall that G O is the subgraph of G restricted to unmeasured streams (arcs), G o its k-th connected component, K' the number of components that are
38
Material and Energy Balancing in the Process Industries
not isolated nodes. The necessary and sufficient conditions give also a precise meaning to unobservability. An unmeasured variable that is not observable is called unobservable. Clearly, we thus have also the following special result.
The whole vector of unmeasured variables is observable if and only if all the connected components Gk~ of subgraph G o are trees (or also isolated nodes). Let us now recall the partition (3.2.6). For the j-th measured variable we have either j ~ J* or j ~ J'. If j ~ J* then mj is a component of vector m* in (3.2.4) 2. So if the necessary and sufficient condition (3.2.4) 2 of solvability is obeyed, at least one row of the vector equation contains variable mj = mj§ (with nonnull coefficient) and the corresponding scalar equation determines uniquely this mi, given the other m]~ (i ~: j). If j ~ J' then mj = m +..~is absent in (3.2.4) 2, hence arbitrary. Consequently, we have the result
The j-th measured variable (j ~ J+) is redundant if and only if j ~ J*, thus if and only if arc j is an arc of the reduced graph G*. A variable that is not redundant is called nonredundant. Thus
The j-th measured variable is nonredundant if and only if arc j is deleted by the graph reduction (merging the nodes connected by unmeasured streams). Clearly, if the arc j closes a circuit with certain unmeasured streams then its both endpoints are merged by the graph reduction, being connected by a sequence of arcs i ~ jo whose endpoints thus lie in one connected component G ~ Conversely if the endpoints of arc j lie in the same G O then there exists a path in G O between the endpoints, hence arc j closes a circuit with some arcs i ~ j0. We thus have the criterion
The j-th measured variable is nonredundant if and only if arc j closes a circuit with certain unmeasured streams (i.e. its endpoints are connected by a sequence of arcs i ~ j0). As an example, recall Fig. 3-6 where the j'-th variable is nonredundant. As drawn, all the unmeasured variables are observable. Note that if we deleted the j'-th measurement, the three unmeasured streams j', i, k forming a circuit would become unobservable. It is thus seen that the observability and redundancy are, in the case of mass balance equations, exact structural properties of the graph G of the system, and of the partition of the streams (arcs) into j0 and J+ corresponding to variables called respectively, by convention, 'unmeasured' and 'measured'. Let us add an observation concerning the redundancy. We call 'redundant' each variable (arc) of J* separately; this does not necessarily imply that also a subset of J* can be regarded as 'redundant' in the sense that the variables mj of the subset would be
Chapter 3
-
Mass (Single-component) Balance
39
uniquely determined by the remaining ones. From (3.2.4)2 it only follows that there exists a subset of (K-1) arcs (linearly independent columns of A*) such that the variables of the subset are uniquely determined by the other ones, and this number is maximum. The number K-1 (full row rank of matrix A*) is called the degree of redundancy. Not any K-1 columns of matrix A* are, however, linearly independent; consider for instance the reduced graph according to Fig. 3-7 where the columns corresponding to the parallel streams j~ and J2 are linearly dependent.
3.3.2
Classification methods and transformation of equations
The formal definitions enable us to classify the variables by graph algorithms. Basically, the classification algorithms consist in eliminating circuits containing unmeasured streams; see for instance Mah (1990), 8-2-2 and 9-1-1. As an example, let us outline a procedure that performs the classification simultaneously with transforming the equations in a manner suitable for adjustment (reconciliation) of measured variables, and computation of the unmeasured observable ones. Given is the connected graph G[N, J] of the system and the partition of the streams (arcs)j ~ J into unmeasured (j0) and measured (J+). Define subgraph G o [N, j0]. Then (a)
Decompose subgraph G o into connected components G o [Nk, Jk~ k = 1, ---, K. If K = 1 then the set of redundant variables is empty. If K > 1 then merge the nodes of each subset N k of nodes in the whole graph G. Get graph G* whose arc set is J* c J+; the arcs j ~ J* determine the set of redundant variables, those of J' = J+- J* the set if nonredundant ones.
(b)
In each subgraph G o that is not an isolated node (thus j0 :r O), find the subset Sk ( c j0) of arcs that separate G ~ Then the union S of the subsets Sk determines the set of unmeasured observable variables.
Let us notice that according to Section A.3 of Appendix A, an arc that separates a connected graph (whose deletion disconnects the graph) must lie in any spanning tree of the graph. So when searching for such arcs (subsets Sk), we can limit ourselves to an (arbitrary) spanning tree (of G~ In particular when decomposing G o into the G o, we can apply the successive procedure according to Section A.4, where the nodes of any connected component are subdivided according to their distance from a selected reference node. In this manner, if the procedure is carried out in all the details we also obtain a spanning tree (say) T k of each G o (that is not an isolated node), and the predecessors of the nodes in T k. Using this information, we can find the inverse (say) R k of the reduced incidence
40
Material and Energy Balancing in the Process Industries
matrix of each Tk, as described in detail in Section A.3; see (A.4)-(A.6) with (A.9) where Are d stands for the reduced incidence matrix B k of G o occurring in (3.2.4). The matrices R k are obtained directly, without numerical inversion. On the other hand, as shown in the last two paragraphs of Section A.3, we thus can find the set Sk of arcs separating G ~ Indeed, having decomposed
Bk = (Bk, Bk)
(3.3.1)
where Bk is the reduced incidence matrix of T k , u s i n g R k = (Bk) -1 We can transform the whole equation (3.2.4)~ (k = l,--., K') into tt
tt
m k + RkBkm k + RkAk m+-
0
(3.3.2)
where the unknown subvector m k is partitioned as corresponds to (3.3._1). The matrix R k B k is the matrix (Cij) occurring in (A.12 and 13) and computed by (A.11) with (A.10); the zero rows of the matrix identify the arcs i ~ S k . In this manner, the classification is complete; the remaining arcs determine the unobservable variables. In addition, we can obtain also the matrix Rk Ak ready for further computation (3.3.2). [Observe that computing the elements of R k Bk, we substitute n k (reference node in G ~ for n o in (A.10). The reader can easily verify that also the elements of R k A k can be computed in this manner; considering G O[N k , j0], in (A.11) we put Rink - 0 as well as Rin - 0 whenever n ~ Nk.] See the example in Section 3.4. Having completed the classification according to steps (a) and (b) above, we can make use of the additional information obtained in the described manner. First, the reduced graph G* determines, having selected a reference node, the reduced incidence matrix A*. It is the matrix occurring in (3.2.4) 2, thus in the constraint equation for the measured vector m + (in fact, only for the subvector m* of redundant variables). The equation is employed for adjusting the given values; if the components of m + have been actually measured then for reconciliation by statistical methods. Having adjusted the components of m + and on introducing the adjusted values into Eqs.(3.3.2), we can compute directly the observable components of vectors m k. In addition we thus obtain certain conditions constraining the remaining (unobservable) components of the unmeasured vector. Though unobservable (thus admitting an infinity of solutions), they are generally not arbitrary. The whole vector of solutions will lie on a 'linear affine manifold' (as the mathematicians put it), thus on a subset of lower dimension than has the whole vector space of unmeasured variables. As a simple example, imagine a straight line or a plane in threedimensional space; for example if the manifold is a straight line in space (x, y, z), parallel to the plane (x, y) in a distance z0 (but not parallel to any of the axes), the variable z - z0 is observable, but x and y are
Chapter 3 - Mass (Single-component) Balance
41
unobservable, nevertheless subjected to the condition of lying on the projection of the straight line into the plane (x, y).
.sr, s ssJ' ..-"
Z0
Fig. 3-8. Observable variable z
Interpreted in terms of balance equations, the figure represents the solutions of a subsystem (3.2.4) k where the connected component G o drawn with incident fixed streams can look like
,
..
2
x t
' k
Fig. 3-8a. Interpretation of Fig. 3-8 unknown; ~ fixed
3
j
42
Material and Energy Balancing in the Process Industries
One of the node balances has been eliminated by graph reduction (as the merged-nodes balance) and the remaining two read m 1
-
m
2
m + i -0
-
+
mj - 0
m 3 -
We set m 1 - x, m2 = y, m3 = z, a n d mj + = z 0 , 9mi§ is length of the segment on the x-axis in Fig. 3-8. But in spaces of higher dimension, there are more possibilities (not just straight lines or planes) having not individual names and defying any geometric imagination. In a more general frame, the possibilities will be examined in Chapters 7 (linear systems) and 8 (nonlinear systems).
3.4
ILLUSTRATIVE EXAMPLE Let us have graph G of a mass balance system
l; 11
7
e
i13
10 h
y
a
3
b
6/
Fig. 3-9. Example of mass balance system measured; ..... unmeasured
where the reference (environment) node n o has not been drawn. The arc set J is partitioned
43
C h a p t e r 3 - Mass (Single-component) Balance
j o _ {3, 4, 6, 7, 8, 12, 13} and J+-
{1, 2, 5, 9, 10, 11, 14, 15}.
So G~ j0] is defined. The simple figure would allow one to solve the problem by mere inspection. But our goal is to illustrate the formal procedure as outlined in Section 3.3. The decomposition of G o starts from some node, say no (environment), giving the connected component G~~ N~ - {no} , j]0 _ O (isolated node). Let us further select node a; we have successively, according to Section A.4 j~l) = -{3 } , j~2) _ {4, 6} , j(3) _ { 7, 8 } ,
N ~l) = {b } N (2) - {c, d} N (3) - {e }
(distance one) (distance two) (distance three)
j ( 4 ) _ Q~ .
We have thus determined G2~ N 2 - {a, b, c, d, e} , J2 ~
{3,4,6,7,8}
with the structure c
O r i i
i i i
"8
4!
b I
| ! |
o
a
3
b
1 1i
6
~:3d
Fig. 3-9a. Component G2~
From the remaining nodes, let us take node f; we find j(1) _ { 12 } ,
j(2)_ { 1 3 } , j(3)_
N (~) - {h) N (2)- {g}
44
Material and Energy Balancing in the Process Industries
hence we have the connected component G3~ N 3 _ {f, g, h} , J3 ~
{12, 13}
with the structure g O I I I
,, |
', 13 ! !
1
f
12
Fig. 3-9b. Component G3~
and no other node remains. We have K - 3 and let us merge the nodes in each N k. The unmeasured arcs are deleted. Let h k be the node obtained by merging N k. Then the incident nondeleted arcs are with
ill" 1, 5, 9, 14, 15 h 2" l, 5, 9, l0 (arc 2 deleted) fi3" 10, 14, 15 (arc 11 deleted).
We thus have J*= {1, 5, 9, 10, 14, 15} and J ' -
{2, ll} (nonredundant).
In this manner graph G* is defined. It has the structure
(3.4.1)
Chapter 3 - Mass (Single-component) Balance
43
14
15
Fig. 3-9c. Reduced graph G*
Observe that the subgraphs Gk~ as well as G, are determined by the original graph G[N,J] with the partition J - jo u J+ and by the prescribed algebraic graph operations; the drawings are only illustrations for the reader. Going back to the components Gk~ of G ~ let us find s p a n n i n g trees T k. G1~ is trivial (isolated node). In G2~ let us start from N~3~= {e }. Again according to Section A.4, from the two arcs j ~ jc3) incident to node e let us s e l e c t for instance in j~3): j ( e ) - 7 thus p ( e ) = c and further, in our simple example uniquely in j(2). j ( c ) = 4 thus p ( c ) - b and
j(d) - 6 thus p(d) - b
finally in J~>" j ( b ) - 3 , while p ( b ) - a is the (chosen)reference node in G2~ Hence the arc set of T 2 is {3, 4, 6, 7}, the
46
Material and Energy Balancing in the Process Industries
node set is N 2. The reader can find the tree T 2 in Fig. 3-9a, having deleted arc 8. Thus c = p(e)
7 =j(e)
()- . . . . . . . . . .
e
t~3
4 =j(c)
Ir
0
t~0
a = p(b)
3 =j(b)
---I~O
b = p(c) = p(d)
6 =j(d)
d
Fig. 3-9d. A spanning tree of G2~
The i n v e r s e R 2 of the reduced incidence matrix is found as in the example at the end of Section A.3: for each node n e N 2, the reference node excluded, we go backwards through the sequence of predecessors. We have b
c
d
e
Ab3
Ab3
Ab3
Ab3
j(b) = 3
Ac4
j(c) = 4
Ac4
R2
J
Ad6
j(d) = 6 Ae7
j(e) = 7
denoting by Anj the elements of the reduced incidence matrix, hence
R2=
b
c
d
e
1
1
1
1
3
0
-1
0
-1
4
0
0
1
0
6
0
0
0
1
7.
According to (3.3.1) we have
(3.4.2)
47
Chapter 3 - Mass (Single-component) Balance B 2 = (B2' , B2" )
} r o w s b, c, d, e
column 8
where
( B 2 ' ) -1 = R 2
and where, with the notation as above
Ab8
0
Ac8
m
B21!
0
Ad8
-1
Ae8
1
.
Recall that generally, the zero rows of R2B2" determine the arcs i ~ $2 that separate G2~ thus denoting by Cij (A.11 and 10) the elements of R2B2", i e $2 if and only if Cij = 0 in all columns j. In our special case, the only column is j = 8. We find C38=
0
G8 = -1 c68 = -1 G8 = 1
(3.4.3)
thus S 2 --{3}
is the set of arcs that separate G2~ Further, as I J3~ - IN 31 - 1, G3~ is a tree, thus T 3 = G3~ See Fig. 3-9b; we find j ( g ) = 1.3 , p ( g ) = .h , j ( h ) = 1 2 , p ( h ) - f
(reference node)
and h
g
R3 / 1 , ) 1 2 0
-1
We have directly S 3 = J3 ~ = { 12, 13 }.
13.
(3.4.4)
48
Material and Energy Balancing in the Process Industries
The classification is complete. The set S=S2uS
(3.4.5)
3= {3, 12, 13}
determines the set of unmeasured observable variables mj (j ~ S), and with (3.4.1), J* (resp. J') determines that of redundant (resp. nonredundant) measured ones. In addition, the incidence matrix of G* determines the conditions the measured variables have to obey in order to have the system solvable. Taking node h~ as reference node, the reduced incidence matrix equals (cf. Fig. 3-9c)
A* -
1
5
9
10
1
-1
1
-1 1
14
15
) -1
-1
h2
(3.4.6)
h3
and the condition (3.2.4) 2 reads m~- m5 + m9- m~0
=0
/~10- /~14- /~15
J
= 0
(3.4.7)
where fil (of components rhj, j ~ J+) is the vector of a priori fixed variables. The conditions (3.4.7) obeyed, we can substitute fil for m + in (3.3.2). We have 1
2
5
1
-1
A2
9
10
11
14
15
c 1
d
-1
e (3.4.8)
(having deleted reference node a), and
A3:/
1
2
5
9
10
11
11
14
15
-1
h
Chapter 3- Mass (Single-component) Balance
49
(having deleted reference node f). With m3 m4
m2
tt
~
m2 - (m8) m6
/ m2)
(3.4.9)
m7
m3
m13
the unmeasured variables are subject to the conditions
-1 m 2 +
m 8
+ R2A2ffl-
0
-1
(3.4.1o) and + R3A31fll -
m 3
0
according to (3.3.2) with (3.4.3), making use of the results (3.4.2),(3.4.4),(3.4.8). The whole space of unmeasured variables (unknowns) is of dimension 7. Given lh obeying (3.4.7), the set of solutions forms a (7-6=) 1-dimensional linear affine manifold (a straight line in 7-dimensional space), with the coordinates m 3, m~2, m~3 uniquely determined by the conditions (3.4.10). We can assign an arbitrary value to any one of the variables m4, m6, mT, m8, then the remaining ones are also uniquely determined by the conditions.
3.5
JUST DETERMINED SYSTEMS
The analysis of solvability applies in particular (and more simply) to systems where the set of a priori given variables' values just determines those of the remaining ones. We consider the graph GIN,J] as in Section 3.1. Denoting again by J+ the set of streams corresponding to the variables to be fixed and j 0 _ j _ j+, the partition determines the subgraph G o [N, jo]. A sufficient and necessary condition for the unique determination reads clearly G O is a tree
(3.5.1)
Material and Energy Balancing in the Process Industries
30
thus a spanning tree of G. [Recall that we assume G connected]. The subgraph G+[N,J § restricted to the arcs i ~ J+ is called the cotree of spanning tree G~ the arcs (called chords) determine certain degrees of freedom of the system (3.1.6). From a pure algebraic point of view, the mass flowrates of streams represented by the chords can be chosen arbitrarily; of course the physical condition is that of positive (or perhaps also null) mass flowrates (with the exception of the fictitious accumulation streams as in Fig. 3-1b). The number of degrees of freedom is thus D-
[JI - ( I N I
- 1)
(3.5.2)
called also the nullity of (connected) graph G; it is also the dimension of the null space KerC of reduced incidence matrix C. The choice of G o, thus also the selection of the chords thus degrees of freedom is by far not unique; only the number D is uniquely determined by G. As shown in Appendix A (A.18), the set Sp(G) of the trees G o has
I Sp(G) I
= det(CCT) "
(3.5.3)
elements; such is also the number of possible choices of the set of chords. To some extent, the selection of the chords can be controlled by our a priori idea of which values have to be fixed preferably. Let P ( c J) be the corresponding set of preferred arcs. In Appendix A, we have given two methods of finding a spanning tree of connected graph G. The selection of any new arc (called branch)j of the tree can be subjected to the condition that, as far as possible, j ~ P. So in the strategy (i)-(iii) according to Section A.5, instead of taking the minimum j ~ S we select, as far as possible, j ~ S but j ~ P (else arbitrary; taking the minimum corresponds to an ordered set with increasing preference). Then the chords remaining as J - R after the final step belong, as far as possible, to the preferred set P. Irrespective of how we have obtained the spanning tree G o, we choose a reference node n o ; in the mass balance problem, it will be clearly the environment node, thus C is the matrix in (3.1.6). We now can classify the nodes (units) n ~ N u = N - {no} according to their distance from n 0. Thus N is
partitioned N - {no} u N(~)u ... u N Cp)
(3.5.4)
where N (p) is the set of nodes of distance p, P is the maximum distance. We put N (~ = {no} and given p >_ 0 and N (p), let A (p) = {no} k.) ... k.) N (p). Then N (p+~) is the set of nodes n ~ N - A (p) that are connected by some arc j ' ~ jo with some n' E N(P); the set of such arcs j ' is j(p+l) and we have the partition
C h a p t e r 3 - Mass (Single-component) Balance
31
jo = J(~)u ... u j(r,)
(3.5.5)
of the arcs of G O (not perhaps of all the arcs of G[N,J]). In fact this is the construction according to Fig. A-11 using the fact that G O is a tree. From the theory it then follows that for each n ~ N ~p+~), there exists just one arc j ' having the other endpoint in N Cp), denoted by j(n) (~ J(P+])), and the other endpoint n ' = p(n) (~ N (p)) is called the last predecessor of n ; cf. Fig. A-8. We have j(P+l) = Q~.
3
c
6
1://
"o
',
g
i
no
: L.,
b
i~I
e IF~ ~ I
~
~I
IF ~
i
nodes
N {~
N (-~)
N (3)
Fig. 3-10 Tree G O for example jr2) = {3, 4, 5 } is the set of arcs j(n), n ~ N ~2)
Observe that the distance classification need not represent the distance classification with respect to the whole graph G. Imagine a chord connecting nodes n o and e; then also node e is in distance 1 from no and the whole classification will be different. Then also a tree obtained by the algorithm given in Section A.4 and starting from node n o cannot be G O as drawn in Fig. 3-10.
Let us have a spanning tree G o with the partition of J into jo and J+. Having fixed certain values m~+ for i ~ J+, the solution in mj (j ~ jo) is unique. Having partitioned the matrix C C
=
(B
, A)
} rowsn~
Nu=N-
{no}
(3.5.6)
columns j~ jo ie J+ the solution of Eq.(3.1.6) is m~
B-JAm +
(3.5.7)
52
Material and Energy Balancing in the Process Industries
where m ~ is vector of components mj (j ~ j0), m + that of given m + (i ~ J+) In Appendix A, we have given an explicit formula (A.4 and 5) for the inverse B -J Recall that B is reduced incidence matrix of tree G o thus in (A.5), A' stands for B. The computation is based on the knowledge of the predecessors p(n), p(p(n)) etc. and the connecting arcs j(n), j(p(n)) etc.; as an example, see Section 3.4, matrix R 2 (3.4.2). In fact, we need not compute the inverse B -~ and can find the solution directly on rearranging matrix B into upper-triangular form. The procedure is again based on the knowledge of p(n) and j(n). By the one-to-one correspondence, we have p - 1, ..., P: IJr
l -
I N( )I
(3.5.8)
hence in the first step, the partition of B (and also row-partition of A) reads, for example for P = 4 j(p)
///// / /,/,/,/
///// A
Fig. 3-1 l a. Triangularisation of matrix B, first step
where the void fields in B are zeros. Indeed, any n ~ N (p) is incident with (just one) j(n) ~ J~P), and generally with (possibly several)j' ~ J~P+~)(if p < P); each of the j ' is j(n') ~ j~p+l) for some n' ~ N Cp+l) , while n ~ N ~p) is not incident with any j" ~ J~P") where p" < p or p" > p + l , because the arcs incident to n span the distance 1. It can also happen that a branch ends the tree at lower distance from n o than P, thus some n ~ N ~p) can be incident only with one j(n) even if p < P. We can further rearrange arbitrarily the elements in each N Cp), and then re-order
Chapter 3 - Mass (Single-component) Balance
53
the set J(P) in the manner that the n-th column in J(P) is j(n); the (n,j(n))-th element of B is then the unique nonnull (thus _+1) element in row n and column subset J(P) Then each field N(P)x J(P) in B is diagonal j(p) A
r
+_1
N(p) ,
j(n) Fig. 3-11 b. Triangularisation, second step
and in addition, at the RHS of the field we have nonzero field N(P)x j(p+l), unless p = P. Below the diagonal, we have zeros in all rows of B (thus B is upper triangular). The upper-triangular format of matrix B allows one to compute successively the solutions from below. In the last group J(P), the solutions mj where j = fin) with n ~ N (P) are each given as Cnj(n)-times the n-th component of vector (-Am+). Introducing the values of these mj into the equations of rows n N (p-l), w e compute mi for j ~ j(P-l), and so on. Besides, the reader certainly knows how to manage standard operations with triangular matrix B. Example Rearranging the nodes n e N u and arcs j ~ j0 according to Fig. 3-10 the matrix C reads j(1) ,Ik
9
9
1 a N (1)
b c (2)
1 -1
,%
9
2
3 j -1 I j
j(3)
4
9
5
f g
A
9
6
7
-1 1
1
d e
N (3)
j(2)
-1 -1
-1
A
54
Material and Energy Balancing in the Process Industries
Having triangularized the matrix B, it is ready for use in a general analysis of solutions (3.5.7) with arbitrary m +. Otherwise, given m + an even simpler variant not requiring the distance classification is possible. It is based on the following properties of a tree T. Let us call endpoint of tree T any node n incident with just one arc j. Then deleting arc j and node n, we have again a tree. (ii) Any tree has at least two endpoints. [This an easy consequence of (A.3); for (ii), use induction.] Let now n be an endpoint of the tree G ~ n ~ n o, j - j ( n ) the unique arc incident to n in G ~ Then Eq.(3.5.7) with (3.5.6) reads Bm ~ - - Am + and the n-th scalar equation is (i)
Cnimj = - ~ n m + (Cnj - +1)
(3.5.9)
where c~, is the n-th row vector of A; indeed, C n i --- 0 for any i ~ j , i ~ jo. Going through the nodes n ~ N we thus can find, by (ii), an endpoint n ~: no and compute mj (j = j(n)) by (3.5.9); the solution is rhj. We delete the n-th equation and set mj - rhj in the remaining ones. We have thus deleted arc j and node n in G ~ and have again a tree with node set N - {n } and arc set jo _ {j} (unknown variables), while the set of fixed variables is now J§ w {j}. Continue in this manner so long as some unknown variable remains. Of course the former 'classifying method' provides a special sequence of such operations. Conversely, the latter sequence of nodes n and arcs j(n) determines a triangularisation of matrix B.
Remark More generally, let us consider the case where all the unknown (unmeasured) variables are observable. As shown in Subsection 3.3.1, the necessary and sufficient condition is that the connected components Gk~ ( k - 1,-.., K) of G~ j0] are all trees. According to (A.1 and 3), this is equivalent to the condition
IN! - g - - IJ~
.
(3.5.10)
If so and if K > 1, we have the solvability condition (3.2.4) 2. Having adjusted the fixed (measured) values so as to obey the condition, the unknown variables can be computed according to (3.2.4)~ where the K' matrices Bk are reduced incidence matrices of the (nontrivial) trees Gk~ Then the solutions can be computed as above, most simply using the endpoints; see (35.9) and the subsequent paragraph.
Chapter 3 - Mass (Single-component) Balance
3.6
55
MAIN RESULTS OF C H A P T E R 3
The basic idea is that of the oriented graph of a technological system subject to balancing; see Section 3.1 and Appendix A. The graph (G) contains nodes n ~ Nu, which are the individual units of the system, plus one formally introduced node n o representing the (so-called) environment; hence the node set (N) of G is the union (3.1.4). The arc set (J) consists of streams between the units, oriented according to the direction of material flow; arcs whose one endpoint is n o represent inputs/outputs into/from the system. If not stated otherwise, also in the following chapters G[N,J] represents the technological system subject to balancing, with units n ~ Nu and oriented material streams j~J. If only mass is balanced we can formally admit a change in accumulation of mass in a node as a fictitious stream oriented towards the environment; see Fig. 3-1. The conservation of mass is then expressed as Eq.(3.1.6) thus Cm - 0 where m is the (column) vector of mass flowrates and C the reduced incidence matrix of G, thus without row n 0. We assume G connected, hence C is of full row rank (3.1.5) thus INn [ where I MI denotes generally the number of elements of set M. The problems of solvability arise when certain mass flowrates mj are given a priori; see Section 3.2. The graph structure allows one to analyze the problems completely by graph operations. The arc set J is partitioned j = jo u J+
(J+ n jo = 0 )
(3.6.1)
where J§ is the subset of streams (arcs) with a priori given mass flowrates. Restricting graph G to arcs j ~ j0 (thus deleting arcs j ~ J+) we have subgraph G~ see Fig. 3-6. The subgraph is generally no more connected; it can be uniquely decomposed into (say) K connected components Gk~ of node sets Nk and arc sets Jk~ thus G0[N, j0] is union of Gk~
Jk0],
k = 1,--., K.
(3.6.2)
Recall that a connected component can also consist of one (isolated) node, with empty subset of incident arcs. Having merged the nodes of each Nk in G we have the reduced graph G*; see Fig. 3-7. The K nodes of G* correspond uniquely to the K subsets Nk of N. By the graph reduction (merging), we have deleted all the arcs j ~ jo, and some arcs j ~ J+ in addition (subset J ' c J+). The arc set of G*, denoted by J*, consists of the remaining (not deleted) arcs j ~ J+. Thus J§ is partitioned J+ = J* t,.,) J' (J* c3 J' = 0 ) .
(3.6.3)
56
Material and Energy Balancing in the Process Industries
The subgraph G ~ the decomposition (3.6.2) of G ~ the reduced graph G*, and the partition (3.6.3) are uniquely determined by G and by the assumed partition (3.6.1.) of streams. Of course if K = 1 (G o connected) then G* is reduced to one isolated node and J* = O, J' = J+. In the first step, having re-arranged the variables and equations according to the graph decomposition, we have thus rewritten the balance equation Cm = 0 (3.1.6) in equivalent form (3.2.4). The last of the equations (3.2.4) reads A'm* - 0
(3.6.4)
where m* is the subvector of mass flowrates mi, i ~ J*, A* is reduced incidence matrix of graph G*, of full row rank K-l; Eq.(3.6.4) is absent if K = 1. The equation represents the (necessary and sufficient) condition of solvability: the a priori given values of m i (i E J*) must obey Eq.(3.6.4). The vector m* is subvector of vector m +, the latter of components m i , i ~ J+ (D J*); if Eq.(3.6.4) is obeyed and if the remaining a priori given m i (i E J') are arbitrary, the whole set of balance equations is solvable in the components mj, j ~ j0 (3.6.1). Any such solution is that of the subsystem (3.2.4)~. Here, we consider the subgraphs Gk~ (3.6.2) in number K' (< K) that are not isolated nodes (thus such that Jk~ 0 ) . According to the partition of the set jo into nonempty subsets Jk~ we form subvectors mk (k = 1, ..., K') of components mj , j ~ Jk~ then the incidence matrix of Gk~ operates on mk. In each Gk~ we can select a reference node (say nk~ one of them being the environment node no); then Bk is reduced incidence matrix of Gk~ On the other hand, having partitioned the rows of the whole incidence matrix of G according to the node subsets Nk, having deleted nk~ in subset N k we obtain submatrices A k (k = 1, ---, K') operating on subvector m + of m i , i ~ J+. Schematically jo
j+ ,,,~
0 F/k
Nk
0
I I I I------I I
I I I
I
I
I I I
tlk
I
0
Ak
I I I
Then the solutions mj (j ~ j0) are exactly those of the set of equations k = 1, ..., K'"
Bkm k + s
--
0 where c k -
Ak m+
(3.6.5)
Chapter 3- Mass (Single-component)Balance
57
are constant vectors determined by m +, provided Eq.(3.6.4) is satisfied. Here, each Bk is of full row rank, hence the set of equations (3.6.5) is (not necessarily uniquely) solvable. The structure of the graph G along with the partition (3.6.1) allows one to classify all the variables (mass flowrates) with respect to the solvability; see Section 3.3. According to the standard terminology, the variables mi, i ~ J+ are called measured, the remaining mj (j ~ j0) unmeasured. This classification will be used henceforth; any a priori fixed variable of a model will be called 'measured', else 'unmeasured'. The classification of the measured variables j* follows immediately from the partition (3.6.3); if i ~ then m~ is redundant, else (i ~ J') nonredundant. The nonredundant variables are also characterized by the property that i ~ J' if and only if arc i closes a circuit in G with certain unmeasured streams (j ~ j0). The nonredundant variables are unaffected by the solvability condition. The unmeasured variables are subject to the conditions (3.6.5), given the measured values obeying the solvability condition. Some of the mj (j ~ j0) are thus uniquely determined; they are (called) observable. A necessary and sufficient condition for mj to be observable is that arc j separates subgraph GR~ where j JR~ by the decomposition (3.6.2), there exists a unique k such that j ~ Jk~ In particular, the whole subvector of unmeasured variables is observable (uniquely determined) if and only if all the subgraphs Gk~ are trees (possible isolated nodes included). An unmeasured variable is called unobservable when it is not observable (thus lies in some circuit of subgraph G~ In Section 3.3, we give a method of classifying the variables simultaneously with transforming the equations into a form suitable for explicit computation. First, the components of rn* have to be adjusted so as to obey Eq.(3.6.4). Then, by further graph operations the equations (3.6.5) are transformed in the manner that the observable variables are directly expressed as (linear) functions of the measured ones. See also the illustrative example 3.4. If in particular all the unmeasured variables are observable and no measured variable is redundant, the system is called just determined; see Section 3.5. A necessary and sufficient condition is that the subgraph G~ ~ is a tree thus a spanning tree of G[N,J]. This is a special case in Section 3.2 where thus G o is connected, the condition (3.6.4) is absent, and K ' = K - 1 in (3.6.5); thus BR - B (reduced incidence matrix of G ~ and AR = A is the remaining submatrix of C - (B,A). Instead of matrix inversion, the equation can be solved by rearranging matrix B into upper triangular form; see Figs.3-11 a,b. The set of mass balance equations provides an example of a linear model. It will be shown later in Chapter 7 that for any linear model, an analogous transformation of the equations and unambiguous variables classification is possible using the methods of classical linear algebra.
58
3.7
Material and Energy Balancing in the Process Industries
R E C O M M E N D E D LITERATURE
A pioneering work in the classification of variables is due to V~iclavek (1969). The application of graph methods to the problems of solvability of balance equations and reconciliation is then due in particular to R.S.H. Mah and his school (Mah et al., 1976); an overview can be found in Mah (1990). See also the literature to Chapter 5. Mah, R.S.H (1990), Chemical Process Structures and Information Flows, Butterworths, Boston Mah, R.S.H, G.M. Stanley, and D.M. Downing (1976), Reconciliation and rectification of process flow and inventory data, I&C Proc. Des. Dev. 15, 175-183 V~iclavek, V. (1969), On the application of the calculus of observations in calculations of chemical engineering balances, Coll. Czech. Chem. Commun. 34, 364-372
59
Chapter 4 MULTICOMPONENT BALANCING
In the previous chapter, we have dealt with single-component balances, thus with the case when only one quantity is balanced around each node. A multicomponent balance is a set of several component balances. In chemical process networks, the components are certain chemical species present in the streams as the components of a mixture. Generally, the species can be transformed into one another by chemical reactions; so their quantities may not be conserved individually. The individual balances are then not independent, as they must obey stoichiometric laws. This chapter deals mainly with 'steady-state' chemical species balancing where chemical reactions are admitted; the wording 'steady state' is explained below. Formally precise unsteady-state balancing brings some problems, mainly because the 'holdup' (accumulation) of a component in a unit is difficult to identify, due to spatial variability of the concentrations. See Section 4.7. The reader is recommended (at least) to browse Appendix B, Section B. 1 B.8 for the notions of linear algebra. -
4.1
CHEMICAL REACTIONS AND STOICHIOMETRY
Chemical species, brought into contact in a mixture, interact among themselves. The interaction can be weak (negligible in ideal mixtures), in the manner that any component of the mixture remains identifiable by physico-chemical methods. Imagine a mixture of alcohol and water, or an almost ideal mixture of nitrogen and oxygen in atmospheric air. Such mixtures are regarded as nonreacting. A class of strong interactions is called chemical reactions; imagine burning of hydrogen 2H 2 +
0 2 -
2H20
in air. Nitrogen does not participate in the reaction; it is a nonreacting ('inert') component. A chemical reaction is thus a change in the molecular configuration of the mixture. In chemistry, the molecules are represented by chemical formulae; so in the above example we imagine that two (diatomic) molecules H 2 and one molecule 02 produce two molecules H20. Perhaps the actual mechanism is more involved; only the result is the same. Preserving the idea that the chemical
60
Material and Energy Balancing in the Process Industries
individua participating in the reaction are H 2 (not perhaps monatomic H, though possibly present in an intermediary configuration), O2, and H20, the reaction can also be written as H 2 + 1/202 = H 2 0 . The information contained in both formal reaction schemes reads:
(a) (b) (c)
The reaction participants are H 2 , 02, H20 The reaction product is H20 The molecular ratio of the participants is 2:1:2 = 1:1/2:1.
Imagine further burning of gaseous sulphur. Gaseous sulphur can be present in different (polyatomic) configurations, but this information is either unknown or irrelevant; we thus regard sulphur as formal chemical species S. We then have the reaction scheme S + 02 = SO2
(s~)
and in excess of oxygen, further oxidation can take place S02 + 1/202 = S03.
(s9
Writing the second reaction in this manner makes sense if we have (as we actually do) an idea of the reaction equilibrium, possibly also of the reaction kinetics. Indeed, the reaction is 'reversible': at higher temperatures, it can proceed in opposite direction, and in an industrial sulphur burning unit, one finds only relatively small amount of SO3 in the outlet gas, although the reactivity (tendency to achieve equilibrium) increases with the temperature. On the other hand, from the standpoint of balancing proper the second reaction can be replaced by the scheme S + 3/202 = S03
(s3)
that follows from summation of the above two reaction schemes. One can imagine as well that a part of sulphur burns directly to sulphur trioxide. However formal can be the character of the reaction schemes, they must anyway obey the laws of chemical stoichiometry, based on the following elementary idea: Any molecule is composed of atoms and (disregarding nuclear reactions) the number of atoms in any reaction remains conserved. Any chemist readily checks a reaction scheme on counting, for each atom species present, the
Chapter 4 -
Multicomponent Balancing
61
sum of numbers of atoms on both sides of the scheme; thus two plus one atoms of oxygen on the LHS equal three atoms on the RHS of the reaction SO 2 + 1/202 = SO3. From the molecular point of view, the actual reaction mechanism may involve several steps in which the particles collide, deform, tear and re-group into other particle configurations. Hypothetically, the 'relaxation times' of the individual steps along with their frequency determine the reaction kinetics of the summary reaction. Macroscopically, for example the rate of the reaction SO2 + 1/202 = SO 3 can be interpreted as the number of molecules of SO3 arising by the reaction in unit volume per unit time; or, measured in conventional units, as the corresponding number of moles. Observe that when defined in this manner, the reaction rate becomes negative if the reaction as written proceeds in opposite direction. The definition of the reaction rate (say, w) depends on how the reaction is written. Consider for instance oxidation of ammonia 4NH 3 +
502
-
(rl)
4NO + 6H20 .
There are two reaction products; so as to make w independent of the choice of the product to which it is related, one defines w in the manner that 4 w resp. 6 w is the number of moles of NO resp. H20 arising by the reaction, and also 4 w resp. 5 w is the number of moles of NH 3 resp. 02 consumed by the reaction, again in unit volume per unit time. One could also write (r,')
2NH 3 + 5/202 = 2NO + 3H20
with reaction rate w' = 2 w; then 2 w' - 4 w, (5/2) w' = 5 w etc. are the same quantities as above. Physically, the process is the same; the conventional way of writing the summary reaction leads to the conventional definition of the reaction rate. Thus if, in the reaction al A1 + "-- + an An = bl B1 + ... b m B m
(4.1..1.)
Pi resp. qj is the number of moles of B i produced resp. of Aj consumed (in unit volume per unit time) then Pl
Pm
ql
w . . . . . . . . . . . . bl bm al
qn
(4.1.2)
an
is the reaction rate. As above, w < 0 means that actually, the reaction takes place in opposite direction with respect to the convention (4.1.1). In algebraic
62
Material and Energy Balancing in the Process Industries
operations that will follow later, it is convenient to write reaction (4.1.1) in the form (4.1.3)
(-a~)A~ + .-. + ( - a n ) A n + b~ B 1 + ... + b m B m = 0
thus with positive stoichiometric coefficients (b~, -.., b m) for reaction products, negative ones ( - a l , - - - , - a n ) for chemical species consumed by the formal reaction. The oxidation of ammonia is accompanied by the side reaction 2NH 3 + 3/202 = N2 + 3H20 ; also further oxidation can take place NO + 1/202 = NO2.
(r3)
The chemical species occurring in the three reactions (r~, r2, r3) are Ck = NH3, 0 2, NO, H20, N2, NO2. We can introduce the matrix S of elements vk~, which are the stoichiometric coefficients at species Ck in reaction r, written according to the convention (4.1.3). Thus in the given case r~
r2
r_ 4
-2
-5
-3/2
4 S
r3 NH3 -1/2
O2
-1
NO
.~
6
3
H20 N2 NO2 .
We call S the stoichiometric matrix of the set of reactions. [By another convention, one can also call 'stoichiometric matrix' the transpose ST.] So generally, one can consider (say) R chemical reactions, written in form (4.1.3) K
E Vk~C k = 0
k=l
( r - 1, ..., R)
(4.1.4)
among certain K chemical species C~, ..., CK, where vk~ > 0 if C k is (regarded as) a reaction product in the r-th reaction; thus if Ck = NO then Vk~= 4 in the
Chapter 4 - MulticomponentBalancing
63
first oxidation reaction (r~), Vk~ = O, and Vk~3 = - 1 in the third reaction (r 3 ). If now w r is the r-th reaction rate then (4.1.5)
Pkr : Vkr Wr
is the number of moles of species Ck produced formally by the r-th reaction; we can have Pkr < 0 either because Vk~ < 0 with Wr > 0, or also with Vk~ > 0 (formal reaction product) but w~ < 0: the actual direction of the reaction is opposite with respect to the conventional scheme (4.1.4). For example if again Ck = NO then P k q -- 4w~ and Pkr3 = - W r 3 , thus the number of moles of NO produced formally by all the reactions considered equals Pk -- 4Wq
-
Wr3
in unit volume per unit time. In fact, reaction r 3 takes place mainly in the second stage of an industrial reactor. Integrating over the whole reactor volume we have Pk - 4 W q -
Wr3
for the total production rate of Ck = NO, in mole units. Here, Wr is integral reaction rate of the r-th reaction. Generally, if Mk is formula (mole) mass of species Ck then its integral production rate equals R
M k P k - - M k ,=Z1vk~ W~
(4.1.6)
in mass units (kilogrammes) per unit time. In particular if the reactions are independent, thus if the matrix (Vk~) is of full column rank R then conversely, the integral reaction rates Wr are uniquely determined by the integral production rates; see Section 4.5, Remark. Introducing the reaction rates makes sense if we have at least some idea of the reaction mechanisms and kinetics; for example one can well suppose that in the oxidation of ammonia, the final product (NO2) is produced via reaction r~ (accompanied by side reaction r 2 ), and reaction r 3 as the last oxidation step. Otherwise, in balancing proper the reaction rates can be eliminated as shown later in Section 4.3.
4.2
C O M P O N E N T MASS BALANCES
Let us first consider the balance of one node (unit). In contrast to Chapter 3, we shall not consider the case where the accumulation of a chemical
64
Material and Energy Balancing in the Process Industries
species mass can change in time. To be less rigorous, such (possible) change is neglected; if so, we obtain the steady-state balance. Neglecting formally the change in accumulation does not necessarily imply that the flowrates, concentrations and the like are considered constant in time; only the error due to the neglection of accumulation terms is regarded as insignificant. In practice, this means in particular that nodes such as inventories are excluded from balancing. To begin with an example, the reader is requested to turn now to Section 4.6, Fig. 4-2. First, the steady-state convention requires excluding from the set of nodes subject to balancing the inventories of sulphur and produced acids; they are regarded as parts of the environment node. Now for instance the multicomponent balance of node B (sulphur burning unit)
11
elemental sulphur
combustion 3
~y
B
dry air
"~ 5
products
consists of the component balances of sulphur (S), oxygen (02), nitrogen (N2), sulphur dioxide (SO 2 ), and sulphur trioxide (SO 3 ), whose presence is admitted in the adjacent streams. If X is a component then Mx is its formula mass and Yx its mass fraction in stream i; let Ji be the oriented mass flowrate of the stream, positive for outlets (thus, e.g., J3 < 0). In the node B, we consider the two reactions (s~) and (s2) thus S -[- 0 2 - S O 2 a n d
SO2 + 1/2 02
- 803
according to Section 4.1; the reaction scheme (s3) [S + 3/2 02 -- 803] brings no further stoichiometric restriction. Let W~ and W2 be the respective integral reaction rates. Then the balance of oxygen reads Y32 J3 + y5 J5 (+ O) - M% (-W,- 1/2 W2 )
Chapter 4 -
MulticomponentBalancing
65
that of sulphur dioxide reads
(0 +) Yso2 5 J5 (+ 0) - Mso 2 ( W 1 -
W2)
and so on. The zeros (0) are written formally to recall that the component is absent in the stream (thus yx~ - 0 for X - 02 and SO 2 , and ys3o~- 0 because one neglects the presence of SO2 in the dry air from node D). Let us now generalize. The theoretical derivation of the balance can be found in Appendix C. With all the simplifications adopted, we have the balance (C.33); it has the plausible form Z outputs - Z inputs - integral production rate of species Ck, with (4.1.6). Thus formally I
R
Z y~ Ji - Mk ZlVkr W~
i=1
(4.2.1)
for the k-th species (component) Ck (k - 1, ..., K). Here, i - 1, ..-, I denotes the streams incident to the node and y~ is mass fraction of component C k in the i-th stream, averaged by (C.32); hence K
Z y~- 1
k=l
(4.2.2)
for any stream i. Further Ji is, by (C.31), the i-th stream oriented mass flowrate, with Ji > 0 for output streams. The RHS term in (4.2.1) represents the total production rate of species Ck by chemical reactions in the node. M k is k-th species formula mass and Vk~ the corresponding stoichiometric coefficient in the r-th formal reaction (C.1) thus (4.1.4) K Z Vkr C k - 0 k=l
(4.2.3)
(by convention Vk~ > 0 for reaction products). The formalism developed below requires writing all the K coefficients Vk~ even if some Vk~ = 0 for any r (a nonreacting species Ck ). Finally W~ (r = 1, ...', R) is the integral reaction rate of the r-th reaction in the node. A correctly written stoichiometric scheme (4.2.3) must leave the total mass unchanged, hence for any r
66
Material and Energy Balancing in the Process Industries
K
Z M k VR~= 0 .
(4.2.4)
k=l
With (4.2.2) thus the total mass conservation in the node I i=1
Ji -
0
(4.2.5)
is a formal algebraic consequence of the balances (4.2.1); it is the balance (3.1.1) without the accumulation term. A special case is that where the node is a splitter; as an example, see again Fig. 4-2, node S1 where the stream of dry air 2 is divided into combustion air 3 and stream 4 supplied to reactor R. Rigorously, a splitter is a node with one input and two or more outputs, say
i2
Fig. 4-1. Splitter
such that the material passing through the node is only divided into several streams, without any change in the thermodynamic state. In this chapter, let us only suppose that the composition remains unchanged. Then, whatever be
k-1,...,K Y~ = YR (say)
for i = 1, ..., I
(4.2.6)
is the same for all streams. Because, clearly, also the total reaction rate in (4.2.1) equals zero, the K balances (4.2.1) are formal consequence of the total mass balance (4.2.5), and vice versa. Hence for a splitter, the set of components' node balances can be rewritten as (4.2.5), (4.2.6), and (4.2.2). Let us now have again a system of units such as in Chapter 3, thus the oriented graph G with incidence matrix (Cnj). With the incidence and orientation convention (3.1.3) we have, for any stream (arc) i Ji -- -Cni mi
(4.2.7)
if n is the node considered above. Consequently, the balance (4.2.1) holds for any node n if rewritten in the form
Chapter 4 -
Multicomponent Balancing
n e Nu 9
67
R(n) Z y~ Cni m i + M k ]~ V k r (n) Wr (n) = 0
i~J
(4.2.8)
r= 1
for any k = 1, ..., K. The argument (n) refers to the n-th node; for a nonreaction node we have
R(n) =
0
0 with the summation
convention
Z = 0 . Here, K is the
r=l
n u m b e r of all chemical species present in the system. If species Ck is absent in stream i then y~ - 0. For any i e J we have the condition (4.2.2). The balance (4.2.5) is the balance (3.1.2), for any n e Nu. For example in Fig. 4'2 (Section 4.6) node n = B is sulphur burning unit. In the oriented graph of the system the node is incident with streams i = 3, 5, 1 1 thus CB3 = 1 , CB5 = - 1
, CB11 -"
1 , else
CBi = 0
9
In (4.2.8) thus occur explicitly only the variables (mass flowrates) m 3 , m 5 , mll and the mass fractions y~ for i = 3, 5, 11" other terms YkCBimiequal zero. In stream 3 (dry air) are present the species C 2 (oxygen) and C 3 (nitrogen) thus 9
y~=0fork;e2and3,
i
andy~+y~=
1
according to (4.2.2). Stream 5 represents combustion products, thus again the species C2, C 3, and in addition C 5 (sulphur dioxide) and C6 (sulphur trioxide); for the other k we have y5 = 0. Stream 11 is elemental sulphur (species C~) thus yl ~ = 1 and the other y~ = 0. The number of chemical reactions admitted S+O2 =SO2
and
SO2+ 1/2 O 2 = S O 3
is R(B) = 2 and with the the convention Vkr > 0 for reaction products We have
forr= 1: Vii(B) = V21(B ) = -1 , v51(B) = 1, else Vkl(B ) = 0 and for r = 2: V22(B) = -1/2, v52(B) = -1 , v62(B ) = 1, else Vk2(B ) = 0;
Wl(B ) resp. W2(B) are the corresponding integral reaction rates and M k is mole (formula) mass of species Ck. The species present in the streams incident to node B are C~, C2, C3, C5, C6, from which C3 is nonreacting (v3r(B) = 0 for r = 1 and 2). Species C4 (H20) occurring in other parts of the system is absent in the node B-balance; thus V4r(B) = 0 in both reactions and y~ = 0 for i = 3, 5, 11. The species C4-balance holds true trivially as 0=0.
In particular if node n is a splitter, the K balances (4.2.8) are reduced to (3.1.2) and (4.2.6) written for arcs i incident to node n, with (4.2.2). Let S ( c N u ) be the set of splitters, T u = N u - S the set of units (nodes) that are not
68
Material and Energy Balancing in the Process Industries
splitters; hence if n ~ T, then either the arrangement of incident streams is different from that in Fi~.4.1, or the unit is a separator admitting different outlet
Chapter
4 -
MulticomponentBalancing
69
Let us further designate
R(n) rk
(n)
-
Mkr=~_lVkr(n) Wr (n)
(4.2.11)
for k = 1, ..., K and n ~ N u , with the convention r k (n) = 0 if n is a nonreaction node. It is the total production rate of species C k in node n. Clearly, r k (n) = 0 if n ~ S. Then the complete set of balance equations (4.2.8) reads for n ~
Tu:
j~jy~
Cnj mj + r k ( n ) - 0
( k - 1, .-., K)
(4.2.12a)
and for S E
S"
j~jCsj mj
-
(4.2.12b)
0
with y ~ - y], = 0
for j ~ Js, k = 1, ..., K ;
(4.2.12c)
in addition we have the conditions K
j ~ J:
Z y~, = 1
(4.2.12d)
k=I
Recall that the equations (3.1.2) for every n e N~ are a consequence of the equations (4.2.12), because by (4.2.4) K
Z r k (n) = 0 for any n ~ N u .
(4.2.13)
k=l
Observe finally that the technology may preclude the presence of some species C k in some stream j; for example some stream can be pure water, atmospheric air, and the like. We then add to the equations (4.2.12) certain conditions fixing the composition of certain streams. We also can, for any k = 1, ..-, K, define the set E k ( c J) of streams where component Ck is (can be) present. Then the additional conditions read k= 1,...,K:
y~,-0
forj~
J-E k.
(4.2.14)
The summation in (4.2.12a) is then, in fact, only o v e r j ~ E k . In (4.2.12c) clearly Js ~ Ek implies Js c E k , and Js e J-E k implies Js n E k = O.
70
Material and Energy Balancing in the Process Industries
For example, again with Fig. 4-2, for k = 1 (species C~ = sulphur) we have E~ = { 11 }; elemental sulphur (stream 11) is completely burnt in unit B and absent in all other streams, thus y'~ = 0 if i ~ 11. For instance the set E2 of streams where oxygen (species C 2) is present contains, a.o., stream j = 2 = Js~, and of course also Js~ = {3, 4} c E 2 (oxygen is present); on the other hand Jsl ~ E4 (Ca = H20 is absent) and of course also Jsl n E 4 = O.
4.3
REACTION INVARIANT BALANCES
The applicability of the component balance equations with reaction terms is limited. It requires the knowledge of the reaction kinetics and then, the equations are rather part of a more complex mathematical model involving heat and mass transfer equations and the like. In balancing proper, the integral reaction rates W~(n) in (4.2.11) can be known only approximately or rather, they are unknown. We will now show how they can be eliminated from the set of balance equations. Let us return to the single node component balances (4.2.1). Let us designate I
n k - iZ=lY~Ji / Mk ;
(4.3.1)
it is the sum of outputs minus inputs of species Ck, in mole units. Let n be the column vector of K components nk. Then the K balances (4.2.1) read R
n =
Z W~ Sr
r=-I
(4.3.2)
where s~ is the column vector of components V l r , "'" , V K r , thus the r-th column vector of the stoichiometric matrix (Vk~); the order of the indices k is arbitrary. Let R be the vector space generated by the vectors s~. Consequently n e R
(4.3.3)
is the information drawn from the assumption (4.2.3) without explicit knowledge of the reaction rates; the assumption specifies certain admissible chemical reactions,thus certain 'degrees of freedom' for the composition changes (4.3.1) in the node. The same space Rcan be generated by an infinite number of other reaction schemes, which corresponds to the formal character of the 'reactions' (4.2.3); the actual mechanism may be quite different.
'11
Chapter 4 - Multicomponent Balancing Consider for example chlorination of methane. The admitted reactions read CH 4 + C12 = CH3C1 + HC1 CH3C1 + C12 = CH2C12 + HC1 CH2C12 + C12 = CHC13 + HC1 CHC13 + C12 = CC14 + HC1
(1)
(2) (3) (4)
representing the four possible degrees of the chlorination. The corresponding stoichiometric matrix in its conventional form reads S1
CH4
g
S2
S3
-1 1
-1
C12
-1
-1
-1
HC1
1
1
1
CH3C1
S4
CH2C12 CHC13 CC14
Clearly, for instance the second reaction can be replaced by the scheme CH 4 + 2 C12 = CH2C12 + 2 HC1 corresponding to formal summation of reactions (1) and (2), or also to summation of columns Sl nd s2; the new vector (Sl+ s2) lies in the space generated by s~, ... ,s4 and conversely, s2 = (Sl + s2) - Sl hence (Sl+ s2) can replace s2 as basis vector. T h e set of c o m p o n e n t s C k that can (but g e n e r a l l y n e e d not) p a r t i c i p a t e in the a d m i s s i b l e r e a c t i o n s is a priori fixed by the g i v e n m i x t u r e , a l o n g with their (possibly only c o n v e n t i o n a l ) c h e m i c a l f o r m u l a e , thus also the s p e c i e s f o r m u l a m a s s e s M k are given. A c c o r d i n g to (C.20), let %k be the n u m b e r o f a t o m s o f e l e m e n t E h in C k . If there are H e l e m e n t s E h p r e s e n t in the f o r m u l a e C k then the H x K m a t r i x A o f e l e m e n t s (Zhk is the atom matrix of the set o f species C k , for arbitrarily g i v e n orders of the indices. For example the atom matrix for the components Ck in the reactions (1)-(4) above reads CH 4
CH3C1
CH2C12
CHC13
CC14
C
1
1
1
1
H
3
2
1
C1
1
2
3
4
C12
HC1
2
1
72
Material and Energy Balancing in the Process Industries
Observe that each of the three rows ~h of the matrix obeys ~hSr = 0 (r = 1, ..., 4) as corresponds to a correctly written stoichiometry. Thus, e.g. c~cls4 = (0 +) 3x(- 1) + 4xl + 2x(- 1) + 1x1 = 0 ; we have (3 + 2 =) 5 C1 on the LHS, (4 + 1 =) 5 C1 on the RHS of the reaction (4). The chemical elements remain conserved.
Let us remark in this context that the H numbers CZhk, thus the k-th column of matrix A does not generally determine the species C k uniquely; consider isomery, possibly stereoisomery. Certain columns of A can be linear combinations of other columns, or even be equal and a vector space generated by the columns makes no sense physically. The chemical species Ck have to be identified a priori. Now the (correctly written) reaction schemes (4.2.3) must obey the laws of chemical stoichiometry (conservation of the elements), hence necessarily r= 1,..-,R:
As~=0
(4.3.4)
where Sr is the r-th column vector introduced in (4.3.2). Thus each s~ belongs to the null space (kernel) KerA, thus also ~ c KerA. Denoting R0 = d i m ~
(4.3.5)
(dimension of space ~ we have R 0 < K - rankA
(4.3.6)
by the laws of linear algebra (as dimKerA = K - rankA). The dimension R0 is the 'number of degrees of freedom' for the composition changes in the node, thus the number of linearly independent reactions (columns of the stoichiometric matrix) that generate the reaction space ~. The number is restricted by the condition (4.3.6), hence the RHS is the maximum possible, given the atom matrix A; in the latter case, we have ~ = KerA. On the other hand we have R 0 = 0 for a node where no chemical reaction is admitted; imagine a mixture of hydrocarbons under atmospheric conditions. Generally, the reaction space ~ w i l l depend on the information we have on the reactivity of the components. Observe that also the equation An = 0
(4.3.7)
C h a p t e r 4 - Multicomponent Balancing
73
(conservation of chemical elements) is a consequence of (4.3.3) with the inclusion R c KerA, hence it brings no further constraint. More explicitly, the result (4.3.7) follows from the mole balance (4.3.2) with (4.3.4) and with arbitrary Wr. Recall that with the interpretation of n (4.3.1), if % is h-th row of A then % n (sum of O~hknk over k) represents the number of atoms of element E h in outputs minus inputs (since ~hknk is the corresponding number in the component Ck-balance). This number remains conserved for any element E h. For example in the chlorination of methane with inputs: pure C12 and CH4, the hydrogen balance 4(ncH4 )in = 4(nEll4 )out + 3(ncn3c0out + 2(ncn2cl_,)out + (ncncl 3)out + (nncl)out is a consequence of the balance (4.3.2) whatever be the reaction rates, thus whatever be neR.
The elimination of the reaction rates consists in finding a basis of the space R. Because the given vectors s~ (r = 1, ..-, R) generate R a basis can be found by column elimination in the stoichiometric matrix S = (s,,..., sR).
(4.3.8)
Using Gauss-Jordan column elimination, by linear combinations of the columns and with possible rearrangement of the rows (thus of the K indices k of species Ck ) we can transform S ~ (S0, OR_%)
(4.3.9)
where OR_R0 is K • (R-R o ) zero matrix, and where
s0/':o /
(4.3.10)
Here, IRo is R o • R o unit matrix and B is a (K-R o ) • R o matrix; the matrix B can have zero rows when some rows of matrix S are zero. The R o columns of S o , say (column vectors) s~o constitute a basis of R. Consequently, whatever be our n R we have
n
-
~o XrSr0
r=-I
thusn-S0x
(4.3.11)
where x (x~, .. 9, XR0)T uniquely corresponds to n as the column vector of its coordinates relative to the basis (s o , ... , s % o ) of R. We can partition the vector n as corresponds to the partition (4.3.10) of matrix S O in the vector equation (4.3.11)2 _
74
Material and Energy Balancing in the Process Industries
n / n'
n -
} R~ } K-R o
(4.3.12)
and we have immediately n o - IRoX - x, and n' = Bx thus
n' = Bn ~ .
(4.3.13)
The latter result is, by the construction, equivalent to the constraint (4.3.3). Consequently, the original information (with unknown reaction rates) is equivalent to the constraint
(-B,
IK_Ro) n
= 0
(4.3.14)
w h e r e IK_Ro is (K-R o ) • (K-R o ) unit matrix. We thus have eliminated the unknown reaction rates. Observe that if in particular R o = 0 (no reaction) then the set of columns of B is empty and the matrix in (4.3.14) is K • K unit matrix; hence the condition reads simply
R0 = 0 :
n = 0
(4.3.15)
in accord with (4.2.1) in the absence of reactions. Let us have a priori fixed some order of the K components Ck. With respect to this order of the components nk of vector n, the columns of the matrix (-B, IK_R0) are rearranged giving matrix (say) D. The matrix is (K-R o ) • K and of full row rank. The final form of the constraint thus reads Dn = 0
(4.3.16)
representing a system of (K-R o ) linearly independent scalar equations. In particular D is unit matrix if R 0 = 0. Recall (4.3.6), thus K-Ro > rankA. It is also easily shown that if a species Ck is nonreacting (thus absent in the reaction schemes, with zero row in the stoichiometric matrix), we obtain also nk = 0 quite formally by (4.3.16). Generally, the matrix D is not uniquely determined; it depends on the elimination procedure. But all such matrices have the same null space R = K e r D , thus the same space of solutions of (4.3.16). As simple example, let us consider a set of esterification reactions CH3COOH
+ R n O H = C H 3 C O O R n + H20
(n = 1, . . . , N)
where CH3COOH is acetic acid (say, A) and RnOH are aliphatic alcohols (say, A n ); thus R n are N different alkyl radicals, say CH 3 , C2H 5 , CH3-(CH 2 )n_2-CH2
Chapter 4 -
MulticomponentBalancing
75
(n > 2) for simplicity. Designate further E s n = C H 3 C O O R n and W = H 2 0 . The reactions (4.2.3) read -
A - A n + Es n + W = 0
with the stoichiometric matrix S n = m
~
1
2
.......
N
-1
-1
.......
-1
-1 -1 An
~
-1 1 Es n
1
W
9
1
.
.
.
.
.
.
.
1
whose columns are clearly linearly independent. Suppose we have also admitted some reactions CH3COOR n + RmOH = CH3COOR m + RnOH
(man)
thus Es m+ A n- Es n- A m-0
;
clearly, the corresponding column equals the difference: m-th column minus n-th column of matrix S , hence is eliminated. Thus the matrix (4.3.10) can be obtained in different manners. In our simple example, it is sufficient to re-order the rows. Denoting by I N the N • N unit matrix we have for instance
76
Material and Energy Balancing in the Process Industries
r
So
IN
'
}
" vector
Es n
1, 1 , . . . , 1
W
-1,-1, ... ,-1
A
n o
9vector n' -IN
An
with the corresponding partition (4.3.12) in the vector equation (4.3.11). Observe that R0 - N; K - 2 N + 2 is the number of components. In Eq.(4.3.14) with the partition (4.3.12) we have "
1,1,'",1
'
-1,-1, ... ,-1 B
m
-I N
and the equation reads, writing the components' symbols in lieu of the vector components c
-1,-1, ... ,-1
Es~ "~
1, 1 , . . . , 1
no
O m
IN+2
IN
Es N
W A A1 ll'
AN
Given an arbitrary a priori order of components, the columns of the matrix are rearranged to give matrix D in (4.3.16).
Chapter 4 - MulticomponentBalancing
77
One can readily verify that the rank of the atom matrix A equals 3, hence K - rankA - 2 N - 1 > R - N whatever be N > 1. The upper limit (4.3.6) is not attained.
4.4
ELEMENTBALANCES
It can happen that we have no information on possible reactions in the node. Then the only constraint we can specify is the conservation of atom species (elements) in the node. This is expressed by the condition (4.3.7); the condition is equivalent to defining the reaction space ~ as maximal, thus ~-
KerA
(4.4.1)
of dimension R 0 - K - rankA
(4.4.2)
We thus admit all chemical reactions that are possible in the node, among the a priori fixed components C k . We obtain immediately the constraint of the form (4.3.16). By elementary row operations, transform
A ~
Ao ) } rankA
(4.4.3)
0 Then D - Ao
(4.4.4)
is the (K-R o) x K full row rank matrix in the constraint (4.3.16). Let us assume that in addition, also certain relatively stable groups of elements remain conserved by the possible reactions; such cases are common in organic chemistry. We then simply regard the groups as 'atoms' and extend thus the atom matrix. The formal consequences will be drawn in the same manner as above. As an example, let us go back to the example in Section 4.3. We have found R 0 = N while K - rankA = 2 N - 1. So having no information on the reactivity, one would admit 2 N-1 independent reactions. The assumption admitting esterification reactions only, leads to reducing the reaction space to d i m ~ - N. The assumption can be also formulated in the manner that the groups R n and CH3COO remain conserved. Indeed, the 'atom matrix' then reads
78
Material and Energy Balancing in the Process Industries
A
An
I
Esn
I w
1
Rn 1
CH3COO
[H 0
1 1
1 1
1
....
1
1
1
....
1
2 ] eliminated
1
1
....
1
1
Subtracting the rows denoted by C H 3 C O O and O from row H yields row (0; 0, ..., 0; -1, .-., -1; 1) and adding the sum of r o w s R n yields row (0; 1, ..., 1; 0, .-., 0; 1) in place of row H, which equals the last row (O); hence row H is eliminated and the remaining rows are linearly independent. The matrix is of rank N+2 and we have K-(N+2) = N - R 0 . The new assumption is thus equivalent to that on the admissible reactions. Recall that the matrix obtained in this manner is matrix A 0 in (4.4.3) by formal analogy with the 'net' atom balance. The equivalence does not preclude different matrices D in (4.3.16). The net elemental (atom) balance is set up in particular when some of the reacting components are of not-well defined structure, and when only empirical formulae are known. Such cases occur in biochemistry. An example is the production of biomass (yeast); see Madron (1992), Example 2.2.
Remark
If D = A 0 then the constraint (4.3.16) is directly equivalent to n e KerA (= KerA0 ). As stated in Section 4.3, in the general case the constraint (4.3.16) is equivalent to n e % where ~ c KerA, as follows from (4.3.4). Hence the constraint (4.3.16) implies in any case the equality (4.3.7). We thus have, for h = 1, ..-, H (number of atom species) K Z O;hk n k - 0 ; k=l
multiplying the h-th equality by the atom mass (say) gh we obtain by summation K H Z (hE__llLthCthk) nk -- 0 k=l
H Z h t~hk = M k . w h e r e h=lg
Chapter 4 -
Multicomponent Balancing
79
Hence the equality K ]~ M k n k - 0 k=l
(4.4.5)
is a formal consequence of the constraint (4.3.16), whatever be n. If now the nk are interpreted by (4.3.1) and if also the condition (4.2.2) is obeyed then
O--
K
I
~,
~ y~ Ji = i~ Ji .
I
k=l i=1
1
Thus also the total mass conservation is a formal consequence of the constraint (4.3.16), with the condition (4.2.2).
4.5 R E A C T I O N INVARIANT BALANCES IN A S Y S T E M OF UNITS Let us again consider a system of units such as in Chapter 3. With (4.2.7) introduced into (4.3.1) we have, in the n-th node n k ( n ) --
-~'~ Cni i~J
y~ m i ]
M k
(4.5.1)
for any component C k . Let n(n) be the column vector of components n k (n) (k = 1, .-., K) and D(n) the matrix introduced in (4.3.16) for the n-th node, computed by the described procedure. Recall that D(n) = A 0 by (4.4.4) when only the element balance (4.3.7) is known in the node n; the case never occurs when the node is a splitter, because then necessarily D(n) is unit matrix (no reaction admitted). Let us adopt again the conventions and notation introduced before the equations (4.2.12a). Then the complete set of reaction invariant balances reads for n ~ Tu 9
D(n) n ( n ) = 0
(4.5.2a)
with (4.5.1), and for s ~ S again
~j
(4.5.2b)
Csj mj -- 0
with y~,~- y~, = 0
for j ~ J~
(k = 1,---, K) ;
(4.5.2c)
Material and Energy Balancing in the Process Industries
80
in addition we have again the conditions K
j e J:
Y, y~ - 1
(4.5.2d)
k=I
Recall also that according to the Remark to Section 4.4, by (4.4.5) we have K
n e Tu 9
Z
k=l
M k n k (n)
= 0
(4.5.3)
for any solution of Eqs. (4.5.2a). If also the conditions (4.5.2d) are fulfilled, any solution obeys the total mass conservation conditions. In the same manner as in Section 4.2, we generally introduce certain additional conditions such as (4.2.14), to obtain the whole set of constraints. The equations can be rewritten in different other manners. A simple modification consists in introducing the sets E k as in (4.2.14). Then the components nk (n) of vector n(n) read n e Tu 9
nk (n)
--
-
Z
ieEk
Cni y~ m i [ M k
(4.5.4)
in (4.5.2a). We can also introduce the coefficients j~
J" Bjk = 1 w h e n j ~ =0whenj~
Ek F_,k
(k-1,
--- , g)
(4.5.5)
thus the conditions (4.5.2d) read K
j ~ J"
kZ__?jk y~, = 1
(4.5.6)
along with the conditions (4.2.14) for the remaining y],. Given splitter node s S, the equations (4.5.2c) are written only for such k that j~ ~ Ek. Observe that the graph G of the system as introduced in Chapter 3 can be, for any k (thus component Ck ), restricted to the arcs Ek, giving subgraph Gk [N, Ek ]. The subgraphs Gk will not, however, generally have the properties required for graph G; they even need not be connected. In the equations, we can introduce the substitutions j ~ Ek 9
m~, = mj y~,
(mass flowrate of Ck in stream j) and
(k = 1 , - . . , K)
(4.5.7)
Chapter 4- Multicomponent Balancing
s ~ S, j e
Js"
81 (4.5.8)
%= mjs
(splitting ratios). Then the equations read ,"
N
1 n e
Tu 9
Z
D(n)
CnjmJk
- 0
(4.5.9a)
Mk jeER (k= 1, ..., K)
and for k - 1, ..-, K: for s e S such that Js e Ek m~- ffjm~ s = 0
( j e Js);
(4.5.9b)
finally for s ~ S 9j]~j~sj - 1 .
(4.5.9c)
Thus the vector equations (4.5.9a) are written for each n e T u (nodes that are not splitters). For the splitters s e S, we have the scalar equations (4.5.9 b and c). We take k = 1, .-., K and for each k, write the equations (4.5.9b) only for such s that Js e Ek (the split streams contain component Ck ); the equations (4.5.9b) are then written for each j e Js (streams obtained by splitting the input stream Js )Finally, for each s e S we have the equation (4.5.9c). The equations (4.5.9) are in variables m~, ( k - 1, ..., K; j e E k ), and o~j (J e Js where s e S), thus in all the component mass flowrates, and all the splitting ratios. We then have K
j ~ J"
mj = kZ=lBjk m],
(4.5.1 O)
and j ~ Ek 9
y~-
( k - 1, ..., K)
(4.5.11)
assuming mj r 0. The coefficients Bjk in (4.5.10) mean simply summation over such k that j ~ E k . The new set of equations is a consequence of the equations (4.5.2), with the restriction to nonnull component flowrates. Conversely having
82
Material and Energy Balancing in the Process Industries
any solution to Eqs.(4.5.9) and computing mj and y~, by (4.5.10 and 11), as is readily shown the latter variables' values obey all the equations (4.5.2), with the convention (4.5.5). So the new set of equations is equivalent to the original one, with the exception of'singular' solutions where some mj = 0. The equations (4.5.9 a and c) are linear in the new variables; only Eqs. (4.5.9b) are nonlinear. The equations (4.5.2a) with (4.5.1) are bilinear in the variables y~ and m i . The whole set of constraints generally does not determine a unique solution, but only what is called an (analytic) solution manifold, a (mathematically smooth, but 'curved') subset of the variables' space. Only if a 'sufficiently great' number of variables is measured and adjusted so as to make the system solvable, the remaining variables can be computed. We shall not attempt to analyze the problem in the same (mathematically rigorous) manner as in Chapter 3. An example in Section 5.5 will show that such problems may sometimes also be 'not well-posed'. For a different approach, see further Chapter 8.
Remark In this section, we have eliminated the integral reaction rates W~ from the equations (4.2.1), considering them a priori unknown. Let us now suppose that we have found a solution of the reaction invariant balances (4.5.2). We thus have determined the quantities nk (n) (4.5.1). Let us consider a reaction node n; going back to the notation (4.3.1), with (4.2.1) we have R
Z Vk~ W~ = n k
(k = 1, .-., K) .
(4.5.12)
r=l
Because n ~ R some solution in W~ exists. Clearly, it is uniquely determined if and only if the matrix (Vk~) is of full column rank R, which means R = R 0 (= d i m ~ ; otherwise there is an infinity of such solutions. This is the case of linearly independent reactions. If we then take arbitrary R linearly independent rows of the matrix, thus the corresponding R (= R 0 < K) equations (4.5.12), the integral reaction rates can be computed. So when desired, we have also obtained an information on how the reaction kinetics works in the reaction node. If the term W~ is further integrated over an interval of time (say, from t~ to t2 ), the integral is called the extent of the r-th reaction from initial t~ to time t2; the concept is useful rather and in particular for batch reactors.
Chapter 4 -
4.6
MulticomponentBalancing
83
E X A M P L E OF M U L T I C O M P O N E N T BALANCE A classical sulphuric acid plant can be schematized according to the
figure 12
8 r
]i
I0
4 13 15
14
Fig. 4-2. Sulphuric acid plant D ... air drying unit, B ... sulphur burning unit, R ... reactor, A1 ... oleum absorption unit, A2 ... acid absorption unit, S 123 ... splitters of streams 1-10 gas streams, 11 sulphur, 12 water, 13-18 acid streams
Atmospheric air (stream 1) is dried in D and as stream 2, is divided into stream 3 going to sulphur burning, and stream 4. Elemental suphur (11) is burnt in B and the combustion products (5) go into contact reactor R where sulphur dioxide is, by heterogeneous catalysis, converted to sulphur trioxide; dry air (4) is added. The gas after conversion (stream 6) is divided into streams 7 and 8 going into absorption units A1 and A2; also the gas from the first absorption unit (stream 9) is introduced into A2 and after the second absorption, the gas (stream 10) leaves the system and goes into the atmosphere. In absorption unit A2, sulphur trioxide is absorbed in circulating sulphuric acid solution; pure water is added as stream 12, and excess water contained in sulphuric acid of lower concentration comes also into A2 from the air drying unit as stream 13. Concentrated sulphuric acid solution produced in A2 (stream 14) is divided into stream 15 going back into the air drying unit, net production (stream 17), and stream 16. In absorption unit A1, sulphur trioxide is absorbed in 'oleum', a solution of SO 3 in sulphuric acid; the acid comes as stream 16, and stream 18 is oleum produced in the unit. The flow scheme of acids and water is simplified. The inventories are included in the environment node, as corresponds to our steady-state convention.
84
Mater&l and Energy Balancing in the Process Industries
The components Ck are C 1 C2
C3 C4
C5 C6
... ... ... ... ... ...
elemental suphur, formula S oxygen, 0 2 nitrogen, N 2 (by convention air is considered as mixture of water, H20 sulphur dioxide, SO2 sulphur trioxide, SO3.
0 2
and N2)
The composition of sulphuric acid solutions as well as that of oleum can be uniquely expressed in terms of (H20, SO3 ), due to instantaneous equilibria. See Section C.1, second paragraph; in particular the quantity of the component H2SO 4 is uniquely determined by those of water and sulphur trioxide. Then the sets Ek of streams containing component Ck are E1
=
E2 E3 E4 E5 E6
= {1, 2, 3, 4, 5, 6, 7, 8, 9, 10} = E2 = {1, 12, 13, 14, 15, 16, 17, 18} = {5,6,7,8,9,10} = {5, 6, 7, 8, 9, 10, 13, 14, 15, 16, 17, 18}
{11}
(4.6.1)
as corresponds to simplifying balance assumptions adopted; for example sulphur burns completely in unit B, air is completely dried in D, no SO2 is absorbed. Observe immediately that for instance the subgraph G~ [N, E1 ] is not connected; all the nodes with the exception of node B are isolated in G~. The subset T u of production units is Tu =
{D, B, R, A1, A2}
(4.6.2)
and the subset of splitters is S = {S1, $2, $3 }.
(4.6.3)
We have Jsl = 2 and Js2 = 6 and Js3 = 14 and
Jsl = {3, 4} {7, 8} Js3 = { 15, 16, 17 } .
Js2 =
(4.6.4)
The reaction nodes are B and R, not perhaps A1 or A2, due to the elimination of a component like H2SO4 from the set of balance equations. In node
Chapter 4-
MulticomponentBalancing
85
B, we admit the oxidation reactions S 4- 02 - SO 2 S O 2 q- 1/2 02 = S03
, formally , formally
- C~ - C2 + C5 = 0 - 1/2 C2 - C5 + C 6
= 0 .
In node R, we have only the second reaction. In node B we thus have
S
r -1
0
C1
-1
-1/2
C2
0
0
C3
0
0
C4
1
-1
C5
0
1
C6
m
thus for instance multiplying the first column by (-1) and placing row we have C 1
0
0
1
So
\
"~
C 6 as
second
C1
C6
1
-1/2
C2
0
0
C3
0
0
C4
-1
-1
C5
B
from where the matrix (-B, IK_% ) = (-B, 14 ) as in (4.3.14), and finally, after rearrangement
D(B)
=
-1
1
0
0
0
1/2
0
0
1
0
0
0
0
0
0
1
0
0
1
0
0
0
1
1
(4.6.5)
operating on vector n(B) with the a priori order of components C~, ... ,C 6 . In node R we have only the second column of matrix S, so we can only place the last row as first, get So and (-B, 15 ), and finally, after rearrangement
86
Material and Energy Balancing in the Process Industries
1/2 D(R) =
15
(4.6.6)
\
as corresponds to vector n(R). Recall again that the matrices D are not unique; the reader can, however, verify that in both cases (B and R) the equation Dn = 0 corresponds to the conservation of the elements O and S, and to the nonreactivity or even absence of C 3 and C4 (and C~ in node R). We are now ready to write the equations (4.5.2). We have, by (4.5.4) with (4.6.1), for example c
yllmll
/ M~
( y 3 m 3 5- y2m5 ) / M 2 (y~m3 - Y~m5 ) / M 3 - n(B)
=
0 5
- ysm5 / M 5 ,
- y56m5 / M 6
,
Of course we shall have y~ - 1; formally, it will follow from (4.5.6). In the same manner are expressed (generated) the other vectors n(n) for n ~ T u , using the incidence properties of graph G and the list (4.6.1) in (4.5.4). By (4.5.2a) we thus have, with (4.6.2) for n = B,R :
D(n) (-n(n)) = 0
where we have (4.6.5 and 6), and for n = D, A1, A2 :
(4.6.7a)
-n(n) = 0
because the nodes are nonreaction, thus D ( n ) is unit matrix; observe that certain components nk (n) of n(n) equal zero identically, for example n~ (n) = 0 for any n~:B. The equations (4.5.2b) read, with (4.6.3) m 2 - m 3 - m 4 m 6
m14
-
=
m7 - m8 - m15
- m16
0
= 0 - m17
-" 0
(4.6.7b)
Chapter 4 - MulticomponentBalancing
87
and the equations (4.5.2c) are written, given s e S only for such k that the input stream j~ e E k thus the split streams Js c Ek; for the other components Ck we have y~s - y~ - 0. Thus, with (4.6.4) and (4.6.1) (s - S1)
y~ _ y2
and y4 _ y~
for k - 2, 3
(s : $2)
y~ = y6
and y~ - y6
for k = 2, 3, 5, 6
(s - $3)
y~5_ y~4, y~6_ y~4 and y~7_ y~4
for k = 4, 6 .
(4.6.7c)
Finally, the equations (4.5.2d) are generated according to (4.5.6), making use of (4.5.5) and the list (4.6.1). Thus for example Bjl = 1 for j = 11 only, the other Bj~ = 0, further Bj2 - 1 for j - 1, 2, ..., 10 while Bj2 = 0 for j = 11, 12, ..., 18, and so on. In this manner, the equations (4.5.2) contain as variables only those mass fractions y~, that can be nonnull by the a priori technological assumptions. Generating the equations (4.5.9) with (4.5.10 and 11) is quite analogous.
4.7
UNSTEADY-STATE BALANCES
Rigorously, an unsteady-state balance should take into account variable concentration profiles in units such as columns, or even in pipelines. Such a balance then, in fact, takes the form of a differential balance; cf. Appendix C. In some cases, the balance can be simplified; for example in a stirred reactor, we can approximate the k-th species' content (accumulation) as Ck V where V is (fixed) volume, Ck is (generally time-dependent) averaged (integral mean) volume concentration of species Ck. Then the unsteady-state balance is again an integral (volume-integrated) balance, extended by accumulation terms. Let us begin with the node balance (4.2.1). On adding the accumulation term, it takes the form dNk
dt
I
R
+ Z y~ Ji - Mk Z Vk~ W~
i=1
r=l
(4.7.1)
for species Ck (k = 1, ..., K). Here, t is time and Nk is mass of species Ck contained in the unit (node), thus for example in a reactor; the other symbols are the same as in Section 4.2. The balance (4.7.1) can be obtained from the exact balance (C.25) using the same simplifying hypotheses as in Section C.4, thus in (C.33), only the change in accumulation is no more neglected. It has the plausible form increase in acumulation plus output minus input = integral production rate.
Material and Energy Balancing in the Process Industries
88
Formally, the (accumulation) term Nk is defined as a volume integral. If Yk is mass fraction of Ck and p is total mass density then (4.7.2)
Ck = Yk 19
is mass of C k per unit volume, and integrating over the whole volume of the unit (say, reactor), we have Nk. Clearly, if the unit is for instance a distillation or absorption column, such formal integration is rather hypothetical. But for example in a stirred vessel, it is quite meaningful to write Nk = Ck V
(4.7.3)
where Ck is the (integral mean) volume concentration (4.7.2), and V is the volume occupied by the liquid; basically, both Ck and V can be time-dependent. In what follows, we shall make abstraction from how the Nkis actually computed. We now can add the term dN k / d t to the other balance equations in Section 4.2. Introducing again the convention (4.2.7), in place of (4.2.8) we have, for k = 1, .-., K R(n)
n e Nu 9
Z y~ Cni m
i -I-
ieJ
d N k (n)
M k Z Vk~(n) W~(n) r=l
(4.7.4) dt
where the argument (n) refers again to the n-th node. Using again the conditions (4.2.2) and (4.2.4), summation over k = 1, ..., K yields the total mass balance of node n n e Nu :
Z Cni mi = an
i~J
(4.7.5)
where a n is increase in accumulation per unit time in the node; see (3.1.1). If the formula (4.7.3) with (4.7.2) makes sense, we have
an _
( p V)n
(4.7.6)
dt where p is (integral mean) total mass density; the subscript n means n-th node. In any case, the total mass conservation is again a formal algebraic consequence of the balances (4.7.4). We can again decompose the set N u into S (splitters) and T u = Nu - S ('technological units'), and we adopt again the conventions (4.2.9 and 10). With the notation (4.2.11), in place of (4.2.12a) we now have
Chapter 4 - MulticomponentBalancing
for n 9 T u 9
89
Z y~ Cnj mj + r k(n) = jeJ
dN k (n)
(k = l, ..-, K ) . (4.7.7)
dt
The accumulation in the splitters will be clearly put equal to zero. Hence the balances (4.2.12 b and c) remain unaltered; also the conditions (4.2.12 d) subsist. We can again introduce the additional conditions (4.2.14). In Section 4.3, it is sufficient to re-define the terms nk (4.3.1). Considering, for the moment, a single-node component balance, let us put more generally
Z y~ Ji +
F/k --
i=1
(4.7.8)
dt
admitting thus the change in accumulation. Then, comparing the balance (4.2.1) with the more general balance (4.7.1), we conclude immediately that Eq. (4.3.2) and all what follows remains formally the same; only the column vector n is now of components n k defined by (4.7.8). In particular the constraint (4.3.16) holds true, now with the interpretation of n by (4.7.8). Also Section 4.4 remains formally unaltered. In the Remark, we have the result (4.4.5); from where again the total mass conservation, now in the form (4.7.5), as a formal algebraic consequence. In Section 4.5 we now put, in place of (4.5.1) 1 / -Z Cni y{ m i + rt k (rt) M k / - ieJ
d N k (n)
dt
(4.7.9)
in node n, for component Ck. Thus n(n) is the column vector of components nk (n) (k = 1, ..., K). D(n) is again the matrix introduced in (4.3.16) by the algebraic transformations of the stoichiometric matrix S (4.3.8). Consequently, the reaction-invariant balances are again of the form (4.5.2), with (4.5.3). We can again introduce the sets E k (of streams where component Ck can be present). Then the components of vector n(n) read dN k (n)
1 (n) - ---7 Mk
]~ Cni Y~ mi + ie Ek
(4.7.1.0)
dt
and with the conventions (4.5.5), we have again the conditions (4.5.6). Notice that the individual-component node balances are naturally written only for such components Ck that are present at least in one stream incident to the node. But formally, if some component Ck is absent in the node balance, we can put simply nk (n) = 0 because then also Nk (n) = 0.
90
Material and Energy Balancing in the Process Industries
Remark
Recall the Remark to Section 4.5. Considering again one fixed node (thus omitting the argument n), the equations (4.5.12) hold with the interpretation (4.7.8) of nk, due to (4.7.1). Let us consider in particular a batch reactor. After introducing the components into the reactor, say at time t = 0, the reactor is closed. We know the initial quantities (say) Nk0 of the components (some of them can equal zero). At times t > 0, we have Ji = 0 in (4.7.8), hence by (4.5.12) R E Vk~ W~ = r=l
1
dN k (k - 1, ..., K ) .
Mk
(4.7.11)
dt
Now at t = tl, let us have measured the quantities Nk - Nkl (say). Denoting t1
Er, = I W~ dt o
(r - 1, ..., R)
(4.7.12)
the conditions (4.7.11) require, for any k g ]~ Vkr Erl = r=l
1
(Nkl- Nk0)
(4.7.13)
Mk
At the same time, the condition (4.3.16) requires, by integration over the interval, D(N~ - N o) = 0
(4.7.14)
where N is vector of components N k / M k, N O at to , N~ at t~. Let us have adjusted (reconciled) the measured results so as to satisfy the condition (4.7.14). We then have K equations (4.7.13), which have some solution due to (4.7.14). I f the R reactions are independent, hence if the rank of the stoichiometric matrix (Vk~), thus S (4.3.8) is ranks = R
(4.7.15)
(full column rank) then there exist also some R linearly independent rows of the matrix, say rows k - 1, ..-, R for an appropriate arrangement. Thus the unique solution of the (sub)set of equations R
1
Z Vk~ E~, = r=l
(Nk~- Nko )
(k = 1, "" ,R)
determines the reaction extents Erl ( r t=t I .
(4.7.16)
Mk
1, 9. . , R) in the interval from t - 0 to
Chapter 4- Multicomponent Balancing
91
Formally, the extent of a reaction can always be introduced by an integral (4.7.12) and computed (in case of independent reactions) from a time-integrated balance (4.5.12) with (4.7.8). For a batch reactor, its value shows directly 'to what extent' the reaction has been realized with the initially present quantities Nk0. Recall, however, once more that the definition of the reaction extent, as well as that of the reaction rate, depends on how the reaction has been written; see the examples (r~) and (r~') in Section 4.1. Clearly, if the r-th reaction scheme is generally multiplied by some a > 0 thus V~,r = a Vk~ (k = 1, ... , K) then the reaction extent becomes E'~ - E~/a ; then Vk~E~ = Vk~E'~ . So the (invariant) item Vk~E~in (4.7.16) gives the production (consumption if negative) of species Ck due to the r-th reaction, in mole units. Let us further suppose that we have measured the Nk-values at different times, say Nk (t) at time t; thus Nk~ - Nk (t~). By (4.7.16), we obtain E~ (t) as functions of time. According to (4.7.12), by numeric or graphical differentiation we find W~ = dE~ / dt
(4.7.17)
as function of time. This is a way of identifying the (integral) reaction rates. In a stirred reactor, we then can assess w~ = W~/ V
(4.7.18)
per unit volume V.
4.8
MAIN RESULTS OF CHAPTER 4
In this chapter, 'multicomponent balancing' means the balancing of individual chemical species (components) present in a technological system. As in Chapter 3, the system consists of units (nodes) connected by oriented streams (arcs), constituting the oriented graph G[N,J]. A reaction node is such where chemical reactions are admitted; else the node is nonreaction. In each reaction node, we have to specify the admitted reaction stoichiometry; see Section 4.1. So if there are K chemical species Ck present in the node, the R admitted chemical reactions are formally expressed by the scheme (4.1.4) K E VkrC k : 0 k=l
(r - 1 --- R) ' '
(4.8.1)
with the convention Vk~> 0 for reaction products. Here, Vk~are the stoichiometric coefficients constituting the stoichiometric matrix (Vk~), denoted later by S. [By another convention, one calls 'stoichiometric matrix' the transpose sT.] For a
92
Material and Energy Balancing in the Process Industries
nonreacting species Ck , we put Vkr = 0 for r = 1, ... , R. Clearly, in any (nonnuclear) reaction the number of atoms of any chemical element must be conserved, hence if o~r~ is the number of atoms of element Eh (h - 1, ..., H) in the formula Ck we have K
E ~hkVkr -- 0
k=l
(h - 1, ... , H; r - 1 -.. '
'
R).
(4.8.1a)
We also suppose (which is always possible) that in the balances, the composition of a mixture is expressed by 'electroneutral' species (not perhaps by ions). Neglecting the change of accumulation in the nodes, the individual component balances of nodes n e N u (units of the system, without the environment node no) are of the form "output minus input = integral production rate" for any component Ck ; see Section 4.2. Here, the integral production rate of C k (in mass units) in node n equals, by (4.2.11)
rk(n ) = M k
R(n) ~-.,Vkr(n)Wr(n ) r=l
(4.8.2)
where Mk is formula (mole) mass of species Ck and Wr the r-th integral reaction rate (volume integral of the local reaction rate w~ in moles per unit volume per unit time); the symbols Vkr and R are as above, the argument (n) refers to the n-th node. For a nonreaction node, we set R(n) = 0 thus rk(n) = 0 for any k. Certain nodes can be splitters; see Fig. 4-1 in Section 4.2. If S is the subset of splitter nodes we have the partition Nu - Tu w S
(T u n S = O)
(4.8.3)
where T u is the remaining subset of 'technological units'. For any splitter node s ~ S, we have one input stream (j~) and the subset Js ( c J) of output streams incident to s; thus Js (4.2.9) is the set of arcs (streams) incident to s, with the condition (convention) (4.2.10) that two (possibly) adjacent splitters have been merged. For a splitter, the individual component balances are reduced to the total mass balance and to the condition (4,2.12.c) that the mass fractions of any Ck are equal for all the incident streams. Finally, we have the condition (4.2.12d): the sum of mass fractions y], of components Ck in any stream j equals unity. We thus have the complete set of balance equations (4.2.12). Let us introduce submatrices Cu and Cspli t of C (reduced incidence matrix of G) restricted to nodes (rows) n ~ T u and s ~ S, respectively. Let further R u be the I Tu I x K matrix of elements
Chapter 4 - Multicomponent Balancing
Ru,nk --
rk(n )
93
( n E T u , k = 1, ..., K)
(4.8.4)
and Y the I J[ x K matrix of elements
Yjk = y~,mj/ M R
(j ~ J, k = 1, .-., K)
(4.8.5)
where mj is the j-th mass flowrate; let m be the vector of components mj. Then the set of balance equations reads CuY + Ru = 0
(4.8.6a)
0
(4.8.6b)
Csplit m
-
with y~s_ y~,
= 0
(s e S, j e Js, k = 1, ..., K)
(4.8.6c)
- 0
(j ~ J)
(4.8.6d)
and K Z y~,- 1 k=I
The total mass balance C m = 0 is an algebraic consequence of the equations (4.8.6) and need not be written explicitly as a further constraint. In the equations, we formally admit the presence of any component CR in any stream j, but in fact we can have certain y~ = 0. Of course if some C k is absent in all the streams j incident to node n then it is also formally nonreacting in the node, hence Vk~(n) = 0 for r = 1, .-- , R(n). We can also formulate the a priori hypotheses (4.2.14): CR is absent in stream j if j ~ E k where E k ( c J) is the subset of streams where the presence of Ck is admitted. In balancing proper, the (integral) reaction rates W~ are certain parameters that can be eliminated; see Section 4.3. The procedure is purely algebraic, based on the assumed stoichiometric matrix S of elements Vk~ ,thus S(n) in reaction node n. By Gauss-Jordan column elimination (4.3.9), rearranging possibly the rows k of S we find matrix S O (4.3.10) of R 0 linearly independent columns
SO --
IR~ ]
B
Ro
} K-
R0
- (S0,
""'
S~
R0 )
(4.8.7)
94
Material and Energy Balancing in the Process Industries
where IR0 is unit matrix; algebraically, the columns Sr0 constitute a basis of the reaction space R o f dimension R 0 , generated originally by the columns of S and with the new order of components Ck. The component balances of the node, with unspecified parameters Wr , are equivalent to the assertion: n e R where n is K-vector of components (4.3.1) thus, in node n
nk(n ) = - jEeCnjYjk
(4.8.8)
where Cnj are elements of C and Yjk the elements (4.8.5). The assertion (n ~ is further equivalent to the equation (4.3.14). Rearranging finally the columns of the matrix (-B, IK-R0) according to some a priori chosen order of the components C k thus of the vector components (4.8.8) of n, we have (full row-rank) matrix D and Eq.(4.3.16) thus D(n)n(n) = 0
(4.8.9)
in node n with stoichiometrix matrix S(n) and reaction space 9~n) of dimension Ro(n ). Here, we can restrict the components of vector n(n) to certain K(n) components that are actually present in some of the incident streams and are thus subjected to the node n balancing; thus D(n) is (K(n)-Ro(n)) • K(n) matrix of full row rank K(n)-Ro(n). For a nonreacting species Ck we obtain, by (4.8.9), nk(n ) = 0. In a nonreaction node, D(n) is unit matrix thus n(n) = 0. Again, the total mass balance is an algebraic consequence of the above constraints. It can happen that we have no information on the possible reactions in the node; then the only constraint we can specify is the conservation of atomic species (elements); see Section 4.4. The constraint reads An = 0
(4.8.10)
where n is again the vector of components (4.8.8) and A the atom matrix (ahk); see (4.8.1a). By elementary row operations, we can transform A to the matrix (4.4.3) where A 0 is of full row rank, viz. that of A. The formally introduced reaction space Ris of dimension R0 = K - rankA (4.4.2) and we can put D = A 0 (4.4.4) thus D(n) = Ao(n)
(4.8.11)
in node n; we then have again the constraint (4.8.9). We can again restrict the vector n(n) to certain K(n) components actually present in some of the streams incident to node n. It is also possible to regard as 'chemical elements' certain groups of elements that, by hypothesis, remain conserved by chemical reactions
Chapter
4 -
MulticomponentBalancing
95
in the node, having thus extended the atom matrix; see the example in Section 4.4. Observe also that conversely, given a priori a reaction space R (stoichiometric matrix S), by (4.8.1a) the constraint (4.8.10) is an algebraic consequence of the constraint (4.8.9) and need not then be written explicitly. Writing the constraints (4.8.9) for any node n ~ T u (non-splitter) and adding the constraints (4.8.6b-d), we have the full set of constraints; see Section 4.5. We thus have the set of reaction invariant balances (4.5.2). 'Reaction invariant' means that the constraints are independent of the reaction rates; of course if certain quantities Wr in (4.8.2) were known a priori, one would have a 'stricter' set of constraints (4.8.6). The algebraic structure of the set of constraints is no more that simple as in the case of a single-component (mass) balance. The structure is generally the less transparent, the more available information has been incorporated. For example a splitter node s can also be simply regarded as a nonreaction node, to which the constraint (4.8.9) applies, with unit matrix D(s) thus n(s) = 0 without further restriction. But then, one woul_d formally admit different mass fractions of some C k in different streams j ~ Js as a possible solution, which is clearly absurd. Also the a priori hypothesis that some component is absent in certain streams complicates the structure, thus the solvability analysis as will be shown later in Chapter 8. We have introduced the sets E k for k - 1, ---, K where K is the number of all the chemical species considered in the whole system. Here, E k ( c J) is the subset of streams where the presence of component C k is admitted by the technology. See then the modifications (4.5.4) - (4.5.6), and the example in Section 4.6. The set of constraints can also be rewritten using the substitutions (4.5.7) and (4.5.8) where m~, - mjy~, is the mass flowrate of component C k in stream j (~ ER), and ~j the splitting ratio mi/mJ~ for stream j (~ Js) in splitter s (~ S). Due to the presence of splitters, the new set of constraints is again nonlinear in the new variables. The final goal is to formulate a minimal set of constraints thus, in a sense to be precised later, such that none is consequence of the other ones and still, all the available information has been incorporated. The set (4.5.2) is generally not minimal. For instance if s ~ S and j ~ J~ , the condition (4.5.2d) for this j follows from that written for Js and from (4.5.2c). It can also be shown that if, in the definition of D(n) in (4.8.9), we consider all the K components Ck (not only K(n) in node n) then D(n) is correctly of full row rank K-Ro(n ) where K > K(n), but the set of constraints (yielding automatically and correctly nk(n ) - 0 for any component Ck absent in the incident streams) is not minimal if K > K(n). The minimal set of constraints will be formulated and analyzed later in Chapter 8, Section 8.2. For the moment, let us only observe that the set of constraints such as in Example 4.6 admits of a final reduction to a minimal one. For example in the matrix D(B) (4.6.5), the fourth column ( C 4 - H20) and the third row (giving n 4 ( B ) - 0 by D(B)n(B) - 0) can be deleted since C4 is absent 9
96
Material and Energy Balancing in the Process Industries
in all the streams incident to node B by (4.6.1); also in the definition of vector n(B) that follows later in the section, the fourth component (n4(B) = 0) is thus deleted. We have neglected the change of accumulation in the nodes n e N u ; in particular nodes such as inventories have been included in the environment node n o. It is not formally difficult to extend the set of variables by the accumulation terms; see Section 4.7. In certain cases (such as stirred reactors), the accumulation terms can be identified by volume and concentrations measurement. In the extended balance, we then replace the definition (4.8.8) of nk(n) by (4.7.10) thus the components of vector n(n) are 1 nk(n ) = -
Z CnjYjk + jeE R Mk
dNk(n) (4.8.12) dt
with (4.8.5); here, because Yjk -- 0 for j ~ Ek, the summation is over j e E k only, and Nk(n) is the accumulation of component Ck in node n, t is time. Neglecting anyway the accumulation in splitters, we have again the constraints (4.5.2) where matrix D(n) is obtained by the same algebraic procedure as above, starting from the stoichiometric matrix S(n) (or from the atom matrix A(n)). In particular for batch reactors, we can also compute the reaction extents (time-integrated reaction rates) (4.7.12) by solving the equations (4.7.16); here, we assume that the reactions are independent (full column rank of the stoichiometric matrix S), and that the measured accumulations have been adjusted so as to obey the constraints (4.7.14).
4.9
R E C O M M E N D E D LITERATURE
The algebraic formalism of a set of chemical reactions in multicomponent balancing has been, in the last three decades, a matter of interest of numerous theoretical works. As a pioneering work, recall Aris (1965). See further papers by Whitwell and Dartt (1973), Schneider and Reklaitis (1975), Bj6mbom (1977 and 1981), and Waller and M~ikil~i (1981). On mass balancing around a chemical reactor, see also Murthy (1973 and 1974). A comprehensive introduction to chemical component (and energy) balancing can be found in Reklaitis and Schneider (1983). The algebraic formalism presented in this chapter is largely taken over from Madron and Veverka (1991). The solvability of the system of multicomponent balance equations in absence of chemical reactions was examined by graph methods in a paper by Kretsovalis and Mah (1987). Concerning the problems of solvability, see also the literature to Chapter 5.
Chapter 4- MulticomponentBalancing
97
Aris, R. (1965), Introduction to the Analysis of Chemical Reactors, Prentice-Hall, Englewood Cliffs, New Jersey Bj6mbom, P.H. (1977), The relation between the reaction mechanism and the stoichiometric behaviour of chemical reactions, AIChE J. 23, 285-288 Bj6mbom, P.H. (1981), Components in chemical stoichiometry, I&C Fundamentals 20, 161-164 Kretsovalis, A. and R.S.H. Mah (1987), Observability and redundancy classification in multicomponent process networks, AIChE J. 33, 70-82 Madron, F. (1992), Process Plant Performance, Measurement and Data Processing for Optimization and Retrofits, Ellis Horwood, New York Madron, F. and V. Veverka (1991), Invariants of the chemical species balances of a reacting system, Chem. Eng. Sci. 46, 2633-2637 Murthy, A.K.S. (1973), A least-squares solution to mass balance around a chemical reactor, Ind. Eng. Chem. Process Des. Develop. 12, 246-248 Murthy, A.K.S. (1974), Material balance around a chemical reactor, Ind. Eng. Chem. Process Des. Develop. 13, 347-349 Reklaitis, G.V. and D.R. Schneider (1983), Introduction to Material and Energy Balancing, John Wiley & Sons, New York Schneider, R. and G.V. Reklaitis (1975), On material balances for chemically reacting systems, Chem. Eng. Sci. 30, 243-247 Waller, K. and P.M. M~.kil~i (1981), Chemical reaction invariants and variants and their use in reactor modeling, simulation and control, I&C Process Des. Develop. 20, 1-11 Whitwell, J.C. and R.S. Dartt (1973), Independent reactions in the presence of isomers, AIChE J. 19, 1114-1120
This Page Intentionally Left Blank
99
Chapter 5 ENERGY BALANCE Physically, an energy balance differs from the total mass and components mass balances in that it involves thermodynamics, namely its First Law. The unequivocal concept of mass is replaced by the intuitive concept of energy which, rigorously, is a quantity rather assumed theoretically than directly identifiable. This holds the more for the energy transformations, introduced as 'heat' and 'work' in traditional thermodynamics. The analysis in Appendix C shows that an energy balance set up in practice is never exact from the rigorous thermodynamic point of view, even from the traditional one. In chemical engineering balancing, a useful concept is that of enthalpy. A simplified energy balance is (not very precisely) called the enthalpy balance. This chapter deals mainly with steady-state enthalpy balancing. For the graph formalism, see Appendix A, Sections A.1 - A.3. The necessary concepts of linear algebra are summarized in Sections B.1 - B.8 of Appendix B.
5.1
ENTHALPY BALANCE
Let us begin with the energy balance of one node (unit). As in Chapter 4, we shall neglect a (possible) change in energy accumulation in the node; then the balance will be considered as the steady-state balance. Imagine the sulphur burning unit (node B) such as in Fig. 4-2 re-drawn in Fig. 5-1. (-?out
p5
| | | i
pll 3
~ |
p3
Fig. 5-1. Sulphur burning unit
,,
~5
1O0
Material and Energy Balancing in the Process Industries
The input streams are 3 (dry air) and 11 (liquid sulphur), the output stream is 5 (combustion products). The node includes a steam generator where the heat of combustion is transferred to boiling water. In an elementary textbook, the energy balance of the node would be set up perhaps as follows. The First Law of Thermodynamics requires Uin + Win-- Uou t --I- Wout --I- Q out
where U is internal energy (a thermodynamic state function), W is work, Q is heat; the items are balanced in a given interval of time and under steady-state operation (thus no accumulation term is present). If superscript j represents j-th stream then Uin-- U3 + U 11 , Uout = U 5.
Let us assume that the node includes also a pump, through which liquid sulphur is supplied; the corresponding work, say Ws is in fact negligible in the whole balance, but let us include the item formally. In addition, Win comprises the terms PJ~ (j = 3 and 11) where P is pressure and V is volume; it is the work due to introducing the streams (volumes V j) into the node. In the same manner, with j = 5 we have Wout. Consequently Wi n = p3 V3 + p ll Vii + Ws , Wout = pSv 5
and denoting Q =-Qout (heat supply, in our case negative) we have the approximate energy balance (U 5 + p5 V 5 )_ (U 3 + p3v3 ) _ (ull + pll vii) _- Q_ W where W - -Ws. Here, H = U + P V is enthalpy. With the convention Hj - H j for outlets, Hj = -H j for inlets we have the balance
Z. H j = Q - W J
where j = 3, 5, 11. It is a long way from this elementary reasoning to a rigorous energy balance as given in Appendix C. The reader not interested in the theory may accept the simplified form ('enthalpy balance') directly. It reads generally, in accord with (C.37)
Chapter 5 - Energy Balance I
^
101
.
Z H'J i - Q- W.
i=1
(5.1.1)
Here, Ji is again, as in Chapter 4, the i-th stream oriented mass flowrate (Ji > 0 for output streams), I is the number of streams i incident to the node. /~i is specific enthalpy of the i-th stream, averaged by (C.34). According to (C.36), W is interpreted as mechanical work per unit time, exerted by the node on the moving parts of its boundaries. A precise definition is only hypothetical; on the level of approximation adopted, let us regard (-W) as certain relevant work exerted on the node per unit time, for example by compressors and other important mechanical power consumers (grinding and the like). Finally Q is, by (C.41), heat supply through the walls, radiation heat included. Recall also the simplified energy balance (C.49) involving electrical energy supply Qe (C.48) to an electrochemical unit. Denoting Q' = Q
+ Oe-
W
(5.1.2)
the steady-state enthalpy balance will read I ]~/-tiff i - Q' i=1
(5.1.3)
In the same manner as in Chapter 4, let in particular the node be a splitter. See Fig. 4-1 and the text following after Eq.(4.2.5). According to the precise definition, the thermodynamic state must not change when the material passes through the splitter; specifically, we have the conditions /T - / 4 for i = 1,-.., I
(5.1.4)
where/-) is the specific enthalpy of the input stream. We have clearly Q' = 0 and with the total mass conservation (4.2.5) I Ji - o
i= 1
the enthalpy balance (5.1.3) is a consequence of (5.1.5) with (5.1.4). The enthalpy balance of a splitter will always be written in the form (5.1.4) and (5.1.5). Let us consider again a system of units such as in Chapter 3, thus the oriented graph G with incidence matrix (Cnj); we have again the equality (4.2.7). N is again the node set of the graph (environment node n o included), N u the set of units, J the set of arcs, thus of material streams. If Q(n) is the quantity Q'
102
Material and Energy Balancing in the Process Industries
supplied to node n, Eq.(5.1.3) reads fjCnj ffl Jmj + Q(n) = 0
n ~ T u"
(5.1.6)
where the equations are written only for T u - N u - S. See further the notation and conventions introduced in the paragraph before formula (4.2.11), in particular (4.2.9 and 10). We thus have for
s ~
S"
Z
C~j mj
= 0
j~J
with
/~J _/~ Js
= 0
for j ~ Js 9
(5.1.7)
Now the quantities Q(n) can also constitute a network. In the expression (5.1.2), the terms Qe and (-W) can be formally regarded as certain energy inputs from the environment, thus as certain oriented streams whose one endpoint is the environment node. If i denotes the corresponding arc, its orientation is determined by the coefficient (say) Dni where Dni = 1 for the inward orientation. If the quantity of energy is (say) qi > 0 then Dni qi > 0 means input (Dni = 1), Dniqi < 0 output (Dni = - 1 ) , thus for example (-W)(n) = Dni qi with Dni = 1 means mechanical energy supply (-W)(n) > 0; if it happens that conversely, some work is exerted by the unit on the environment (imagine a gas turbine) then Dni "- -1 and (-W)(n) = Dni qi < 0. The Q-portion of Q(n) in (5.1.2) can either come from the environment; we then introduce the same convention as above, with Q = Dni qi" It can be electrical or steam heating, or conversely steam production with Dni = -l. Or the Q-term may represent heat exchange between the node and another part of the system. It can be again in form of steam consumed/produced in the node and produced/consumed in another node, or due to heat transfer in a heat exchanger, whose the node is the cool/hot side. Then Q is a 'heat flow' term and can be represented by an arc with both endpoints somewhere in the system of nodes. Then again Q = Dni qi and if n' is the other endpoint in the graph, the same term occurs as Dn, i qi = -Dni qi in the node n' enthalpy balance. We thus can have generally several such streams incident to one node n, corresponding to a partition of the item Q(n) in the node n balance (5.1.6). Let E be the whole set of the 'net energy' streams constituting the Q(n)-terms as explained. Let us introduce the coefficients Dni obeying the convention
Chapter 5 - Energy Balance
103
n~ Tu i~E:
Oni ~
1
if arc i is oriented towards node n
Oni -- -1
if arc i is oriented outwardly from node n
Oni--
if arc i is nonincident with node n.
0
(5.1.8)
Then the enthalpy balances (5.1.6) read n ~ T~" ~ j f n j / Q J m j
+
i~jOniqi- 0
(5.1.9)
while for s ~ S we have again (5.1.7). Here, qi is the amount of energy transported per unit time by the net energy stream (arc) i ~ E. if the transport is in the direction of the oriented arc (5.1.8) then qi > 0. Some remarks have to be added. (i)
As net energy streams, one can also regard certain material streams that do not come into direct contact with the material subject to mass balancing, and only supply (or consume) energy. A common example is steam whose supply (or production) is expressed in energy units (say, watts). Of course only indirect, not perhaps direct steam heating is admitted in such cases ('direct' means mixed with some other material in the node). One then can imagine also certain 'net energy units' that only produce or consume energy. Although including such nodes in the set of units of the system would bring no serious complication, for the sake of simplicity we shall include such units in the environment node. Hence all nodes in the balances (5.1.9) and (5.1.7) are, by convention, incident with some material streams. In large process networks, it can happen that for instance steam produced (as energy) in one node is supplied to several other nodes via certain energy distributors. In that case, if D E is the set of the distributors we have in addition the balances
(5.~.1o)
d E D E 9 i~s
with the orientation convention (5.1.8) for n = d (ii)
~ D E.
A special unit is a heat exchanger. If not contained in a more complex unit balanced as a whole, it can be regarded as a node
Material and Energy Balancing in the Process Industries
104
j,
.~
~ j~
Fig. 5-2a. Heat exchanger
incident with oriented arcs Jl, "", J4" But some information would be lost, as the balance mj, - m h + m h - m j 4 - 0 would admit mjl ~ m h . W e thus divide the node according to the s ch eme
j,
,F
~- j2
i I I i i i
',i ! ! !
!
n
-~ j4
Fig. 5-2b. Partition of heat exchanger
having introduced a net energy stream i e E. Then the balances read mj,-m h-O
and m h - m h = O
which are the balances (3.1.2) for n - n' and n - n", and
(5.1.11)
Chapter 5 - Energy Balance mj,/QJ,
- mj2/QJ2 - qi- 0
105
} (5.1.12)
mj3/~ J3 _ m J4~ J4 ..1-qi - 0 which are the balances (5.1.9) for n - n', n". It can happen that in a mathematical model, the heat transfer term qi is further subject to an equation. If not, in balancing proper we can eliminate the unknown variable qi by simple summation of Eqs.(5.1.12), but the information (5.1.11) remains. Note that if the streams represent multicomponent mixtures then the detailed component balances read, by (4.5.2a) where D(n) is unit matrix (no reaction) n(n') = 0 and n(n") = 0
(5.1.13)
hence by (4.5.1), for example if n = n'
(y~, m j - y~2 mh ) - 0
thus by (5.1.11) also, as a consequence k - 1, ..-, K:
y J ' - y~:
(5.1.14)
assuming of course mj, ~ 0; the same for J3 and J4. Thus the whole information on inlet-outlet mass flowrates and composition equalities is contained in the system of energy and component balances (even if the variable qi has been eliminated). (iii)
Also can happen such cases that a stream produced in one unit (for instance some combustion products) is, from the technological standpoint, regarded as net energy stream coming into another unit:
106
Material and Energy Balancing in the Process Industries
J2
.!
1
v
1
Fig. 5-3a. Node with indirect heat transfer
We then again modify the scheme
I i | ! | i i ! ! !
i I
/'/
Fig. 5-3b. Partition of node with indirect heat transfer
having added the net energy stream qi; from the viewpoint of computation, it is again a parameter that can be eliminated. For the streams Jl and J2, we have again the equations (5.1.11)l and (5.1.14).
Chapter 5 - Energy Balance
107
(iv)
Recalling Appendix C, let us stress that the enthalpy data used in the balances (5.1.9 and 7) have to be thermodynamically consistent. The enthalpy data are represented by the specific enthalpies 171j of the streams. See Section C.3, where/~ stands for any/~J(j ~ J). Basic is the definition of standard enthalpies of all the components Ck present in the system; by a thermodynamic path, the components are then brought into the state they have in stream j, including possible phase transition and mixing. If a component does not participate in any of the reactions in the units, its standard enthalpy (enthalpy in the standard state) can be put equal to zero. Otherwise, the standard enthalpy has to be found in thermodynamical tables, or computed; see (C.20) or (C.23), or Veverka and Madron (1981) in more detail. In this manner, the specific enthalpy /~J is found as function of the thermodynamic state of stream j and the energy (enthalpy) balance equations become equations in the state variables. See also the example in Section 5.3. For another approach, see Section 5.4.
(v)
A brief note should be added concerning the neglected terms in the energy balance. Let us estimate the possible errors committed by neglecting the potential and kinetic energies of the streams. The potential energy can be computed with respect to a conventional zero assigned to the ground level of the system of units (plant). Consider a 50 m high distillation column. The potential energy at the top is some 500 J kg -1. If compared with a typical value of specific heat Cp - 2 kJ kg -~ K -~ for hydrocarbons, the neglected item corresponds to a systematic error 0.25 K in measuring or computing the temperature of the stream. If compared with a typical value 400 kJ kg -~ of the evaporation (condensation) heat withdrawn in the condenser, the error is 0.125 % , most likely smaller than the inaccuracy of available enthalpy data used in the column balance. The kinetic energy per unit mass is (1/2)v 2 where v is scalar velocity. Taking v as high as 20 m s-~ for a gas stream we have 200 J kg -~. With a typical value of Cp = 1 kJ kg -1 K -1 the neglected item corresponds to an error 0.2 K in temperature of the gas stream.
Of the same order of magnitude as potential energy for liquids is the work exerted by (liquid) pumps; imagine its expression in terms of total liquid head (equivalent height). Also power supply to pumps, though not perhaps negligible in the economic balance of the plant, is usually not detectable in the enthalpy (energy) balance set up around the units.
108
Material and Energy Balancing in the Process Industries
G R A P H AND M A T R I X R E P R E S E N T A T I O N OF THE E N T H A L P Y B A L A N C E
5.2
The matrix C of elements Cnj (n e N u , j e J ) is the reduced incidence matrix of graph G, with the environment node as reference node; see Chapter 3. Let us now admit the presence of energy distributors. Then the matrix D of elements Dni (n E T u t,.) D E , i e E) has, according to (5.1.8), the properties of reduced incidence matrix of a graph. Again, the arcs i that have only one endpoint in Tu o r D E will be considered incident to the environment node. Then the matrix D becomes the reduded incidence matrix of oriented graph (say) G E of nodes n e T u and d e D E, and arcs i e E. The graph need not be connected. Let us partition Du )
} rows (nodes) n ~ T
De )
} rows (nodes) d
D-
(5.2.1)
u ~
DE .
columns (arcs) i ~ E Let us further partition the set J of arcs (columns of matrix C) into those incident to some splitter node s ~ S, and theremaining arcs. The first subset is, by (4.2.9 and 10), disjoint union of subsets J~ (s ~ S), say m
J'
-
~
k_) Js s~ S
m
(Js' t'~ J s " -
O
f o r s' ~: s")
and the remaining subset being (say) Ju - J J = J. w J'
( J ' n Ju = Q).
(5.2.2) -
J' we have (5.2.3)
Then matrix C is decomposed
C -
Ca C'
o Ju
c"
/
}Tu
(5.2.4)
}s
J'
because Csj - 0 for s e S and j e Ju. Restricting graph G to arcs j e Ju determines a subgraph of G whose reduced incidence matrix is represented by the columns j e Ju; but then, clearly, C u is reduced incidence matrix of subgraph (say) G, [N - S, Ju] obtained by deleting arcs j e J' and nodes s e S in G, with environment as reference node added to nodes n e T u. As a plausible hypothesis, we can assume G, connected; then matrix C, is of full row rank.
Chapter 5 - Energy Balance
109
If Gu is not connected then at least one of the connected components does not contain the environment node and represents a subsystem connected with the remaining nodes only via certain arcs (streams)j ~ J' (5.2.2); recall that the whole graph G of material streams is connected. Thus all the input streams are outlet streams from some splitter, and all the output streams from the subsystem have some splitter as the other endpoint. Although such scheme is conceivable, it can be regarded as unlikely. In this chapter, the simplifying hypothesis (Gu connected) is irrelevant; but see later Chapter 8.
Let us now partition the column vector In of mass flowrates introduced in (3.1.6) as corresponds to the partition (5.2.3) mu ] m =
m'
}
Ju J'
(5.2.5)
Let us further introduce the vector h of components/~Jmj (j ~ J) and rearranging the vector components in the same order as in (5.2.5), partition
hu / }Ju h' } J'
h =
(5.2.6)
In the same manner, the corresponding vector h of components/)J is partitioned
A / u/,Ju h-
1]'
} J'.
(5.2.7)
The columns of the matrix C are arranged as corresponds to the components of the above column vectors. In particular the columns j e J' are arranged into groups j e Js (s e S) according to (5.2.2), and each J~ is further decomposed according to (4.2.9) into column Js (input) and columns Js (split output streams). Observe that matrix C" is thus partitioned Js o
C
l!
m
-0~ s
where as (s e S) are row vectors
s ~ S
(5.2.8)
110
Material and Energy Balancing in the Process Industries m
Js o:S -
(-1; 1, ..., 1 ) 9
w"-
Js
(5.2.9)
F
Js
and where the remaining elements of the s-th row equal zero, as corresponds to the s-th splitter mass balance _
- 0
Finally let q be the column vector of components q~ (i ~ E), arranged as the columns of matrix D (5.2.1). With these conventions, the whole set of enthalpy balance equations (5.1.9), (5.1.7), and (5.1.10) reads Cuh u + C ' h ' + Duq = 0
(5.2.1 la)
Deq - 0 = 0
and C"m"
(5.2.1 lb)
- 0
Here, the equation Sla' = 0 represents the e q u a t i o n s block-diagonal form
S-
(5.1.7)2.
Thus, in
(5.2.12)
Ss
m
where s ~ S and where matrix S s operates on columns j ~ Js, thus (-1
-1 SS
1
1 (5.2.13)
u
\
-1
1 v'-
Js
Js
Chapter
5 -
Energy Balance
111
is partitioned into column j~ and unit matrix. In order to write explicitly the information that the vector h (5.2.6) is of components/~Jmj, let us introduce the following notation. If v is an arbitrary column vector of (say) N components v~, ..., vN then designate diagv = diag(vl, ..., VN)
(5.2.14)
the N x N diagonal matrix with elements v~, ... , vN on the diagonal. Then, in (5.2.11) we have h u - (diagm u ) 1~u - (diagfiu) mu
(5.2.15)
and h' - (diagm') fi' - (diagll') m'
(5.2.16)
according to the partitions (5.2.5)-(5.2.7). The equation (5.2.1 lb) follows from the mass balance (3.1.6), hence is redundant if the set (5.2.11 a) is written along with the complete mass balance or with the more detailed multicomponent balance comprising the balances (4.2.12b) thus (4.5.2b). Let us finally recall Remarks (ii) and (iii) to Section 5.1. Having a couple of nodes representing a (partitioned) heat exchanger (Fig. 5-2), or also an arrangement such as in Fig. 5-3, we can eliminate the (unique) arc i ~ E connecting the two nodes by merging them. This corresponds to the summation of the two rows of matrix (Cu, C', Du), thus to the elimination of variable qi in (5.2.1 l a). Note that by the merging, the subgraph Gu is reduced to (say) G~, which remains connected if G u is. Then the matrix C~ obtained by the summation of rows is again of full row rank. [Of course in the mass balance, the nodes are not merged.]
5.3
E X A M P L E OF ENTHALPY BALANCE
Numerous simple examples of energy balances are given in Chapter 6. As an example of complex balance, consider again the sulphuric acid plant according to Fig. 4-2. Into the sulphur burning unit, elemental sulphur is conveyed in liquid form. The preceding operation is melting of sulphur, and liquid sulphur is stored; for simplicity and according to our steady-state convention, we include also this part of the plant in the environment node. So stream 11 in Fig. 4-2 is liquid sulphur. Now taking account of the energy transformations, the scheme will be completed by adding net energy streams and
112
Material and Energy Balancing in the Process Industries
certain nodes where only energy is transformed. The flow of heat into the ambient atmosphere due to imperfect insulation will be neglected. Concerning the mechanical energy transformation (power supply), we shall limit ourselves to the relevant items. The power supply to pumps in the acid circulation (units D, A1, A2) is not detectable in the enthalpy balance. Only the fan introducing atmospheric air into the drying unit (stream 1) rises the temperature of the air in a detectable manner. So let us cut stream 1
1
environment
l
.~
O
2
D
F
v
I
l.f I
!
I I
15
] net energy ' stream
13
I I
Fig. 5-4. Power supply f to fan F
where f ~ E and qf is power supplied to the fan. In the combustion unit B is included a boiler producing steam; by convention, the production is expressed in enegy units and the scheme is completed
!
!
Ib
11
.I
I i I I i |
~5
"1 Fig. 5-5. Steam production (stream b) in sulphur burning unit B
Chapter 5 - Energy Balance
1 13
on adding arc b e E, where qb represents the steam production. Finally in the acid units D, A1, A2 are included acid coolers where absorption heat is transferred to cooling water and further to the environment; we thus complete the scheme 12 8
Id
l al
I
I
1
1
!
1"
,~
D
2
7 . . . . . . . y
ti
r
A1
it
15 13
18 16
" a2
y
A2
10
11
13 14
Fig. 5-6. Heat withdrawn from drying unit D as stream d and from absorbers A 1 and A2 as streams al and a2 on adding streams d, a l, a2 where q~, qal, qa2 represent the corresponding net energy flowrates expressed again in energy units. The hot gas from the reactor going to absorption is cooled and heat is recovered. From the possibilities let us consider the following one. The dry air from unit D is divided into streams 3 (air for combustion) and 4; the cool stream 4 controls the temperature in the multistage reactor. The air in stream 3 can be pre-heated using the heat content of stream 6 to increase the steam production. So let us cut the streams 3 and 6 according to the scheme ,r to $2, instead of 6
from R
v
l
from S1 toB, ~, instead of 3 " Fig. 5-7a. Heat exchanger E
3
114
Material and Energy Balancing in the Process Industries
including heat exchanger E. According to Fig. 5-2b, E is partitioned
e
"1
E3
Fig. 5-7b. Partition of heat exchanger E
and net energy stream e is introduced, representing the transferred heat q~. Thus 3' stands now for 3 also in Fig. 5-5. The multicomponent balances of the nodes in Fig. 4-2 remain the same as in Section 4.6, substituting only stream 1' for stream 1 in D, 3' for 3 in B, and 6' for 6 in $2. In addition we have the balances of the new nodes F, E6, and E3. They are trivial; D(n) is unit matrix for n = F, E6, E3 thus in (4.6.7a) we have also n(n) = 0 for the latter nodes. The extension of the list (4.6.1) is easy, using the equality of composition in streams 1 and 1', 3 and 3', 6 and 6'. The modified partition of nodes now reads T u = {F, D, B, R, E3, E6, A1, A2}
(5.3.1)
and again
s = {s 1, s2, s3 }
(5.3.2)
while i s 1 - 2 and Jsl - {3, 4} Js2 = 6 ' and Js2 = { 7 , 8 } Js3 = 14 and Js3 = {15, 16, 17}.
(5.3.3)
According to (5.2.2), J' is union of sets {Jsh } and Jsh (h - 1, 2, 3), and by (5.2'3) Ju = {1, 1', 3', 5, 6, 9, 10, 11, 12, 13, 18}.
(5.3.4)
Then, in (5.2.4), C u is reduced incidence matrix of the modified mass flow graph restricted to arcs j ~ Ju. Matrix C' consists of elements Cnj where n ~ T~ and
Chapter 5 - Energy Balance
1 15
j ~ J' as set up above, Cnj being the elements of the modified incidence matrix. Finally matrix C" is of the form (5.2.8) where as~ = (-1; 1, 1) ~$2--(-1; 1, 1) C~s3 = (-1; 1, 1, 1)
(5.3.5)
as corresponds to the splitter mass balances (5.2.10) thus (4.6.7b), where only 6' stands now for 6. The set of net energy streams equals E = {f, e, b, d, a l, a2 }.
(5.3.6)
The set DE of energy distributors in (5.2.1) is empty. The matrix D u has nonnull elements in row F: D: B: R: E3: E6: AI: A2:
DFf = 1 DDO = -1 Dab = -1 none DE3,e = 1 DE6,e = -1 Dal,a 1 = -1 DAE,a2 = - 1 ;
(5.3.7)
the other elements are zeros. So the set of equations empty, and in the matrix S (5.2.12) we have
Deq
=
0 in (5.2.11a) is
234 Ssl
SS2
-1 1 0 / 3 -1
0
1
6'
7
8
4
-1 1 0 ] 7 -1
0
1
8
14151617 -1100 Ss3
-1
0
-1
00
15 1 0
16
1
17
(5.3.8)
116
Material and Energy Balancing in the Process Industries
specifying the equation Sfi' - 0 in (5.2.11a). We have thus specified the whole set of equations (5.2.11). Recall again that Eq.(5.2.11b) is a consequence of the multicomponent balance; it is comprised in the set (4.6.7b) where now 6' stands for 6. The whole task now consists in specifying the components of vectors h, and h' to be used in (5.2.15 and 16). The composition of the streams follows from the list (4.6.1) and from the equality of compositions in streams 1 and 1', 3 and 3', 6 and 6'. Nonreacting are the components C3 (N2) and C4 (H20) due to the elimination of possible component H2SO 4. Their standard enthalpies will be put equal to zero for gaseous N2 and liquid H20 at some 'normal' temperature TOand pressure P0. We shall immediately neglect the pressure dependence in all the specific enthalpies. The other components than C3 and C4 are reacting. Suppose we know the standard reaction heats, on the mole basis A' for reaction S A"
(5.3.9)'
+ 0 2 = SO 2
SO2 + 1/2 02 = SO3
(5.3.9)"
where S is in solid state, the other components in gaseous state. Indeed, the data are available in standard literature. Recall that the reactions are exothermic, thus A' < 0 and A" < 0. Let us recall Section C.3, formula (C.23). Writing the first reaction as SO2 - 02 = S the 'reaction heat' equals (-A'). For convenience, we take the components SO2 as 'basic' thus, by convention
0 2
and
m
i4r ~tJt
k
0
for k = 2, 3, 5 (gaseous state) (5.3.1.0)
and m
H4r176 = 0
(liquid state)
while H} ~ --A'
(solid state)
H6~~
(gaseous state) .
A"
}
(5.3.11)
m
Then the specific enthalpies are (1/M k ) Hkr176 In the gaseous streams 1, 1', 2, 3, 3', 4, 5, 6, 6', 7, 8, 9, 10, we shall neglect the heat of mixing; but recall that H20 is present as vapour. We thus make use of the formula [cf.(C.24)]
1 17
Chapter 5 - Energy Balance 6
1
121- Z Yk Cpk(T-To) + Y4/~4{~ + ~ k=2
M6
Y6A''
(5.3.12)
because Yl = 0 in all gaseous streams, and putting generally Yk -" 0 if Ck is absent. Here, Cpk is integral mean specific heat of gaseous Ck dependent on temperature T; L4~~ is evaporation heat per unit mass of water at (To,Po)./t is the quantity/~ in the j-th stream. In the stream 11 (liquid sulphur), we put
17111= -
1
A' + cpl(S)(Tml-To) + Lml + cpl(1)(Tll-Tml ) .
(5.3.13)
M1 Here, cpl(s) resp. r is (isobaric) specific heat of component C1 (sulphur) in solid resp. liquid state, Tm~ is melting temperature of C~, Lml is the corresponding heat of melting per unit mass. T j is generally temperature of j-th stream. In the stream 12 (liquid water) we have /_~12 __
Cp4(1)( T
'2-To)
(5.3.14)
where the argument (1) makes distinction from the notation in (5.3.12); (1) means again liquid phase. In the acid streams 13-18, the absorption and mixing heats are quite important. The streams are mixtures (H20, SO3) by our convention. Using thermodynamical tables, we can find directly the function h(T, y) representing specific enthalpy of the liquid solution at temperature T and y = Y6 (mass fraction of SO3). The function refers to zero levels
(5.3.15)
h(0, To)= h(1, To)= 0 ;
specific enthalpies of liquid H20 and SO 3 equal zero at To; for y ~ 0 we have h(T, y) < 0. Now the assumption (5.3.15) corresponds to our/44~~ - 0 by (5.3.10), but we must bring gaseous SO3 with enthalpy/46C~ into the liquid state. Thus in the acid streams ^
H - Y6
1
M6
A " - L(6~
h (T, Y6)
(5.3.16)
where L6~~ (> 0) is evaporation heat of liquid SO 3 at T0, per unit mass. If the reader is well-trained in chemical thermodynamics, he can find other ways for computing the function h(T, y) from otherwise given data.
118
Material and Energy Balancing in the Process Industries
The thermodynamically consistent conventional values of specific enthalpies /4J(j ~ J) constitute the components of vector h, partitioned according to (5.2.7) in Eqs.(5.2.1 l a). The set of balance equations is thus complete and expressed in variables mj, y~, and T j (temperature of stream j), with variables q~ in addition. Recall that the variable qe (see Fig. 5-7b) can be eliminated by summation of the node E3 and node E6 enthalpy balances in (5.2.11a)~, as DE3,e + DE6,e = 0 by (5.3.7).
Remark
Conceivable is (and was actually proposed) a technology of sulphuric acid manufacture under elevated pressure, where the steam boiler is replaced by a gas turbine. We thus have an example of positive work exerted by the system. The whole scheme is then different; in particular in Fig. 5-5 we can imagine stream b as mechanical power produced by the unit.
5.4
HEAT AND MASS BALANCING
We have chosen, in Section 5.3, a classical technology where available thermodynamic data allow us to compute the balance according to the general scheme (5.2.11). The formulation (5.2.11) of the enthalpy (approximate steady-state energy) balance is, however, not the only possible, and not always the most convenient one. In practice, one must frequently put up with a number of empirical data specific to the system and not found in thermodynamical tables. The data can even be more reliable than those found by a hypothetical thermodynamic path involving not precisely known items. For example the standard enthalpies of the components are, in fact, certain extrapolations computed backwards from reaction heats under realistic experimental conditions; for instance [see (5.3.9)] sulphur is certainly not burnt at, say, 273 K. Because the theoretical items are subtracted in the input - otput node balance, a relatively small error in the data may cause a significant relative error in the result. Let us go back to the node balance (5.1.9). The specific enthalpy/4 of a stream can be expressed in the form K FI-
f1(o) 5".yk.. k + h
k=l
(5.4.1)
where the term h is sum of increments due to bringing the components from the standard state into the actual state. We have
Chapter 5 - Energy Balance
Cnj/-tJmj jeJ Z
119
g
-- k=Z1P,k (~ jZj Cnj y~,mj + jZj Cnj hj mj K
^
= z CnjhJm -
j~.J
R(n) =
K
Z CnjhJmj - r=~_lWr(n)k~==~kr(n)Mkt?-l(k~ j~J I
by (4.2.12a) and (4.2.11). We have Mk/4~~ = "'k/4(0)(standard molar enthalpy of Ck), and (say) g
,.,.
(5.4.2)
Qr(n) = k~l Vkr (rt)Hk(~
is the (isobaric) standard heat of the r-th reaction in node n, on the mole basis; we have Q~ (n) < 0 for an exothermic reaction. The balance (5.1.9) thus reads
/2 • Wu
jE]~jCnj hJmj + /E]~EDniqi
R(n) = r=Z_lQr (n) Wr(n) .
(5.4.3)
The integral reaction rates W~ (n) can be computed, if the component balance equations have been solved for the quantities n k (n), provided the reactions are independent; see Remark to Section 4.5. Let R(n) = 1 for simplicity. Omitting the indices r and n, Eq.(4.5.12) reads
W
nk
...
Vk
whatever be k. Consider for example the reaction - S O 2 - 1/2 0 2 "tnode R of Example 4.6, thus Vso2 = -1 and by (4.5.1) with Fig. 4-2
SO 3
=0in
nso2 = N~s02-/~so2 because SO 2 is absent in stream 4 (air); N~o~ is molar flowrate of SO2 in stream i. If we know the gas flowrates and SO2-concentrations, we can already compute
W = N SO 5 2 -~N~o2 The example suggests that the RHS in (5.4.3) can sometimes be computed or estimated on the basis of a limited information.
120
Material and Energy Balancing in the Process Industries
The enthalpy terms hj in (5.4.3) can comprise heats of phase transition and, as in Example 5.3, also heats of mixing. As another example, consider the condensation of vapour (say) CI from a gaseous stream.
Fig. 5-8. Condenser C
Streams 1 and 2 are gaseous, stream 3 is the condensate, c is stream of heat transferred to the cooling medium. Chemical reactions do not take place, hence Eq.(5.4.3) reads hlml
- h2m2 - h3m3 -
qc
=
0
.
For j = 1 and 2 we approximate in the same manner as in (C.24) K
hj =
Z YJkC~k(TLTo) + yl L} ~
k=l
and for j = 3 h 3 = Cpl 3 (Z3_Zo) .
we take the standard states of aggregation gaseous, with the exception of liquid C~ with evaporation heat L~(~ Let further K
c~= kZ__lY{C~k
(5.4.4)
be, for any stream, assessed as a constant (or an integral mean specific heat of the mixture, only temperature-dependent), specific to the system under certain 'normal' operation conditions. Then the balance reads
Chapter 5 - Energy Balance 1
m 1Cp ( T ~ - T o )
2
121
2
- m 2 Cp (T -To)-
1 2 where m~ Yl- m2Yl
-
m3C3p( T 3 - T o ) - qc + (ml Yll-
m 2 Y ~ )f,l ~ - 0
m3 is the mass flowrate of the condensate.
Further examples are left to the reader as an exercise. In the end, we obtain the balance (5.4.3) in a form like n ~ T,: j Ej Cnj h~ mj + i~EDniqi + s(n)= 0
(5.4.5)
where Ft~ are certain assessed quantities specific to the streams j in the given technological system and dependent only on temperature; s(n) is a (positive or negative) 'heat source term' in node n, also specific to the system, dependent generally on composition and flowrates of the incident streams, assessed a priori or conversely computed from the balance. In particular if kt~ - Cp J (TLTo), with integral mean specific heat c~ of stream j, then/z~ is (so-called) sensible heat of stream j. For instance if stream j is vapour of component Ck then ft~ can comprise also the evaporation heat, and possibly the correction to elevated pressure; imagine high-pressure overheated steam. The enthalpy balance of the form (5.4.5) will be called heat balance of nodes n ~ T u , replacing Eq.(5.2.1 l a)l. Due to the presence of mass flowrates mJ, it will be written along with the mass balance. The whole set of equations will read, having rewritten Eq.(3.1.6) according to (5.2.4 and 5) Cum u + C ' m '
= 0
C"m'
= 0
Cuhsu+C'h s+ Duq+S=0 Deq Sh's
(5.4.6)
= 0 = 0.
Here, according to Eq.(5.4.5) we have introduced the column vector h~ of components hJsmj (j e J), partitioned
hs =
hsu h,s
} Ju } j,
(5.4.7)
and the column vector s of components s(n) (n ~ T u ); in addition 1]s is the column vector of components h~ (j ~ J), again partitioned
hs =
hsu
} Ju
1~,s
} j,
(5.4.8)
122
Material and Energy Balancing in the Process Industries
and we thus have, with the general notation (5.2.14) hsu = (diagm u ) l~u = (diagfi~u) m u
(5.4.9)
h'~ = (diagm') 11'~= (diagl~'~) m' .
(5.4.10)
Note that h~ is vector of material heat (most simply sensible heat) flowrates, 1~s the corresponding vector of heat content factors (per unit mass), by definition only temperature-dependent. The partitions (5.2.4), (5.2.5), (5.4.7), (5.4.8) correspond to the partition of the set N u of units into S (splitters) and T u (non-splitters, say 'material-treating units'), and to the corresponding partition of the set J of material streams into J' (incident to some splitter) and Ju (nonincident to any splitter). We further have the column vector q of components qi (i ~ E) representing nonmaterial energy flowrates in streams i; E is the set of the streams. Recall Remark (i) to Section 5.1 for the conventions. By definition, no stream i (~ E) is incident to any splitter; hence the streams can be incident only to the environment node, the nodes (units) n ~ T u, or also some node d ~ D E regarded as energy distributor. No material stream j (~ J) is incident to any energy distributor d (~ DE). The oriented graph of arcs i ~ E, and nodes n ~ T u and d e D E, denoted as GE, has reduced incidence matrix D; the environment node is again reference node. The node set of GE is partitioned into environment node, set T u, and DE; correspondingly are partitioned the rows of D according to (5.2.1). Finally S is the matrix (5.2.12) with (5.2.13). The last vector equation in (5.4.6) means again that for any splitter s (~ S), the thermodynamic state (thus temperature thus the heat content factor) of the input stream Js equals that of the split output streams j ~ Js ; recall the conventions (4.2.9 and 10). As an example, imagine a complex heat exchanger network where heat produced in some units is recovered by preheating colder streams; see for instance Section 6.3, Fig. 6-10. Recall that the variables qi that represent simple heat transfer flowrates can be eliminated. If n' and n" are the two endpoints of the arc i (~ E) representing the cold and hot sides of an exchanger according to Fig. 5-2b, by the summation of rows n' and n" in (5.4.6)3 o n e eliminates qi, as Dn'i qi -I- Dn,, i qi = 0 .
(5.4.11)
See the more detailed discussion in Remarks (ii) and (iii) to Section 5.1; imagine h~ instead of/T in (5.1.12).
123
Chapter
5 - Energy Balance
5.5
REMARKS ON SOLVABILITY
The complete set of balance equations comprises the component (chemical species) balances and the energy balance. In an analogous manner as in Section 3.3, having measured or otherwise fixed certain variables' values, the variables can be classified into measured and unmeasured; the latter are to be computed as unknowns in a system of equations. A finer classification as in Section 3.3 is, however, less obvious. Relatively simple is the system of equations (5.4.6). Under plausible assumptions, it can be shown that it has certain properties of 'regularity'; see later in Chapter 8. Having measured the values of certain variables thus having restricted the number of unknowns this regularity can get lost. Let us give a simple example. Let us have the system
a ~
5 :u3
b ~
t-7
6
r
F i g . 5-9. E x a m p l e
of balances m I + m 3 - m 5 = 0
mlh 1 + m3h 3 - msh 5 = 0
(a)
m 2 + m 4 - m 6 -
m2h 2 + m4h 4 - m6h 6 -
(b)
0
m 5 + m 6 - m 7 = 0
msh 5 + m6h 6 - m7h 7
0
= 0;
(r
here, hj stands for ~t~ in (5.4.6). Measuring hj thus means measuring the corresponding temperature. Let us have measured the values m 7 -- m +7
( , o)
and 9 +
hj = hj ,
j= 1,...,7.
124
Material and Energy Balancing in the Process Industries
If h~ r h~, h~ r h4, and h~ r h~ then m 5 and m 6 are uniquely determined by (c), then also m~ and m 3 by (a), and m2 and m 4 by (b), hence the unknown variables can be called 'observable'. Let, however, h~ = h~ and h ~ - h~. Then from (a) and (b) follows m 5 m 6 (h 2 -
-
0
) -
0
and assuming naturally m5 r 0 and m 6 :r 0, the equations are not solvable unless h~ - h~ and h~ - h~ (in which case they have an infinity of solutions). Let in addition h~ = h2, but let us have found h~ r h~. Clearly, the conditions are contradictory due to measurement errors. If we regard h~ and h~ as true values then the variables m5 and m 6 are uniquely determined by (c), but the remaining equations are not solvable. Generally, in a nonlinear system the solvability with respect to the unmeasured variables depends on the measured values and, as is frequently the case, the system is not solvable unless the measured values are adjusted by (nonlinear) reconciliation. In the above example however, a detailed analysis would show that the (iterative) reconciliation procedure would not converge for reasons of principle. Instead of speaking of observability/unobservability, one would rather say that the problem is not well-posed. See chapter 8 for more detailed discussion.
5.6
UNSTEADY ENERGY BALANCE
Recall the introducing paragraph to Section 4.7. Again, the use of unsteady energy balances is limited; we shall again consider only simple cases where the accumulation of energy in the node can be approximated in terms of averaged thermodynamic state variables. Recall now the introducing paragraphs to Section 5.1. The elementary reasoning leading to Eq.(5.1.1) can be modified, giving the balance dU Uin + Win "- Uout + Wout + Qout +
dt
where in addition U is internal energy accumulated in the node. The same consideration, including the terms P J V j in Win and Wout, leads to the balance dU
dt
+ZHj=Q-W j
Chapter
5 -
125
Energy Balance
where (with positive specific enthalpies) Hj > 0 for outlets, Q = -Qout, and W is work (per unit time) exerted by the node. Observe that the accumulation of energy is expressed by U (internal energy), not perhaps H (enthalpy). The general (simplified) energy balance can be obtained according to Appendix C from Eq.(C.26), where we neglect kinetic, potential (and electromagnetic) energy accumulated in the node. The other simplifying hypotheses are the same as in Sections C.4 and C.5. Hence in place of the balance (5.1.3) with (5.1.2) we finally have dU
I
,,.
+ Z/-/' S~ = Q'. dt i=1
(5.6.1)
Here, U is the integral over region N(the node)
U = ~ 9(YdV
(5.6.2)
N
where 9 is mass density and 0 specific internal energy. Clearly, the derivative
d U/dt can be, at most, only roughly approximated. We shall give two examples where such approximation is plausible. (a)
Imagine a reactor with fluidized bed of solid catalyzer; the reacting phase is gas phase. We can neglect the accumulation of energy in the reacting gas. The region N(the bed) is considered constant. We have 0 = / 4 - PV
(5.6.3)
where/-) is specific enthalpy, V specific volume, and P is pressure. We take P as a constant average value and V = 1/9 constant for the catalyzer bed. In the fluidized bed, temperature T can be considered spatially constant. Then, approximately dU
dt
~ pcpdV
dT dt
(5.6.4)
where Cp is (isobaric) specific heat of the catalyzer. Eq.(5.6.1) with (5.6.4) is the unsteady energy balance. (b)
Imagine a stirred homogeneous reactor, with liquid as the reacting phase. Region N is the liquid phase. We take again pressure P as constant. Then
126
Material and Energy Balancing in the Process Industries
(5.6.5)
U = H - PV
where
V - ~ dV
(5.6.6)
N is the volume of region N and H-
I 9/-)dV N
(5.6.7)
where/-) depends on temperature and composition of the liquid Let us now assume that the reactor is stirred in the manner that the liquid phase can be considered uniform. We then can make use of the classical definition of partial specific enthalpy of component C k OH
/)k-
~N k
(5.6.8)
where Nk is mass of species Ck in the mixture whose thermodynamic state is determined by the variables T, P, and the extensive variables N k (k = 1, ..., K). We further designate OH
C -
- Cp~ pdV N
OT
(5.6.9)
the heat capacity of the liquid mixture; its (isobaric) specific heat is Cp and the integral is total mass of the liquid, at given time t. With constant pressure we thus have dU
dT - C
dt
dt
K ^ dN k dV + E Hk -P ~ . k=l dt dt
(5.6.10)
The energy balance reads dT C ~ dt
K ,, dN k I + Z Hk + ]~/2/iJ k=l dt i=1
i -
Q'+ P
dV
.
(5.6.11)
dt
Recall that/)k is partial specific enthalpy of component C k in the uniform mixture, while H ~is specific enthalpy of i-th stream incident to the node. Q' is energy input by (5.1.2). ^
.
Chapter 5 - Energy Balance
127
The derivatives dNk/dt further obey the balances given in Section 4.7. The latter can be recast into reaction-invariant form, thus eliminating the (possibly unknown) reaction rates. On the other hand, if the reaction rates can be assessed then we can directly substitute, for dNk/dt, the terms of Eq.(4.7.1). Observe that in (5.6.11) we have, for stream i K
/T = Zly~/4~
(5.6.12)
k=
where/-]r~ is partial specific enthalpy of C k in the i-th stream. Hence the balance reads, as the reader readily verifies dT
C~
I K ,,. R K dV + ~ Z (H~: - Hk) yikJi + ~ ( Z Vk,:MkI?tk) W r - Q' + P . (5.6.13) dt i=1 k=l r=-I k=l dt
Here, if I is the unique outlet stream from the reactor, one can assume that its thermodynamic state will equal that of the uniform reacting mixture, at given instant t. Thus H~ =/4k for k = 1, ..., K, and the I-th summation term vanishes. Denoting K
r - 1, ..., R: Qr - kZ__lVk~Mk Hk
(5.6.14)
is (isobaric) heat of r-th reaction, at the thermodynamic state of the uniform mixture in the reactor. Putting m~ = -Ji for i < I (positive mass flowrates of inlet streams), the balance finally reads Qr
dT
dV
C ~ - Q' + P ~ dt dt
R
I-1
K
Z Q~W~ + Z Z (/t~-/-tk)Yk r=l i=1 k=l
mi .
(5.6.15)
Recall that Q~ < 0 for an exothermic reaction, by convention. The states of aggregation of the input streams are arbitrary, assuming thermodynamically consistent enthalpy values.
5.7
MAIN RESULTS OF CHAPTER 5
In practice, an energy balance is never thermodynamically rigorous; some less relevant terms are neglected, and other only approximated. Neglecting also the change of accumulation of energy in the nodes, such simplified energy balance is called enthalpy balance; see Section 5.1. As in Chapters 3 and 4, the
128
Material and Energy Balancing in the Process Industries
units (nodes) connected by material streams (arcs j ~ J) constitute the graph G[N,J] with environment node added to the set N u of units. The set N u is again partitioned according to (4.8.3) into splitters s ~ S and the other n ~ T u. In addition to the streams j ~ J, we consider net energy streams thus arcs i ~ E; they represent flow of energy expressed in energy units (say, watts) irrespective of whether (possibly) the energy is associated with mass of a heat transfer medium, not mixed with other streams. In addition to the nodes n ~ N u, we then generally consider in addition certain nodes d ~ D E regarded as energy distributors; they are incident only with arcs i ~ E. By convention, the arcs i ~ E are oriented; see (5.1.8) where we consider also n = d ~ D z. Then the whole set of constraints (enthalpy balance) is (5.1.9), (5.1.7), and (5.1.10);/4J is specific enthalpy of material stream j, qi is flow of energy in net energy stream i ~ E. Certain streams i ~ E can represent heat flow in a heat exchanger; see Remark (ii) to Section 5.1, or also Remark (iii) ibid. According to Figs. 5-2 and 5-3, the units where indirect heat transfer (through a dividing wall) takes place are formally divided into two parts, so as to take account of the separate mass (and chemical components) balances of each of them. However approximated, in principle the enthalpy data have to be thermodynamically consistent; see Remark (iv) to Section 5.1. In Remark (v) ibid., we give some numerical estimates of terms neglected in the complete energy balance (kinetic and potential energy); also mechanical energy supply to liquid pumps and agitators can usually be neglected in the total energy balance. The technological system extended by net energy streams and energy distributors can be represented by graphs G and GE; see Section 5.2. Here, the additional Gz is of node set N E = {no} u T, u D z
(5.7.1)
where n o is the environment node, and of arc set E; we have T u = No - S where nodes s e S (splitters) are not incident with any arc i e E. The reduced incidence matrix of Gz is D (5.2.1); its rows are partitioned giving submatrices D u (nodes n e Tu) and D e (nodes d e DE), where D E can be empty thus D e absent. The reduced incidence matrix of G [N, J], thus C is partitioned according to (5.2.4); here, the rows are partitioned according to the decomposition Nu = Tu u S, and the columns according to the decomposition J = Ju u J' where the arcs j e J' (5.2.2) are incident to some of the splitters, the arcs j e Ju are the remaining ones. Thus the nodes n e T u can be incident with arcs j e Ju (submatrix Cu), and also be adjacent to certain splitters via some arcs j e J' (submatrix C~. The nodes s e S are not incident with any arc j e Ju. Thus the submatrices Cu and Cspli t in (4.8.6 a and b) are partitioned
130
Material and Energy Balancing in the Process Industries
plus the equation C"m' = 0, which is the mass balance of the subset of splitters. The latter equation (included in the balance Cm = 0) is an algebraic consequence of the chemical component balances. If some heat transfer rate qi in an exchanger is not given a priori, it can be eliminated by merging the two endpoints of arc i (say n~' and ni" in T u ), thus by summation of the two rows (ni' and ni") in submatrix (Cu, C',Du ), which corresponds to the summation of the two scalar equations in (5.7.5)1. Of course in the components (mass) balance, the nodes are not merged. The constraints (5.7.5) require having a thermodynamically consistent database for the specific enthalpies/~J as functions of temperature, pressure, and composition (mass or mole fractions); the pressure dependence can often be neglected. The mass fractions Yk and mole fractions Xk of components Ck are interrelated (C. 12) Yk
xk =
K y~
thus
mk Z
1=1 M l
Mk Xk
(5.7.6)
Yk --
K
Z m~x~ l=l
in a K-component mixture; M k is formula (mole) mass of C k, The partial specific enthalpy/~ of Ck in stream j equals H~,/M k where H~, is partial molar enthalpy, and we have generally K
.
^
.
I?-P= Zly~, H~,
(5.7.7)
k=
where all/4~ (j e J) have to be thermodynamically consistent. The constraints (5.7.5) are written along with the constraints (4.5.2) thus (4.8.9) for n e T u , and (4.8.6b-d). See Sections 4.6 and 5.3 as an example. It is also possible to consider the constraints (4.8.6a-d) with explicitly written (integral) reaction rates W~ (n), and introduce the standard (isobaric) reaction heats Q~ (n) (5.4.2). If there are K(n) chemical species in the streams j incident to node n, we have K(n)
Or(n) =
k~__lVkr(n) "'k/4(0)
( r - 1, ..., R(n))
(5.7.8) m
with stoichometric coefficients Vkr(n ) and standard molar enthalpies --k14(o)ofspecies Ck; the standard heats can also be given directly for the reactions considered. Observe that Q~ (n) < 0 for an exothermic reaction. We then have the node balances (5.4.3) with (5.4.1) for n ~ T u. Thus, for any stream j, we introduce the quantity hj that represents the sum of increments due to bringing the components
Chapter 5 - Energy Balance
131
from their standard states into the actual state of the mixture in the stream, hence hj = Z y~ (/-)~ - "'k~r(~)
(5.7.9)
k
according to (5.7.7), with summation over components Ck present in stream j; (0) _ H(0)/Mk" [For example if the standard state of aggregation of all the "'k components is liquid, as well as in the mixture (and neglecting the pressure dependence and the enthalpy of mixing), we have hj - c~ (T j - T0) where TO is standard temperature, T j temperature of the stream, and c~ the (isobaric, integral mean) specific heat of the mixture.] We then partition the streams into Ju and J' and denote by hu resp. h' the vector of components hj for j e Ju resp. j e J', in lieu of lau resp. 11' in (5.7.3 resp.4). We further introduce the vector qR of components R(n)
qRn = - Z Or (n) W~(n) (n e T u)
(5.7.10)
r=l
(zero for a nonreaction node). Then along with the constraints (4.8.6) we have Cu (diagmu)flu + C' (diagm') fi' + Ouq + qR = 0 Deq Sh'
= 0
(5.7.11)
= 0
with 'source term' (vector) qR due to (standard) reaction heats. It can happen that our information is limited and the detailed chemical components balance not needed. Then only 'heat and mass' balances are set up; see Section 5.4. A typical example is a heat exchanger network. In the equations (5.7.11), the quantities h j (5.7.9) are approximated as functions of temperature only, say ~t~ (T j ) in stream j. Formally, we can consider in addition certain 'source terms' s(n) in some nodes n ~ T u , for example due to heats of reactions, a priori assessed or regarded as unknown parameters to be computed from the set of constraints (given measured values of mass flowrates and temperatures). For example in a heat exchanger network, kt~(T j ) - CpJ (TJ-To) is the sensible heat of stream j, with temperature T j , specific heat.c~, and reference temperature To. We introduce the vectors h~u of components hJ~,j ~ Ju, and h'~ of components hJ~ for j ~ J' (5.4.8), then the vectors hsu (5.4.9) of components h~ (j ~ Ju) and h's (5.4.10) of components h~ for j ~ J'; the quantity hJs.- mj hJs is the 'heat flowrate' in material stream j, with 'heat content factor' his . Finally s is the vector of components s(n), n ~ T u . Then the heat and mass balance is represented by the equations (5.4.6). Again, the heat transfer rates q~ through dividing walls can be eliminated by summation of the two scalar equations in (5.7.11)~, viz. the n'i-th
Material and Energy Balancing in the Process Industries
132
and n'i'-th where n] and n'~ are the two endpoints of arc i (~ E). Consider in particular a heat exchanger network without source terms (s = 0), without energy distributors (DE = O), and such that all the qi (i ~ E) represent heat transfer rates in exchangers (thus both endpoints of any i ~ E are in T u , not perhaps no). Let then, in (5.4.6), C~ resp. C'* be matrix obtained from Cu resp. C' by the summation of rows, separately over each couple {n], n'i'} of endpoints of arcs i ~ E. The balance then reads Cumu + C'm' = 0 C"m'
= 0
C~ hsu + C ' * h ;
- 0
(5.7.12) Sfis
- o
where the summation is not performed in the first two vector equations. The matrix C~ is of full row rank if (as assumed above) C a is. The minimal set of balance constraints (multicomponent chemical species balance and energy balance) will be formulated and analyzed in Chapter 8, Section 8.3; it is a set of independent scalar equations taking still account of all the available information. Solvability problems arise when certain variables' values are given a priori; see again Chapter 8. For the moment, let us only recall Section 5.5 as example of a complication. Formally, it is also possible to set up a balance taking into account the change in accumulation of energy in certain nodes; see Section 5.6. The general (but again simplified) form is (5.6.1). Here, the change in accumulation is represented by the term dU/dt where t is time and U the integral (5.6.2) of internal energy in the node. The possibilities of using such balance in practice are limited. The example of a stirred homogeneous reactor (5.6.5-15) is perhaps representative. [Note that in contrast to (5.7.8), Q~ (5.6.14) is reaction heat at the actual thermodynamic state of the mixture.]
5.8
RECOMMENDED LITERATURE
A rigorous thermodynamic formulation of the energy balance requires considering nonideal systems; see for example Holland (1977). For a complete integral balance, see then Veverka and Madron (1981). In a mathematically formal manner, the problems of solvability of mass and energy balance equations with given (measured) data were analyzed by Stanley and Mah (1981 a and b). Less formal but nore general is the analysis by Kretsovalis and Mah (1988); the authors consider multicomponent mass balance along with energy balance. See also Mah (1990).
Chapter 5
-
Energy Balance
133
Holland, C.D. (1977), Energy balances for systems involving nonideal solutions, Ind. Eng. Chem. Fundamentals 16, 143-168 Kretsovalis, A. and R.S.H. Mah (1988), Observability and redundancy classification in generalized process networks, I and II (Algorithms), Comput. Chem. Engng. 7, 671-703 Mah, R.S.H. (1990), Chemical Process Structures and Information Flows, Butterworths, Boston Stanley, G.M. and R.S.H. Mah (1981a), Observability and redundancy in process data estimation, Chem. Eng. Sci. 36, 259-272 Stanley, G.M. and R.S.H. Mah (1981b), Observability and redundancy classification in process networks (Theorems and algorithms), Chem. Eng. Sci. 36, 1941-1954 Veverka, V. and F. Madron (1981), Differential and integral energy balances of complex chemically reacting systems, Chem. Eng. Sci. 36, 825-832
This Page Intentionally Left Blank
135
Chapter 6 ENTROPY AND EXERGY BALANCES This chapter deals with thermodynamic analysis of a technological process from the standpoint of exploitation of energy. It is included in the book only marginally, as another example of balancing a quantity associated with material flow. This quantity, called exergy, is intuitively interpreted as 'available (exploitable) energy', and its 'balance' is, in fact, an imbalance: due to the 2 "d Law of Thermodynamics, in any process some exergy is wasted (lost). The loss of exergy can be computed, and possibly compared for different alternatives of the process. The relation to the 2 no Law is explained in more detail in Appendix D.
6.1
EXERGY AND LOSS OF EXERGY
Let us have a technological unit (node) in steady-state operation, schematically W
F"
w-
materials streams
9
"1
0t
w, ~
boundaries of the node
Fig. 6-1. Node balance
The streams incident to the node are oriented according to Fig. 6-1. Thus oriented mass flowrate F i > 0 for inlets, F i < 0 for outlets, W' is mechanical power supply, and Q is heat supply per unit time; we consider the heat supply through the walls divided into several streams Qh. If compared with the notation in (5.1.1) we have F i - -Ji and W' = -W. Electromagnetic phenomena are not considered, hence the steady-state enthalpy balance reads
136
Material and Energy Balancing in the Process Industries
'~l/2/iFi + ~h Qh + W' - 0
(6.1.1)
where/2f is specific enthalpy of i-th stream. According to Appendix D, the 2 nd Law can be formally written as an 'entropy balance'
E S~F i + Z Q h + Qs = 0 i
h
(6.1.2)
Th
where S ~ i s specific entropy of i-th stream. The sum over indices h is an approximation for the integral in (D.11), where the whole heat transfer surface W has been divided into elements with temperatures Th. Observe that W is a fictitious surface of zero width. Considering an actual wall we have to decide where the surface W is traced, because there is a temperature difference between both sides of the wall. If we trace W near the outer side then Th is temperature of the outside medium. The equation (6.1.2) is, in fact, an operational definition of the entropy production term Qs (more precisely integral entropy production rate). Its continuum thermodynamic definition is by (D.10) where the entropy production density qs is determined by the irreversible processes in the node; for example if tracing the wall W at the outer side of the node then the entropy production due to heat conduction under temperature gradients in the wall region is included in Qs. The 2 nd Law claims that Qs > 0
(6.1.3)
for any technological (thus 'natural') process; the limit case Qs = 0 corresponds to an idealized ('infinitely slow') process under thermodynamic equilibrium. So far, all was pure (though simplified) contemporary thermodynamics. The following step goes back into the past century, into the time of Carnot cycles. We now choose a temperature To , that of the 'environment' regarded as an infinite heat reservoir (bath); say To = 273 K, or To = 298 K, according to the season. Multiplying Eq. (6.1.2) by To and subtracting from (6.1.1) we have
Z(/2P - T0~)F i + Z T~ )Qh + W' - ToQ s - O . i h ( 1 - --~-h
(6.1.4)
Here,
TIh = 1 -
r0
(6.1.5)
Chapter 6 - Entropy and Exergy Balances
137
is the traditional Camot efficiency: thus 'lqh Qhis 'mechanical work content' in the stream Qh of heat, i.e. the work (per unit time) that could be hypothetically gained by 'reversible transfer' of heat Qh from temperature Th to the temperature To of the environment (our infinite reservoir). Let us designate Eix = ( ~ - To ~i ) Fi
(6.1.6)
and call it the exergy(-flowrate) of the i -th (oriented) stream. If we imagine an idealized reversible (equilibrium) process then Qs = 0, and the balance (6.1.4) can be regarded as the balance of'available (exploitable) energy', from which Eix is attributed to the i-th material stream, mutually transformable with rib Qh ('exergy of heat flow') and W'. For any natural process, we have Qs > 0 and some exergy is lost (wasted). The term To Qs > 0
(6.1.7)
is thus the loss of exergy (per unit time) by the (steady-state) process in the node. Instead of 'available energy' (thus exergy) one says also briefly availability. In fact, there can be found subtly different meanings of the three terms, due to historical reasons; we can disregard them.
6.2
SIMPLE EXAMPLES
Clearly, computing the loss of exergy is equivalent to computing the term Qs. In addition the latter is, by (6.1.2), independent of the choice of TO. So let us give the expressions for Qs in certain simple types of industrial units. For the sake of simplicity, the terms of the balances are computed using approximate thermodynamic relations. Example 1. Steam generator
TQ"
.I 1 -
I
T4 2
-
b)
1
-
I
t 3 Fig. 6-2. Steam generator
138
Material and Energy Balancing in the Process Industries
According to scheme a), hot combustion products (1) are cooled by heat transfer (Q') and leave the unit as stream 2. We have Q = -Q' in Fig. 6-1. We trace the boundary W at the steam side of the generator, hence we can approximate T = Tb as the constant boiling point of water at given pressure. If m (= m~ = m2) is the gas mass flowrate and if the specific heat of the gas is approximated by a constant Cp, the balance (6.1.1) reads mCp (7"1- T2) = Q'
(6.2.1)
where Tj is temperature of stream j. Using the relation (D.4), we have the 'balance' (6.1.2)
Qs (a) -
O'
Tl
- mCp l n ~
(6.2.2)
where (a) refers to the scheme 6.2a, from where immediately the expressions for Qs in terms of 7'1 and T2 . In terms of T~ and Q' we have
Qs (a) -
Q'
7'1
- mCp In
Tb
-
Q'
Q'
+ mCp In
O
~
_
(6.2.3)
mCp T 1
Tb
T l-
mCp
According to scheme b), the steam side of the generator is included in the node and the streams 3 resp. 4 represent feed water resp. produced stream. We approximate the specific heat of liquid water also by a constant, Cpw, and let /_, be the evaporation heat at temperature Tb; we neglect the pressure dependence for liquid water enthalpy. Then, by (6.1.1) ^
(6.2.4)
mCp (T 1-T2) - m w (Cpw(Tb-T3) + L)
where mw is mass flowrate of water, thus also of produced steam. The specific entropy ~4 of steam is computed following a thermodynamic path from temperature T3 to Tb for liquid, then evaporation at Tb . The hypothetical path is reversible; thus at the boiling point, we have the equilibrium condition (~(vapour) - (~(liquid), with Gibbs function (D.6). We thus have
S(vapour) - S(liquid) -
L
(6.2.5) ^
quite generally, with evaporation heat L and boliling point Tb of any liquid.
6 - Entropy and Exergy Balances
Chapter
139
According to (D.5), we neglect also the pressure dependence of liquid water entropy. Then
~4
~3 _
-- Cpw
In ~
+
L
(6.2.6)
and the entropy balance (6.1.2) reads
L
Qs (b) - -mcp In ~
+ mw (Cpw In ~
+
L Tb
).
(6.2.7)
The enthalpy balance of the steam side reads mw (Cpw (Tb-T3) + L) = Q ' .
(6.2.8)
So if feed water is introduced at temperature Tb , by T3 = Tb we have Q' - mw L and Qs (b) - Qs (a). Let thus T3 = Tb for simplicity. According to (6.2.2) and (6.2.1), putting Qs - Qs (a) - Qs (b) we have
(say) ~ =
To Qs
Q'
-
To
rb
-
To
T, ln~.
T,-T2
(6.2.9)
T2
Here, Q' means simply steam production in energy units and the whole expression represents loss of exergy per unit steam production. With constant T0, is function of Tb , T 1 and T2 . Clearly, e decreases with increasing Tb , thus with increasing pressure of the produced steam (given 7'1 > T2 , with the condition Tb < T2 so as to make the process thermodynamically possible). The conclusion is quite plausible: with higher Tb, the energy is obtained in a 'nobler' form. We can also examine the dependence on 7"1 and T2. Denoting f = e/T o we find /)f
1 -
~T,
T,(T,-T 2)
Of
1 -
~T2
q~(x) where x =
Tz(T,-T2)
T2
lnx
7"1 ~(y) where y =
T~
-1>0
< 1 and q~(x)x-1
lny > 1 and ~ ( y ) -
T2
hence the derivatives are positive and we have also
>0
1y-1
140
Material and Energy Balancing in the Process Industries
3e
38 > 0 and
OT l
> 0.
(6.2.10)
OT2
For example with the following values T0 = 2 7 3 K
T1 = 1 2 0 0 K
Tb = 400 K
T2 = 450 K
we have = 0.325 . Replacing T~ by T ] -
1400 K we obtain
e' = 0.356 ; leaving T 1 - 1200 K but setting T~ = 500 K in place of T2 we have e" = 0.341. The formal result (6.2.10) can be physically interpreted as increased irreversibility: on the average, increasing T1 or T2 heat flows from even higher temperatures to the final Tb . Still, what kind of inference can be drawn herefrom is left to further speculations. For instance increasing the combustion temperature 7'1 can mean smaller excess of oxygen in the combustion chamber; it is not immediately clear why more 'exploitable energy' is thus wasted in the generator per unit steam production. See the next example, after formula (6.2.12).
Example 2. Imperfectly insulated pipeline We usually neglect the heat loss terms in the balances. This example is an exception.
IQ"
! ! 1
.
!
.
.
! .
! !
.
I" !
2 i
~) Fig. 6-3. I m p e r f e c t l y i n s u l a t e d p i p e l i n e
1
. . . . .
TQ" !
,.-~ I'
'
i
!
,
b)
,.-2
Chapter 6 - Entropy and Exergy Balances
141
We consider a segment of pipeline as drawn in Fig. 6-3. According to scheme a), the boundaries consist of two cross-sections (stream 1 in, stream 2 out), and of the outer side of the wall (possible insulation included). With Q' = -Q (heat flow into the atmosphere), the balance (6.1.1) is again of the form (6.2.1); m (= m~ = m 2 ) is mass flowrate of the fluid, Cp is specific heat, Tj is absolute temperature at cross section j. Let T' be the outer wall temperature; if the difference 7"1-7"2 is not too great, we can consider T' as a constant average value. We then have the entropy production Qs(a) again by formula (6.2.2), with T' in place of Tb. According to scheme b), the boundary is placed near the wall, but at some distance where the temperature is approximately equal to the atmospheric temperature To . Although the heat flow is mainly due to convection by turbulence, we do not consider any net mass flow across the boundary traced in the atmosphere. Hence the balances are of the same form as in case a), only T' is replaced by To . We thus have, in case b)
Qs ( b ) - Qs (a) + Q'
1
1
To
T'
(
(6..2.11)
The last term represents entropy production by heat flow between temperatures T' and To . Clearly, it is the expression
To Qs (b) = Q' - mcpT o In
(6.2.12)
that can be regarded as the actual loss of exergy, because the heat at temperature T' is not utilized, thus also lost. The example itself is rather trivial. Still, imagine for example combustion gas from a steam generator (stream 2 in Fig. 6-2). Suppose that the stream goes into the atmosphere. It is difficult to compute the entropy production by mixing the stream with the atmosphere. Nevertheless, some (basically exploitable) energy is irreversibly lost. The loss can be estimated by the following trick. In a thought-experiment (quite in the style of traditional thermodynamics), let the gas be led through a tube with outer temperature To; if the tube is of infinite length, the final temperature will be also To , that of the environment. We then can use formula (6.2.12) where our T2 (temperature of stream 2 in Fig. 6-2) is substituted for T~, and To for T2 . In place of Q', we now set mCp (T2-T o). Then, if Qs is the entropy production,
To Qs - mcp (T2- T o ) - mCp T o In
To
(6.2.13)
142
Material and Energy Balancing in the Process Industries
By the way, in the same style, let us compute the work (per unit time) exerted by an infinite series of 'infinitesimal reversible Camot cycles' transferring infinitesimal heats dQ - -mCp dT from T to TO, with Carnot efficiency (1 - To~T). We obtain
~2(1 - To
To
,
(6.2.14)
--T- ) mCp dT = T o Qs
This hypothetical work is lost, since the latter experiment (with Carnot cycles) has not been realized. It should be noted that Qs is not the actual entropy production (the latter would also include terms due to diffusion of the gas components etc.), and TOQs cannot be generally put equal to the lost 'exergy of the exit gas', thus to m (/)2-T0 ~2) by (6.1.6). The latter value will depend on the zero levels adopted for enthalpy and entropy in the whole set of production units; for instance in the combustion chamber, one will take zero levels rather for chemical elements such as C (carbon), thus the final CO2 will be assigned negative enthalpy value at its standard state. It is not always this easy to set up the whole 'exergy balance' of a plant, and the less to draw inference from it. Generally, we can compute the entropy production (or loss of exergy) in individual nodes, but the final judgement will depend on how the node is included in the technological system. See also Sections 6.3 and 6.4. Example 3. Heat exchanger
r/'l m
I.
y ! !
1
I ! !
T2 Ff
m
r,
T">T"
Q>O F
T~
2
Fig. 6-4. Heat exchanger
We consider a countercurrent heat exchanger. The hot stream, of mass flowrate m", is cooled from temperature T2" to Tl"; by the transferred heat Q the cold stream, of mass flowrate m', is heated from T~' to T2'. Hence m"cp" (T 2''- T';) = Q = m'c o' (T 2 - T'~ )
(6.2.15)
Chapter 6 - Entropy and Exergy Balances
143
with specific heat %. Consequently
a t!
T2 -
T2 -
t!
m"Cp
+ T~ (6.2.16)
O m' c'p
+ T~
and denoting A - T'~- T; (> 0)
(6.2.17)
we have 1
T ~ - T~ - Q m
tt
1 tt
Cp
m
~
Cp
+A
;
(6.2.18)
let us assume m' Cp' _>m"Cp", thus A is the smallest temperature difference between the streams. The entropy balance will be written for the whole exchanger, with the heat transfer surface inside. Thus, using again (D.4) with constant Cp, we have ~2_~1 = Cpln(T2 / T 1 ) and the balance reads
Qs = m'Cp' In
T2
T ',
- m"Cp In
T2
(6.2.19)
T ';
as corresponds to the orientation of the streams. With the above equalities, we have
Qs = m' cp' In 1 +
Q ) -m"c~ In
m'c' T;
O
1 +
m"Cp (T' l + A)
(6.2.20)
Given the specific heats and flowrates, Qs is expressed as function of Q, A, and
T'l. If Q = 0 then clearly Qs = 0. We have 3Qs
T ~ - T~
bQ
T 2 T~
(6.2.21)
as the reader readily verifies. Hence so long as T~ > T2 we have Qs > 0 whenever Q > 0. In the limit case with m'C'p = m"c'~ and A = 0 we have T' - T" in the whole exchanger, thus Qs = 0; hypothetically, we can still admit Q > 0 in
144
Material and Energy Balancing in the Process Industries
(6.2.15), which corresponds to a reversible heat transfer under vanishing temperature difference between both streams (thus with infinite area of the heat transfer surface). We further find, at constant Q and T'~ ~)Qs
~A
-
Q
(6.2.22)
T'; T 2
positive whenever Q > 0. Thus Qs is minimum if A - 0 thus T'l = T'; ; assuming m' Cp' > m"c~ we have still T i,2 > T2, and Qs > 0; the process is no more reversible but given TI' and Q, the minimum entropy production (or loss of exergy) will be again attained in the limit at the expense of an infinite surface for heat transfer. It is also easy to verify that increasing m'C'p in (6.2.20) makes Qs increase. Observe that with given A this means increasing the other temperature difference (6.2.18); the average driving force for heat transfer increases, and so does the entropy production. Finally the reader can verify that, at constant Q and A 3Qs
Q
1-
m
aT]
T'~ T~
T'; T2") r', T;
< 0
(6.2.23)
whenever Q > 0 and T" > T' in the exchanger. Using (6.2.15) in (6.2.10) we have
T~ Q
= . To . . In . 1 + T'2-T1' ) - . To . . . In T'1 T2-Tl T2-T l
1 + T'~-T'~ T'I+A
.
(6.2.24)
With given temperature differences and transferred heat Q, the loss of exergy increases with decreasing inlet temperature T'~ of the cold stream. The conclusion is, however, more difficult to interpret in terms of lost exploitable energy. Nevertheless, if the reader likes thought-experiments with Carnot cycles, he can imagine the following one. Let infinitesimal quantity of heat dQ be transferred from temperature T" to T'. If dQ were transferred from 7" to TO by a reversible Carnot cycle, the work thus gained would be
dW"-(1- T~ ) d Q . T' But we have transferred our dQ from T" to T' irreversibly. What remains is still the hypothetical gain of work
145
Chapter 6 - Entropy and Exergy Balances
To
dW'-(l
The difference 1
T"-T'
1
dW"- dW' = TO T'
d Q - TO
T"
dQ T'T"
is the lost work. Clearly, with the difference 7"'-T' fixed the lost work decreases with increasing T', in accord with our statement above. Observe that if the difference tends to zero then the lost work is inversely proportional to the square of the absolute temperature. See Remarks at the end of this section. In Fig. 6-4, let us imagine a narrow segment of the countercurrent heat exchanger, with temperatures T' and T" and transferred heat dQ. In the same manner as in (6.2.15) we find the 'infinitesimal balances' dQ - m"c'~ dT" = m'Cp' dT'
and by integration from cross-section 1 to cross-section 2 we obtain the integral of (dW" - dW')
To
'2 dT' ~ Cp T~
m' '
'
T'
T~ dT")
- m"c"
P
~
T~"
T"
- To Qs
where Qs is the entropy production (6.2.19). Thus the integral of the 'lost work' equals just the loss of exergy TOQs. If nothing else, the result is remarkable theoretically: thermodynamics works. Another question is, however, what kind of energy has been actually wasted in TOQs at low temperature levels (where TOQs is relatively greater). There can be no actual use of this 'low-potential heat' in a real plant. See Section 6.3, Subsection 6.3.1.
Example 4. Pressure reduction by throttling
PI y
v
2 Fig. 6-5. Pressure reduction
P1 ~ P2
146
Material and Energy Balancing in the Process Industries
The pressure of gaseous stream, of mass flowrate m, is reduced from P~ to P2. The enthalpy balance implies /~2 _ / ~
(6.2.25)
for specific enthalpies, and Qs = m( ~2-~' ) 9
(6.2.26)
Generally, knowing the (/~, S) dependence with parameter P (pressure), the difference in (6.2.26) can be found at given/-) as S(/4, P2) - S(/), P~ ). Note that d/~/- 0 implies, in the (T, P) coordinates dT+
dP- 0
,9T
,9P
hence with (C.21 and 22) f'-T~ dT = -
af, /gT
dP
(6.2.27)
Cp
at constant/4. Thus, by (D.4 and 5)
dS= Cp dT - c)l~"dP T
,9T
equals ^
dS = -
V
dP.
(6.2.28)
T Hence ~2 > ~1 as P2 < P~, thus Qs > 0 by (6.2.26) and given the initial state at cross-section 1, Qs increases with decreasing P2. The conclusion is in agreement with the intuition: some exploitable work (power) is lost by the throttling. An estimate can be found as follows. From the equation of state PV-
zgmT
(6.2.29)
with gas constant R m per unit mass and compressibility factor z, we obtain
C h a p t e r 6 - Entropy and Exergy Balances
147
dP as
(6.2.30)
-" - z e m ~
P Approximating z by a constant Z gives the loss of exergy
To Qs = mRm To z In
P1
(6.2.31)
P2 In particular for an ideal gas (z = 1) this equals the power exerted by isothermal expansion from P1 to P2, at temperature To; this amount is lost by the throttling. We also conclude from (6.2.28) that for a liquid, the loss of exergy will be usually negligible, as V is relatively small for a condensed phase. If the fluid is an ideal gas, let us expand it from P1 to P2 isothermally at its actual temperature T (> TO). With ~ = 1 in (6.2.31) the power exerted will be ^
W-
To Q s
at the expense of heat supply Q - W. If the heat were transferred reversibly from T to TOby a Carnot cycle, we should gain
W
~
1
TO
T - 1)ToQ s
hence in the total, we have lost W - W' = ToQ s
which is just the loss of exergy.
Example 5. Blending of streams with different temperatures
Fig. 6-6. Blending of streams
148
Material and Energy Balancing in the Process Industries
T w o streams of the same composition, stream j with mass flowrate mj and temperature Tj, are blended according to Fig. 6-6. The balances read m~ /~l + m2 /_~2 __ (m l+m 2 )/.)3
(6.2.32)
and m l
+
m2
+ Qs - ( m l + m 2 )
^
(6.2.33)
9
^
Taking H = 0 and S = 0 at temperature To we obtain, with constant specific heat Cp m 2 Cp ( T 2 - T o ) - (m,+m 2 ) Cp (T3-To )
m 1 Cp ( T l - T 0 ) +
thus m l T1 + m2 T2 T3 =
(6.2.34) m1+ m 2
and
7"1 m 1c o
In
7"o
+ m 2co
In
Vo
+ Qs - (ml+m2) Cp In
7"o
hence
To Q s = cp T o
m 1 In
7"3
(6.2.35)
+ m 2 In
T~
T2
with T 3 by (6.2.34). Clearly, if T1 - 7'2 then also T 3 = 7'1 - T2 and TOQs - 0. Denoting A-
T 2 - T,
(6.2.36)
Qs is function of T~ and A, given m~ and m2. The reader can verify the derivatives ~Qs ~A
- Cp
m 1m 2
A
ml+m 2 T 2 T 3
(6.2.37)
Chapter 6 - Entropy and Exergy Balances
151
(C. 12). If i-th stream is of mass flowrate mi, with mass fraction y~ of component Ck,then the mole flowrate nki o f C k equals i _
nk
1
i
-Mk Ykmi
(6.2.48)
and the mole fraction of Ck equals, in a K-component mixture i nk
x~= K
(k = 1, ..., K)
(6.2.49)
i ~E n~ l=l
Let us now return to our Fig. 6-6. Stream i is of mass flowrate mi, with composition determined by mole fractions x~, according to (6.2.48 and 49); recall that only K-1 mole (or mass) fractions are independent. For simplicity, let however (temperatures) (6.2.50)
T~- T 2 - T (say). The component balances read, first in mass units y~ ml + y2 m2 = y3 (m,+m2) .
(6.2.51)
Pressure P being fixed, the specific enthalpy /4ok of pure Ck will be written as Hok (T) at temperature T. Hence using the additivity (6.2.47), the enthalpy balance reads K Z k=l y ~ H o k ( T ) m
1
K + k~l Y2/Q~
K = k~l Y 3 / ~ ~
hence by (6.2.51) K
K
Z yk3/)Ok (7) -- k__E1y3/)Ok (T3)
k=l
where the LHS is specific enthalpy of the stream 3 mixture at temperature T, the RHS that of the same mixture at temperature T3 Because specific enthalpy of a given mixture increases with temperature, we must have also T3 = T hence the temperature remains unchanged.
(6.2.52)
Material and Energy Balancing in the Process Industries
132
In the entropy balance, we shall make use of the formula (6.2.45) with (6.2.48 and 4 9 ) H e n c e , in i-th stream m i S,,.~ -
~K
k=l
r/ki (S0k-Rlnx~)
(6.2.53)
m
where Sok means molar entropy of pure Ck at the given (T, P), the same for all streams. Here, rtki a n d x ki are k n o w n for i = 1 and 2. Because the n u m b e r s of moles remain conserved, we have the balances (6.2.51) in mole units
Xk
I + ~
n2 -
X3k(nl+n 2)
(6.2.54)
where K n i
l=l
nl
9
,,,-,.--,..-,.-,/
C o n s e q u e n t l y the entropy balance reads
Qs
=
K k~l n3 (S~
K
Rlnx3) -
k~l
K n~ (Sok- Rlnx~) - k=~l n[ (S0k- Rlnx~) -
K (n 3 - n k1_ n 2k ) S- o k + R K - n k31nX3k) = 22 Z (n l l n x 1 + n 21nX~k k k=l k=l w h e r e rt k3 (/'/~ + rtk 2) = 0. Here, we put formally (limit value) XklnX k -- 0 if Xk = 0, thus if c o m p o n e n t Ck is absent in some s t r e a m . Hence _
Qs=R
K Z k=l
1 In - -
nk
X3
+
2 In
nk
(6.2.56)
/
X3 /
where rt 1 n2 x3 - n~ + n 2 x~, + n l + n 2 X2k
(6.2.57)
with (6.2.55) for i = 1 and 2. In this manner, the entropy production is d e t e r m i n e d by the given parameters of the inlet streams 1 and 2. It is seen immediately that if the streams 1 and 2 are of the s a m e 1 c o m p o s i t i o n then Qs - 0, because thus ~ = x k = ~ . It can be shown quite formally that otherwise Qs > 0. 1
1
The idea of the proof is as follows. One sets Yk(t) = Xk + Pk t where Pk = ~ - Xk 9 One then examines the function Qs (t), where Yk(t) is substituted for ~ in (6.2.56) with i i (6.2.57) and nki = nXk. One can show that Qs (0) = 0 and (derivatives) Q~ (0) = 0, Qs (t) > 0 for any t. Hence Qs (1) > 0, with Qs (1) = Qs (6.2.56).
153
C h a p t e r 6 - Entropy and Exergy Balances
Let in particular streams 1 and 2 consist of pure species C~ and C2, respectively. Then /,/1
x] -
?/2
and
n 1+ n 2
x23 -
/,/1 +
(6.2.58)
n2
and 1
1
Qs = R (n 1 In _-S-_3+ n2 In ~ X1
)
X~
hence Qs = - R(n ~ln x~ + n 21n x3) = - R(n' + n 2) (x~ln x~ + x~ln x~).
(6.2.59)
The meaning of the entropy production can be illustrated by considering an inverse process, viz. separation of components; see the next example.
Example 7. Separation of components The following example is a higly idealized example of absorption with solvent regeneration. Gas mixture of components C~ and C2 is separated by absorption of C2 in a solvent where C1 is insoluble, and which can be .regenerated by desorption of C2 under reduced pressure and heat supply. The solvent itself is of negligible equilibrium vapour pressure (nonvolatile) at the desorption temperature. The gas mixture (C1, C2) is ideal. 1
c
~- Ct
- -
pressure reduction
I
Qm
p I I I
win
Fig. 6-7. Absorption unit with absorber A, desorber D, cooler C, pump P, and vacuum pump VP
MaterialandEnergyBalancingin the ProcessIndustries
154
Mixture (C~, C 2 ) is separated in absorber A. The fraction of C2 in outlet stream 1 is neglected. Liquid solvent containing absorbed C2 flows into desorber D, where heat Qin is supplied, and is then pumped through cooler C back into A. From C, heat Qout is withdrawn. The power supply to pump P and vacuum pump VP is Win. The outlet stream 2 from VP is pure C2. The energy balance reads
Qin + Win "- gtlflp (Zl-Z3) -t- n2f2p (Z2-Z3) + Qout
(6.2.60)
because the enthalpy of the ideal gas mixture is simple sum of enthalpies of the components; nj are mole flowrates, C~ are (constant) molar heats of streams (pure components) j = 1 and 2 (n3=nl+n2).The entropy balance (inequality) reads
0
Qout ~
QS
--
Oin -
Tout
-I" n 1
Rlnx31 + n 2 Rlnx~2 + n~Clp In
Tin
T1
T3
+ n 2 ~ In
T2
T3
as the reader can readily find using (6.1.2) and (6.2.53). Here, we have denoted by Qs the entropy production in the separation unit. Hence
Qout
-
Lut
Qin + n 1 1 T1 Co In + n2 ~ln Tin T3
7"2
=Qs, +Qs >Qs
(6.2.61)
T3
where Qs is the entropy production by blending components C1 and C2 according to (6.2.59). Thus if the mixture has been made up from the components by blending at temperature T3 , TOQs was the loss of exergy. The re-separation of the components according to our scheme requires some heat supply Qin at temperature Tin and heat Qout is withdrawn at temperature Tout , obeying in addition the balance (6.2.60), possibly with power supply Win. For simplicity, we take Tin and Tout as constant on the heat transfer Surfaces. Using (6.2.60) in (6.2.61) we have _
Lut
Qin + Win ----
Tin T1
-n'Clp(T,-T3-Toutln-~3 ) +n2C~p(T2- T~- ToutlnmT3
+ Tout(Qs+Qs) (6.2.62)
where Qs > 0. The equation is of another type than those examined above. We do not know the temperatures T~, T2 , Tin, To,t , nor the heat input/output. They will depend on the detailed design of the process. If they were known, we could
Chapter 6 - Entropy and Exergy Balances
155
again evaluate the loss of exergy TOQs. Our goal is, however, conversely to assess the minimum energy (exergy) requirements for the separation. Let us plausibly assume that Qs' > n lC~ In T1 + n 2 ~ In T2
(6.2.63)
because the RHS is sum of terms representing only change of entropy due to change of temperature from/'3 to T~ resp. T2 for stream 1 resp. 2; for example if T~ ~ T3 we shall have anyway some (irreversible) heat transfer in the absorption column. Recall in addition that the absorption itself is an irreversible process producing entropy. We then have the inequality
1
-
root) Tin
Qin + Win > n' C~p(T~-T3) + n 2 Cp2 (Tz-T3) + Tout Qs
9
(6.2.64)
Suppose the RHS is positive. Because decreasing Tout decreases the RHS and increases the coefficient at Qin, let us set Tout = TOas the lower limit; by the way, lower temperature of the solvent is favourable for the absorption. Then
1
-
.T~
Qin § Win ~ n l C o1 (T1-T3) + n 2 C~p(T2-T3) + TOa s
(6.2.65)
where the LHS can be regarded as consumption of exergy. Let T3 = T0, T~ > TO and T2 > T0. Then under plausible assumptions, the loss of exergy by mixing represents a lower bound for exergy consumed in re-separation. The conclusion appears obvious due to the intuitive idea of exergy: its loss has to be re-supplied. In our lengthy derivation, we have specified how it can be done. Denoting n = n l + n 2 and x = x 3 in (6.2.59) we have To Qs = - nRTo ((l-x) In (l-x) + xlnx)
(0 < x < 1)
(6.2.66)
where fix) = - ((l-x) In (l-x) + xlnx) tends to zero both for x ~ 0 and for x ~ and is maximum at x - 1/2. Thus To Qs < nRTo In 2 - 0.69 n R T o .
1,
(6.2.66a)
The relevance of the term can change when one of the components, say C 2 , is the only valuable product and the loss of exergy is related to its quantity (n 2 ). Let us consider a very diluted component C 2 in the mixture. Then
156
T oQs ll 2
Material and Energy Balancing in the Process Industries
nl = - RTo
n2
+1
(( 1-x) In ( 1-x) + xlnx)
where x is the mole fraction of C 2 in the input stream 3. With r/1 > > /72 we have 1-x ~ 1 and n~x ~ n 2, hence To Qs 1,/2
1
--- R T o In -X
(for x T1 Qs
where T~ < T2 .
(6.2.70)
This is a lower estimate for the energy (heat) consumption Qin, thus indirectly also for the reflux ratio required for the separation, because Qin involves evaporation heat of component C2, transformed in the column into that of C~. In addition to the importance of the term Qs (mixing entropy), we see that the greater is the ratio T~/T2 (< 1), the more difficult is the separation. Two components of nearly equal boiling points can only hardly be separated by distillation; a well-known fact.
Material and Energy Balancing in the Process Industries
158
Example 8. R e a c t o r Q
1
,..I
3 Fig. 6-9. Reactor
The components are Ck (k = 1, ..-, K). We consider one reaction (4.2.3), thus K
(6.2.71)
Z VkCk -- 0 k=l
With (positive) mass flowrates m i the component balances (4.2.1) read k = 1, . . . , K: y~m 3 - y~m 1 + y ~ m 2 + MkVk WR
(6.2.72)
where WR is the integral ('extensive') reaction rate. We have (6.2.73)
m3 = m 1 + m2
The enthalpy balance (6.1.1) reads /-jr3m3 =/-]rim
I +/2/am 2 + Q
(6.2.74)
With partial specific enthalpies/4~ of components C k in stream i we have K
/T = Z y~/4~ .
(6.2.75)
k=l
By virtue of (6.2.72), from (6.2.74 and 75) follows K Z ( y ~ m 1 (/Q3_/_~) + k=l -
K
y~m2 (/~3_/_)~)) + (?1MkVk/43) WR = Q" =
(6.2.76)
K
Here, H R = Z M k v k/4k k=l
(6.2.77)
is molar (isobaric) heat of reaction (reaction enthalpy), in (6.2.76) computed as HR3 at the stream 3 parameters. We shall consider only such cases where H R is of the same algebraic sign in the whole range of admissible parameters. Then the reaction is called
Chapter 6 - Entropy and Exergy Balances
159
m
a)
exothermic if
HR < 0
(6.2.78a)
b)
endothermic if H R > 0
(6.2.78b)
Ti is (absolute) temperature of stream i, pressure P is assumed constant. Given m~, m2, and the inlet streams' compositions, we can compute m 3 and the outlet composition, provided that either WR directly, or one of the outlet mass fractions y3, such that Vk * 0, is given. Given the inlet concentrations, temperatures (and states of aggregation), we know/4~ and/q2. Then having prescribed also T3 , we know/~3 thus Q. Or, given Q we know/~3, thus also T3 can be computed, as/~3 is increasing function of T3 . We admit also Q - 0. If Q , 0, we consider the heat transfer surface q4pat the outer side of the reactor walls, inside the heating/cooling medium. We introduce the mean temperature Tq of the medium, formally by the equation 1
T~
dq
O =wfT~
(6.2.79)
where the integral represents the surface integral in (D.11). According to (6.2.78), we assume in case a)
Q < 0 and if Q < 0 then Tq < T3
(6.2.80a)
in caseb)
Q>0andifQ>0thenTq>T
(6.2.80b)
3 .
Then the entropy production Qs equals, by (6.1.2) Qs = $3m3- Slml - S2m2-
O
T.
(6.2.81)
With partial specific entropies S~ of component C k in stream i we have g ^"
. 1
^. 1
S ~ - ~: YkSk k=l
(6.2.82)
and in the same manner as in (6.2.76),
K (Yk~m, (Sk-S "3 ",k ) + Yk2 m2 (Sk-Sk)) "3 "2 + (k~21 Tq Qs =k__Z1 = Mk Vk Sk "3 ) WR- Q
(6.2.83)
We shall use the thermodynamic relation
ft~ =/L- T&
(6.2.84)
160
Material and Energy Balancing in the Process Industries
where Ok -- ~tk/Mk is chemical potential per unit_mass of component Ck; for an ideal mixture we have (6.2.43 and 44), with Sk = Mk Sk" Thus multiplying (6.2.76) by 1/T 3 and adding to (6.2.83) we obtain
Qs
K =k~l (yl ml A~ + y2 m2 A~ ) +
1A3
WR +
(1
-
1 )
Tq
Q
(6.2.85)
where j - 1, 2: A~
1 ~3_ S ~ - ~ 3 (/~3_/~)
(6.2.86)
and K K A 3 = - Z M kv kl23 = - Z v k~t3; k=l k=l
(6.2,87)
here, ~t~ = M k 0.3 is chemical potential of component Ck at the stream 3 parameters. Generally, the quantity K K A - - Z v k ~tk - - Z Mk Vk ftk k=l k=l
(6.2.88)
is called affinity of the reaction (6.2.71), at given T, P, and composition of the mixture. It is a function of local variables and makes sense at any point of the reactor region. According to the laws of classical chemical thermodynamics, the reaction equilibrium is determined by the condition A = 0. Thus if A ~ 0, the absolute value is a 'distance from equilibrium'. According to the principles of nonequilibrium thermodynamics, the reaction proceeds in the direction assumed by (6.2.71) (v k > 0 for reaction products by convention) if A > 0, in the opposite direction if A < 0. Here, we suppose of course that the overall direction of the reaction in node R is as prescribed by the reaction scheme, thus the integral reaction rate WR > 0. With a complicated temperature and composition profile in R, it could happen that we had not A > 0 everywhere in the reactor; we shall not consider such possibility and in particular we shall suppose A > 0 at the outlet conditions. In (6.2.87), A is computed at (cross-section averaged) outlet conditions, hence also A3 > 0 .
(6.2.89)
Certain reactions (such as combustion reactions) have the property that their affinity is positive (A > 0) up to a state where the concentration of some
Chapter 6 - Entropy and Exergy Balances
161
component practically vanishes (imagine 2 H 2 + 02 = 2 H 2 0 in excess of oxygen), thus becomes negligibly small; not very precisely, they are called 'irreversible' (although any reaction, so long as it proceeds, represents an irreversible, i.e. nonequilibrium process). If the reaction is sufficiently fast even near the equilibrium (imagine again combustion), it can happen that the outlet value A 3 thus also A 3 WR becomes negligibly small in (6.2.85). On the other hand, it can happen that (for instance at low temperatures) the rate of some reaction is practically zero even if A > 0 ('frozen reactions'). In the latter case, we suppose that the reaction is catalyzed; but even then, the condition (6.2.89) is necessary. For reactions that are not 'irreversible' in the above sense, the condition (6.2.89) restricts the attainable integral reaction rate W~; see below. In the sequel, let us further simplify the hypotheses. Let us assume that all the streams are ideal mixtures without change in state of aggregation. Then (cf. Example 6) 1
j - 1, 2: S~ - Sk (Tj)-
Rlnx~
^ where Sk (Tj) is specific entropy of species Ck at temperature Tj, and x], is mole fraction of Ck in stream j; in stream 3 we have Cpk d T Rlnx 3 T Mk
S~ = Sk ( r j ) +
where in addition Cpk is specific heat of Ck. For enthalpies we have simply j=l,
2 " / ~ = / q k ( T j)
and r3 /-tk3 = & (Tj) + ~ CpkdT
T,
where/4k (Tj) is specific enthalpy of Ck at Tj. Hence in (6.2.85 and 86) R
A~-- 5~- --~-g (lnx 3- lnx~) where
Tl•(1 9
T
1
T3
CpkdT = J
r~
1
T3
/
1
T
CpkdT >- 0
(6.2.90)
162
Material and Energy Balancing in the Process Industries
because in the integrals, T3- T > 0 i f T j designate
< T3, T - T3 > 0 i f T j >
K A - Z (y~ m 1 Ak1 + y2 m2 A2 ) k=l
T3. Let us
(6.2.91)
Then K
A - E (y~ m, 8~ + y2 m2 5~) + S x k=l
(6.2.92)
where K
Sx - R E
k=l
(n l l n x ~ + n k21nX~k - (n~ + n 2 ) lnx3) 9
(6.2.93)
here (cf. Example 6) n~ -
y~ mj
(6.2.94)
is mole flowrate of component Ck in stream j. Recall that nJk x~ -
nJ
K where n j = Z n~ k=l
(6.2.95)
and the convention x~ lnx~ = 0 if x~ = 0, as the limit value. Because x~ lnx~ (< 0) is minimum at lnx~ = - 1 where it equals -exp(-1), ~ 2k )lnx~ we have (0 >) n kl lnxl + n 2k lnx~k > _ _exp(_l)(nl+n2). On the other hand -(nk+n (> 0) increases to infinity when the outlet stream mole fraction x 3 tends to zero; thus if some ~ is sufficiently small, the whole Sx becomes positive. So as to simplify the following discussion, let us assume that some component, say CK present in one of the inlet streams, is consumed by the reaction to the extent that we have S x > 0. This means, by (6.2.72) where vK < 0, a sufficiently high integral reaction rate WR . We thus assume WR such that Sx > 0 .
(6.2.96)
By (6.2.85) with (6.2.91)
Qs-A+
1 A3WR +
1 (6.2.97)
Chapter 6 - Entropy and Exergy Balances
163
where A > Sx according to (6.2.90 and 92). We have also the inequality (6.2.89) with WR > 0, and from the assumptions (6.2.80) follows 1
1
Q > O.
T.
(6.2.98)
Thus Qs > A _> Sx
(6.2.99)
and Qs > 0 with positive lower bound (6.2.96), if the integral reaction rate is sufficiently great. Recall also the balances (6.2.76). By hypothesis,/4~ -/4k (Ti) is specific enthalpy of species Ck at temperature Ti. Hence the balance reads T~
T3 2I Cp2 d T = Q - H 3 R W R r~
m 1 ; Cp' d T + m
L
(6.2.100)
where c~ is specific heat of stream j. Let us return to the condition (6.2.89). Because, by (6.2.42) and (6.2.84), ~9(pk / T)
1 =-
1
-
r
thus ~9(pk / T) ~gT
1 =-
-
T2
Hk --
1 T2
^
Mk H k
(6.2.101)
we have, by (6.2.88) with (6.2.77) ~(A/T)
~T
1
-
T:
-
HR 9
(6.2.102)
m
Hence if H R < 0 (exothermic reaction), A / T decreases with increasing temperature and can become zero, thus also A = 0 if sufficient heat is not withdrawn from the reactor. On the other hand, there is always an upper limit f o r WR imposed by the condition A 3 > O, on assuming that the stream 3 parameters tend to the equilibrium ones with increasing W R. Increasing the outlet temperature T3 thus decreases this upper limit if H R < 0. A case in point is conversion of sulphur
164
Material and Energy Balancing in the Process Industries
dioxide to sulphur trioxide (see Sections 4.6 and 5.3). If H R > 0 (endothermic reaction) then A/T decreases with decreasing temperature and can become zero if sufficient heat is not supplied. By the same consideration as above, we conclude that decreasing the temperature T3 decreases the upper limit for W~. A classroom example is reaction of nitrogen with oxygen, which does not take place at all under atmospheric conditions; small concentrations of nitrogen oxides can be found in combustion gases, generally the higher the higher is the combustion temperature. Less elementary examples are hydrocarbon cracking processes. There, however, we have a complicated reaction scheme with more than one reaction (6.2.71). The dependence of the entropy production Qs on the process parameters is complicated, even if the inlet mass flowrates and compositions have been fixed. The outlet temperature T3 depends on T~, T2, Q, WR, and the outlet composition depends on WR. But WR is limited by the condition A3 > 0 where A3 depends on T3 as well as on the stream 3 composition. On the other hand, WR is also limitedby the reaction kinetics; taking T3 too low, the reaction rate could become negligibly small (a 'frozen reaction') even in the presence of a catalyzer. Relatively simple is the case of 'fast irreversible reactions', such as combustion reactions. Then, in a broad range of parameters, the integral reaction rate WR attains its maximum (complete combustion) and the outlet composition is fixed by this condition (see also (6.2.116) below). Thus Qs depends on T~, T2 , and Q, given Tq obeying the conditions (6.2.80). At constant T1 and T2 , (6.2.74) implies m 3 Cp3
(6.2.103)
Cp3is specific heat of stream 3, thus by (6.2.81)
where ~)Qs
0Q
1
dQ
1 --
dT3
3 Cp
m
3
1 -
T3
dQ
1 --
Tq
1 -
T3
(6.2.104)
Tq
By virtue of (6.2.80a), for an exothermic reaction the entropy production increases with decreasing Q (< 0), thus with increasing withdrawn heat I Q I . Recall, however, that T3 depends on Q thus given Tq, I QI is limited by the condition T3 > Tq. Given T1 and T2 , Qs is thus smallest when Q = 0, thus when T~ is maximum. Further, varying for example T~ and leaving T2 and Q fixed, according to (6.2.74) we have 3 m3Cp d T 1
1
-- mlc
p
(6.2.105)
Chapter 6 - Entropy and Exergy Balances
165
thus by (6.2.81) ~Qs
1
3 Cp
--
~T1
dT 3
1
m 3
T3
-
dT1
m 1
TI
1 1 Cp = m l C p
1
1
(612.106) - T1 )
and in the same manner 2 -- m 2 Cp
1
1
(6.2.107)
The reader can_himself make the analysis. Observe that if Q - 0 then, by (6.2.100), with HR < 0 (exothermic reaction) at least for one of the Tj (j - 1 or 2) we must have T3 > Tj thus OQs/~Tj < 0. The assumption T3 > Tj (for j - both 1 and 2) is natural for a combustion reaction. Then Qs is the smaller the greater are the inlet temperatures Tj thus, considering (6.2.105), the higher are the temperatures in the reactor; see also the above result for the (Q, Qs ) dependence. A pragmatical interpretation in terms of a 'lost work' is, however, not immediately obvious. In a general case, let us retum to the expression (6.2.97) with (6.2.92 and 93). Whatever be the integral reaction rate WR, we can minimize the terms 8~ in (6.2.92) and the last term in (6.2.97) by setting T~ - T2 - T3 = Tq; indeed, the latter term is minimum (zero) by (6.2.98), and t_he 8Jk are minimum (zero) by (6.2.90). The case is basically possible when Q - H R WR in (6_2.100), thus when withdrawing/supplying sufficient amount of heat I QI = I HR I WR, and with infinite heat transfer surface admitting T3 = Tq as the limit in (6.2.80). We thus have A3 Qs > Sx +
w R with equality for T1 - T2 = T3 = Tq .
(6.2.108)
This minimum is thus approached with a uniform temperature profile in the reactor. Given temperature T3 required for instance by the reaction kinetics, we can pre-heat the inlet streams 1 and 2, as far as possible by heat exchange with outlet stream 3, and by an adequate (+) heat supply maintain the uniform profile; the temperature of the heating/cooling medium is as close as possible to the temperature in the reactor. The scheme is ideal and for instance in case of combustion reactions, not realistic. It represents just a theoretical limit. Let us give another expression to the RHS term in (6.2.108). According to (6.2.87) with (6.2.43), using the definition (6.2.93) and the balances (6.2.72) we have
166
Material and Energy Balancing in the Process Industries
A3
Sx+
K WR = R Z (n I lnx~ + n~ lnX~k- (n I + n2) ln~k) k=l 1
K
Z v k (p3 k + R T 3 lnx~k)W R T 3 k=l K =RE
k=l
1
K ( n ~ l n x ~ + n k2 1 n x ~ k ) + R Z
k=l
K
T 3 k=l
3 (v k W R - n k)lnx~k
K
Vk~3k
W R -
R
where p3 k is chemical potential of pure species Ck at temperature T 3 and at the stream 3 state of aggregation. Hence A3 Sx +
1 WR -- Sn~x-
G 3 WR
(6.2.109)
where K S~x = R Z (n~ lnx~ + k=l
n k2 lnX~k - n k3 lnX~k)
and
(6.2.110)
c. - zK The ' m i x i n g term' Sn~x is bounded in its absolute value, considering again that I//ki lnXk I -- /'li I Xki lnXk I (-- F/i exp (-1)" , see the paragraph after formula (6.2.95). It is the last term in (6.2.109) that can become critical. The function -
K
G R (T) =k__E1v k Pok (T)
(6.2.111)
is reaction f r e e enthalpy (Gibbs free energy), at temperature T (in molar units). Because (affinity) K K A(7) = - Z v k Pk = - GR (T) - R T Z v k lnx k k=l k=l
Chapter 6 - Entropy and Exergy Balances
167
the equilibrium condition A(T) = 0 determines
K
-1
Z v k lnx k -
RT
k=l
-
G R (T) .
(6.2.112)
I f - G R (T)/RT >> 1 (as is the case of combustion reactions) then at least for one of the components Ck with Vk < 0 (consumed by the reaction), say Cry, we have (say) aK -- VK lnXK >> 1, hence afortiori XK -- exp(aK/VK ) > R
(6.2.1.13)
up to high temperatures T3 occurring in practice, where the reaction is fast and equilibrium is attained. This term then determines, by (6.2.109), the lower bound of entropy production. It can be computed by integration, for simplicity assuming that the state of aggregation of the species C k does not change down to temperature T0. Then, using the relation (6.2.101) for g0k we have --3R G
--0R G
T3
+
_-
1
ofi
-
HR (T) dT
(6.2.114)
where -
K
H.=kZ 1
-
m
Here, H0k (T) is molar enthalpy of pure species C k at temperature T, for ideal mixtures equal to the partial molar enthalpy of Ck; thus H R is the reaction heat. The latter can be found by integration of the relation
gHR aT
K -
k=l
MkVkCpk
(6.2.115)
168
Material and Energy Balancing in the Process Industries m
m
where Cpk is (isobaric) specific heat of C k . The constant G ~ - G R (To ), at reference temperature To , usually denoted_as AG o, can be found in thermodynamical tables, as well as the value of H R (To ), usually denoted as AH ~ (standard reaction heat). Assuming x 3 To Sn~x - Z- G 3RWR
"13
(6.2.117)
Hence, at least for fast irreversible reactions, by (6.2.113) the loss of exergy is enormous whatever be the arrangement of the process. Classical thermodynamics knows still another hypothetical device in addition to the reversibly-working Carnot cycles, viz. the reversible galvanic (electrochemical) cell. In this device, with constant volume the electric work (say) We equals the affinity of the reaction, per unit integral reaction rate. Thus considering the cell working at temperature To with pure species Ck, we have B
(6.2.118)
We - -G ~ WR n
assuming of course G ~ < 0 in order to have We > 0 with WR > 0. Putting W' - -We in (6.1.4), with TO= Th we easily find that the loss of exergy TOQs = 0. We shall not attempt to precise the conditions for attaining this upper limit of exploitable energy. In practice, the efficiency of (for instance) fuel cells has been quite low so far.
Remarks The examples encompass all relevant sources of irreversibility (entropy production). Examples 1,2,3, as well as 5 demonstrate the entropy production by heat flow under gradients of temperature. The temperature gradients, not occurring explicitly in the equations, are concentrated near the separating surfaces
Chapter
6 -
Entropy and Exergy Balances
169
(walls) in Examples 1, 2, and 3, and in the region where the two streams meet in Example 5. In the bulk of the fluids, the heat transport is mainly due to turbulence; in our simplified models, we regard the fluids as uniform at the inlet and outlet cross sections. It has turned out that generally, the same heat flow under the same gradients produces the more entropy the lower is the temperature. This fact can be explained theoretically when considering the explicit expression (D.8) for the local entropy production (whose our Qs is the integral over the whole volume considered). Indeed, the local entropy production by heat conduction is inversely proportional to the square of the absolute temperature. Multiplying Qs by temperature To of the environment (infinite reservoir), we obtain the loss of exergy, thus a kind of lost work, according to the traditional ideas of classical thermodynamics (whose modem thermodynamics is a far-reaching generalisation). See the last three paragraphs of Example 3. The classical result is in agreement with modem theory; only the idea of 'lost work' is not always that clear from the viewpoint of practice. Entropy production by viscous friction is illustrated by Example 4; in a perfect fluid (with zero viscosity), no pressure would be lost and no entropy produced. Imagine an ideal gas in (6.2.31). The factor To is due to the hypothetical possibility of expanding the gas isothermally at given temperature T (giving TQs instead of To Qs ) and then recover the supplied heat Q by a reversible Carnot cycle, with Carnot efficiency (1 - To /T). Observe that the quantity TQ s represents the (integral) 'dissipation of energy', as introduced in nonequilibrium thermodynamics; see (D.7). One could also expand the gas adiabatically, but exerting work at the expense of its internal energy. What amount of work is actually lost, depends clearly on circumstances. Entropy production by diffusion under concentration gradients is illustrated by Example 6. The concentration gradients occur mainly in the region where the two streams meet. The meaning of the entropy production and loss of exergy is illustrated indirectly in Example 7 in terms of energy needed for re-separation. Certain conclusions of qualitative or approximative character (first estimates) can be made. Generally however, the quantitative information drawn from the entropy production term is rather limited. Finally, Example 8 is more complex in that it comprises entropy production due to chemical reaction in combination with heat transfer, and also diffusion; the role of the latter appears as marginal. The example can also be regarded as an example of complex single-node balancing, a kind of thermodynamic analysis included. Concerning the entropy production (or loss of exergy), it turns out that the 'chemical' portion, thus the t e r m - ( G ~ / T 3 ) WR in (6.2.109) can represent an enormous item in the exergy balance; it can be computed, but this is usually all that we can do in practice. In other terms, what kind of work has been actually lost, is a matter of theoretical speculations only.
170 6.3
Material and Energy Balancing in the Process Industries
EXAMPLES OF EXERGETIC ANALYSIS
The following three examples are simple case studies, where the loss of exergy is evaluated for each member of a set of units. The values may indicate how energy is exploited in each unit. If the loss of exergy is relatively great this fact is, by the underlying philosophy, regarded as an incentive to a rationalisation of the process.
6.3.1
Heat exchanger network
1(100)
n(8o)~"
III(80,
I
176
IS0 157
)4
30__~0~
VI(10)
260 ~~~._ 280130%
7(30)
~~70~
Fig. 6-10. Heatexchangernetwork.Numbersat streamsare temperatures(deg C). Numbersin parenthesesare heatcapacities(kW/K) The heat exchanger network according to Fig. 6-10 serves for preheating stream I by five streams (II-VI) in exchangers El-E6. Streams II, III, and VI are further cooled in coolers C1,2,3. Stream I is split in given ratio and both streams are again blended in node B. The temperatures of stream I not given in the Figure can be computed from the heat balances, on assuming constant heat capacities (mCpin Example 3 of Section 6.2). The results of the (energy and) exergy balances are summarized in Tab. 6.1.
Chapter 6 - Entropy and Exergy Balances
171
Tab. 6-1. Exergetic analysis of heat exchanger network (TO= 298 K) Node
E1 E2 E3 E4 E5 E6 C1 C2 C3 B
E(total)
Qs
ToQs
kW/K
kW
2.336 1.888 0.894 0.620 0.422 0.418 1.663 2.589 0.716 0.020
696 563 266 185 126 125 496 771 213 6
11.566
3 447
T0as
Q
ToQs l Q
kW
1
20.2 16.3 7.7 5.4 3.7 3.6 14.4 22.3 6.2 0.2
4 000 4 000 2 500 2 100 600 800 3 200 3 200 600 0
0.174 0.141 0.106 0.088 0.210 0.156 0.155 0.241 0.355 -
100.0
21 000
0.164
EToQs %
We shall not analyze the results in detail. Let us only stress one important statement. As the detailed analysis shows, the loss of exergy is greater at lower temperatures, given the transferred heat and temperature gradients in the exchanger. This is in accord with the previous general analysis in Section 6.2, Example 3 and Remarks, first paragraph. So generally, exergetic analysis of heat exchangers makes the irreversibility effects at lower temperatures more critical. Now there exists another, nowadays standard method, so-called pinch technology (Linnhoff and coll. 1982) based on 'pinch analysis' (PA). The method makes use of a simpler classical formulation of the 2 nd Law: heat cannot flow from lower to higher temperatures. Comparing the results of both methods, we find an agreement in some cases. But for instance exchanger E6 is inadequately placed according to the PA method, while the exergetic analysis arrives at no such conclusion: the exchanger works at a high temperature level and the loss of exergy is relatively small. On the contrary, cooler C2 works at a low temperature level with a great loss of exergy; the PA method, however, does not qualify the cooler as inadequately placed. Indeed, the cooler withdraws a low-potential heat, which is difficult to use in the given plant. The pinch technology, having proved useful in practice, appears as preferable. It distributes the transferred heats in an optimum way according to the actual situation and needs of the plant. On the contrary, the exergy method regards any heat as exploitable, if not otherwise then in a Carnot cycle. Clearly, such possibility can be quite hypothetical.
172
6.3.2
Material and Energy Balancing in the Process Industries
Distillation unit
Q)---_:-?~---,
............ I
303 K
[ / !' ' lJ
293 K
I ,
D y
F
0.6 MPa
] I Q
It/i-@-'-]
1
,
,,,
,
L .....
'I.3MPa
,
i
',
L
1 1
[ Fig. 6-11. Distillation unit. 1 whole unit, 2 column, 3 boiler, 4 condender, 5 throttling of steam, F feed, B bottom product, D distillate
The distillation unit, with standard arrangement, serves for separation of C 3 - C 7 hydrocarbons. The reflux ratio equals 1.3. The t h e r m o d y n a m i c analysis is
rather tedious; we shall give only the results, summarized in Tab.6.2. Tab. 6-2. Exergetic analysis of distillation unit (TO= 298 K) region entropy production (kW/K)
1
1.299
loss of exergy (kW)
387
%
100
2
3
4
5
0.510
0.040
0.604
O.144
-152
39.3
12
3.1
180
46.5
43
11.1
Chapter 6 - Entropy and Exergy Balances
173
The unit has been divided into four subregions, according to Fig. 6-11. Smallest is the loss of exergy in the boiler, due to the small temperature difference between boiling liquid and condensing steam. Remarkable is the relatively great loss of exergy due to throttling the steam in control valve 5. Greatest are the losses in the column proper, and in the condenser. The great loss in the column is not surprising. For a possibility of making the loss lower, it would be however necessary to analyze in more detail the function of the plates; this would require more detailed data on the process, which are, as is usual, not available. Somewhat surprising is the great loss in the condenser. It signals an imperfection of its functioning. For instance the heat transfer surface is small (thus the temperature difference great), or some inert gases are present. Observe, however, that a lower temperature difference in the condenser, thus lower condensation temperatures would mean lower pressure in the column, thus also lower temperature in the boiler, thus greater loss of exergy by throttling the supplied steam. Concerning the control valve, a pressure drop is necessary, but the existing one appears as too high. In practice, however, the pressure drop is determined by the pressure of the steam available. One could perhaps consider utilizing the given steam in an ejector: also available is steam at pressure level 0.35 MPa, thus the resulting steam from the ejector could have a sufficient pressure of 0.8 MPa. Briefly, the exergetic analysis offers certain possibilities of improvement. A more detailed analysis is, however, necessary taking into account the realistic possibilities of the plant.
6.3.3
Heating furnace
fuel ~1
"1
air vl 298 K
theoretical combustion temperature (2200 K)
298 K
3
-lmedium heated
633 K
w-
combustion gases
493 K
Fig. 6-12. Heating furnace. 1 burner, 2 combustion chamber, 3 heat exchanger, 4 fictitious cooler
The furnace serves for heating crude oil from temperature 220 deg C to 360 deg C. The fuel is methane, with excess of air 10 %. The unit has been formally divided into burner, where only mixing of inlet streams takes place, combustion chamber, heat exchanger, and a fictitious node that represents cooling
174
Material and Energy Balancing in the Process Industries
the combustion gases to the ambient temperature. For the latter, see Example 2 of Section 6.2, formula (6.2.13). For the remaining nodes, see in particular Example 8 of the previous section. Thermodynamic data for the analysis are available in standard tables. Entropy production and loss of exergy are computed per 1 mole of the fuel. The results are summarized in Tab. 6-3. Tab. 6-3. Exergetic analysis of heating furnace (TO= 298.2 K) Node
1
2
3
4
Total
Os (J mol-lK -1)
28.2
808.0
688.8
95.6
1 620.6
28 506
483 209
5.9
100
ToQs (J mol 1 ) %
8417 1.7
240 906 205 380 49.9
42.5
Greatest are, as can have been expected, the losses in nodes 2 and 3. In the combustion chamber, the loss is due to the irreversible chemical reaction. In the heat exchanger, it is the heat transfer under high temperature gradient. Alas, the possibilities of rationalisation are quite limited. Using the 'latent chemical energy' in a fuel cell is, at the present state of the technology, quite unrealistic. At most, one could lower the excess of air for the combustion; the computation shows that some 2 % of the overall loss could be saved. In the exchanger, one could lower the temperature gradient if some high-temperature cooling medium were available, such as liquid metals. This possibility is rather hypothetical as well. Moreover, another problem would arise: how to use further the hot medium. In the end, the furnace serves for preheating crude oil rather than the heat exchanger for cooling the combustion gas. Only the last item (see node 4) suggests indirectly some possibility: one can make lower the outlet temperature of the combustion gases if they are used for preheating the inlet air for combustion. The computation shows that for instance lowering the outlet temperature to 160 deg C would decrease the fuel consumption by 6.8 %. But such idea can arise without any exergetic analysis. The result only supports the general statement made in Example 8 of the previous section. The loss of exergy by irreversible chemical reactions, such as combustion reactions, is enormous. The theoretical possibility of exploiting better the chemical energy of fuel in electrochemical cells is, of course, known for years; only technologically, the problem has not been solved so far.
Chapter 6 6.4
-
Entropy and Exergy Balances
175
CONCLUDING REMARKS
Quite formally, an exergy (or entropy) balance can be set up if thermodynamic and process data are available. It contains always one unknown, viz. the loss of exergy (or entropy production), and cannot be solved if some of the other data are lacking. Even this fact can give rise to problems in practice. From the process data, for instance the temperatures at heat transfer surfaces are frequently unknown and can only be estimated; other data are known only indirectly, as a result of mass-, chemical components-, and energy balancing. Frequently lacking are such thermodynamic data as partial specific (or molar) entropies (or chemical potentials) for components of nonideal mixtures. If we have stated in Chapter 5 that an energy balance is never exact in practice, this holds true the more for the entropy. Suppose we have overcome these difficulties; most probably we shall succed at least in exergy balancing of (thermodynamically) simple systems such as heat exchanger networks. Then what inference can be drawn from the result. Supporters of the exergy -based methods have introduced a number of 'exergetic efficiencies', and published computer programs for their evaluation and use in optimisation algorithms. Less known are, however, examples of such use in industrial practice. For heat exchanger networks, the method can even appear as inadequate; see the above example 6.3.1. [Quite frequently occur the exergetic concepts in considerations of global (regional, nation-, or even worldwide) character, when looking for an optimal strategy of production and use of energy; such considerations lie beyond the scope of this book.] In spite of the somewhat hesitating conclusions, our aim was not perhaps to deny the possibility of exergy-based analysis at all. For instance in the case of separation processes, some information can be drawn even from a simple model, as shown above. Another problem is, how the information is further used. One should always bear in mind that the underlying ideas are rather simplistic, going back to the traditional, past-century's concepts of Camot cycles, semipermeable membranes (in case of diffusion processes), reversible cells, and the like. Their role in the development of thermodynamics is incontestable. But in their rudimentary form, they hardly can stand as a base of contemporary engineer's reasoning, however sophisticated be the methods of computation. Thermodynamic analysis goes back to the priciples. Its results (as well as those of any other formal analysis) can prove useful as a part of the whole set of informations the engineer needs for making decision at a creative level. The decision requires critical consideration of the whole set. Alas, there is no computer program for making the decision.
176 6.5
Material and Energy Balancing in the Process Industries
RECOMMENDED LITERATURE
A survey of exergy-based methods and the underlying theory can be found in a monograph by Fratscher et al. (1986). On the same philosophy is based an earlier work by Fratscher and coll. (1980) dealing in particular with separation processes. More generally, thermodynamic theory applied to energy conservation and economy is expounded in Kenney (1984), the pinch technology (ICI-Leeds Approach) included in Chapter 10. For the latter, see also Linnhoff and coll. (1982). Fratscher, W., V.M. Brodjanskij, and K. Michalek (1986), Exergie, Theorie und Anwendung, VEB Deutscher Verlag fur Grundstoffindustrie, Leipzig Fratscher, W., and coll. (1980), Energetische Analyse von Stoffiibertragungsprozessen, VEB Deutscher Verlag ftir Grundstoffindustrie, Leipzig Kenney, W.F. (1984), Energy Conservation in the Process Industries, Academic Press, New York Linnhoff and coll. (1982), User Guide on Process Integration for the Efficient Use of Energy, The Institution of Chemical Engineers, Pergamon Press, Oxford
177
Chapter 7 SOLVABILITY
AND
CLASSIFICATION
OF VARIABLES
I
LINEAR SYSTEMS
In Chapter 3, we have met with a special type of linear balance equation (3.1.6), thus Cm = 0, with vector variable m and constant matrix C (reduced incidence matrix of graph G). Another example of a set of linear equations is (4.5.9a and b), provided the splitting ratios aj obeying (4.5.9c) have been a priori fixed as certain constants (or if no splitters are present). In this chapter, we shall deal with a general set of linear equations, making use of linear algebra only and without introducing any special structure. For mass balance equations, an alternative to the graph methods of Chapter 3 is thus presented. The reader is recommended to peruse Sections B.1-B.8 of Appendix B when necessary so as to brush up his knowledge of linear algebra, and also for the notation and terminology.
7.1
GENERAL~ANALYSIS
A set of linear equations in variables (say, zn ) c a n be written in condensed form as Cz + c = 0 .
(7.1.1)
Here, z is column vector of components zn in number N, ordered by convention as z~, ..-, ZN. Having assigned an order also to the (scalar) equations, if their number is M then C is a given M x N matrix, and c is a given M-vector. If c = 0 then the equation (7.1.1) is called homogeneous. The necessary and sufficient condition of solvability (existence of some solution) is clearly c 9 ImC
(7.1.2)
where ImC is the image of matrix C; in particular a homogeneous linear equation is always solvable (by z = 0). According to (7.1.2), the vector c is a linear combination of the column vectors of matrix C, hence the rank of the extended matrix (C, c)equals (say) M' = rank(C, c) = rankC (5 M).
(7.1.3)
1'/8
Material and Energy Balancing in the Process Industries
We regard Eq.(7.1.1) as a set of constraints the variable z has to obey, thus as (a part of) the model of some physical (technological) process. So if the condition (7.1.2) is not obeyed then the model is simply wrong, having no solution. Let thus the condition be satisfied. If we have M' < M then certain (M-M') rows of matrix (C, c), thus certain scalar equations are linear combinations of the remaining M' ones, and can be deleted. This done, the matrix of the new system is of full row rank. In what follows, let us suppose that linearly dependent equations have been deleted a priori, hence assume rank(C, c) = rankC = M .
(7.1.4)
The matrix C being of type [M, N], by (7.1.4) we have M < N. If M = N then the M x M matrix is regular (invertible) and the solution z = -C-~c is unique. The analysis is then complete. More interesting is the case when M < N.
(7.1.5)
Then the set of solutions z is infinite. Indeed, if z 0 is some solution then the general solution equals z = zo + v
where
v ~ KerC
(7.1..6)
is arbitrary in the null space of matrix C; of course when c = 0 (homogeneous equation), we can take z 0 = 0. The dimension of the null space equals dimKerC = N - M .
(7.1.7)
Let M be the set of solutions, thus z~
Mmeans
Cz+c=0;
(7.1.8)
it is thus the set of vectors (7.1.6). In mathematics, such set is called 'linear affine manifold'; the number N-M is called the dimension of M. See Fig. B-2 in Section B.5 as an example. Another example is the equation z~ + z2 + z3 - 1 = 0, where Mis thus a plane in 3-dimensional space; if we add the equation z~ - z2 = 0 then M is a straight line. Alas, geometric imagination fails when considering less trivial examples. We shall now generalize the analysis presented in Sections 3.2 and 3.3. We suppose again that the values of certain variables Zn have been fixed as (say) + Zn ; they can have been measured or be otherwise known, or also prescribed as some target values. See the first paragraph of Section 3.2; we only replace mj by Zn. Formally, making again abstraction from how the values Z+n have been
Chapter 7 - Solvability and Classification of Variables I- Linear Systems
179
d e t e r m i n e d , w e d e c o m p o s e the set o f variables in the m a n n e r that ( h a v i n g r e - o r d e r e d the indices) v e c t o r z is p a r t i t i o n e d y )
} J
unknown
x
} I
fixed
z=
(J+I=N)
(7.1.9)
w h e r e x i s / - v e c t o r o f the fixed c o m p o n e n t s , y that o f the r e m a i n i n g J (= N-/) ones. T h e partition (7.1.9) c o r r e s p o n d s to the partition o f m a t r i x C
}
C=(B,A) J
M.
(7.1.10)
I
H a v i n g fixed x = x + Eq.(7.1.1) reads
By + Ax § + c = 0.
(7.1.11)
W e thus h a v e a g a i n the e q u a t i o n (7.1.1) w h e r e n o w y stands for z, B for C, and Ax++ c for c. T h e solVability c o n d i t i o n n e e d not, h o w e v e r , be satisfied with an arbitrary x § We have rankBT = rankB = L (say)
(7.1.12)
hence, the transpose B T being of type [J, M], dimKerB T = M - L'.
(7.1.13)
The null space KerB T is a vector subspace of the whole space R Mof M-vectors. Let us have M-L linearly independent vectors (transposed row vectors) txTh e KerB T (h = 1, ..., M-L), thus a basis of KerB r. The basis can be completed by some L linearly independent vectors, say BT k (k = 1, "", L) to a basis of II M. Then the matrix
L =
where L' = L'
and L" = I~M-L
(7.1.14) BL
is M x M regular, its rows being linearly independent. We have L"B / LB =
L'B
where L'B = 0
(7.1.15)
because BTct~ = 0 thus t~B = 0 for h = 1,..., M-L. Because LBy = 0 if and only if By = 0, we have KerB = Ker(LB) thus rank(LB) = J - dimKer(LB) = J - dimKerB = rankB. Hence
Material and Energy Balancing in the Process Industries
180
the L (= rankB) nonnull r o w s g k B of LB are linearly independent, thus rank(L"B) = L is full row rank. Consequently the equation L"By + b" = 0 has some solution y whatever be L-vector b". Thus in particular the equation LBy + L(Ax++ c) = 0, equivalent (L being regular) to the equation (7.1.11) and rewritten in the form L"By + L"(Ax§
c) = 0
and (0 +) L'(Ax*+ c) = 0 is solvable if and only if L' (Ax++ c) = 0. If it happens that L = M then the second equation is absent, and B being then of full row rank, we have no additional condition of solvability. Summarizing, we have the following result.
Let rankB = L and let 1~1' " " ' O~'M-L be linearly independent row vectors such that ctTh ~ KerB T (thus o;h B - 0 ) f o r h - l, . . . , M-L. Then the equation (7.1.11) has some solution y if and only if A ' x § + c' = 0
where
A' = L ' A , c' = L ' c (7.1.16)
and where L 9 = IDa,M_ L
I f in particular L = M then Eq.(7.1.11) has always some solution in y. The transformation of Eq.(7.1.11) in the above manner is called matrix projection. Instead of finding explicitly a matrix L ' having the required property, we can proceed as shown in the next section. Also the analysis presented in Section 3.3 can be generalized. W e shall use the same terminology. Irrespective of the way how the value x + of the subvector x has been actually fixed, we call its components m e a s u r e d , and those of y u n m e a s u r e d . If z' and z" are two vectors (7.1.9), the components of z' resp. 9 9 tl |I z" are y j and x i resp. y j and x i . Let us suppose that some i-th measured variable has the following property: W h a t e v e r be two solutions z' and z" of Eq.(7.1.1), if Xh -- X~ for all h ~e i then also x'i = x'~. Then the i-th variable is called r e d u n d a n t : its value is determined by the other measured values. Let us further suppose that some j-th u n m e a s u r e d variable has the property: W h a t e v e r be two 9 I1 solutions z' and z" of Eq.(7.1.1) such that x' - x", we have y j - y j . Then the j-th variable is called observable" its value is uniquely determined by the m e a s u r e d values, provided they make the equation solvable. Let a h be the h-th column vector of matrix A. If ah = L'a h = 0 then by (7.1.14), T T ah ~l =
0~'1 a h =
0,
T T " " , a h O~M_L =
0
thus, the vectors
T
T
ct 1 , ... , CtM_L c o n s t i t u t i n g
a basis of
Chapter 7 - Solvability and Classification of Variables I- Linear Systems
181
KerB T, we have aT W = 0 for any w ~ KerB T. Consequently, the property L'a h = 0 is independent of the choice of the basis, thus of matrix L'. Thus conversely, if a'i = L'ai ~: 0 then the inequality holds again whatever be the choice of L'. Now a'i is i-th column vector of matix A' in the condition (7.1.16). If a'i :~ 0 then some element A'li (in l-th row) of matrix A' is nonnull, and by the solvability condition, the i-th component x~ is uniquely determined by the values of the other components whenever Eq.(7.1.16) is solvable. Hence the i-th variable is redundant. On the other hand if a~ = 0 then A'~h= 0 for all I and the h-th variable is unaffected by the condition (7.1.16), thus arbitrary, thus not redundant. W e thus h a v e the f o l l o w i n g criterion.
The i-th measured variable is r e d u n d a n t if and only if the i-th column of matrix A ' in (7.1 . 16) is n o n n u l l . The condition is independent of the choice of L', thus of the basis of K e r B T. a 'i= L '
ai
T h e d e f i n i t i o n o f a r e d u n d a n t v a r i a b l e thus d e p e n d s o n l y on the m a t r i x (B, A), n o t on the v a l u e x +. A m e a s u r e d v a r i a b l e that is n o t r e d u n d a n t is c a l l e d nonredundant.
I f it is the h-th v a r i a b l e t h e n the c o n d i t i o n r e a d s a~, - 0 w h e r e a~,
is the h-th c o l u m n v e c t o r o f A ' . If in p a r t i c u l a r L = M, w e h a v e no a d d i t i o n a l c o n d i t i o n , thus n o r e d u n d a n t nonredundant. Summarizing
variable,
and
all the m e a s u r e d
If L = M:
all m e a s u r e d v a r i a b l e s n o n r e d u n d a n t
IfL <M,
a'i ~ 0:
i-th v a r i a b l e r e d u n d a n t
a~ = 0:
h-th v a r i a b l e n o n r e d u n d a n t
where
A
variables
are
(7.1.17)
= (a'l, .-., a I )
is the m a t r i x L ' A in ( 7 . 1 . 1 6 ) . Let x § be such that Eq.(7.1.11) is solvable. Then, if y' and y" are two solutions of the equation we have B(y" - y ' ) = 0 thus y" - y' ~ Ker B. The matrix B operates on J-vectors u of j-th component uj. If, for some j, the subspace KerB contains some vector u such that uj ~ 0 then, setting y" = y'+ u, we have YI~~ Y~ and the j-th variable is not observable, being not uniquely determined. Conversely if u ~ KerB implies uj = 0 for the j-th component then y"- y' ~ KerB implies yj = y~ and the determination of yj is unique. Observe also that if L is an arbitrary M x M regular matrix then Ker(LB) = KerB hence the above condition is independent of the transformation. W e thus h a v e the f o l l o w i n g result.
The j-th unmeasured variable is o b s e r v a b l e if and only if for any J-vector u
Material and Energy Balancing in the Process Industries
182
Bu=0
implies uj = O
(7.1.18)
where uj is the j-th component of u. The criterion is independent of possible transformation replacing matrix B by some L B where L is regular M x M matrix. T h e d e f i n i t i o n o f an o b s e r v a b l e v a r i a b l e thus d e p e n d s o n l y o n t h e m a t r i x B in t h e p a r t i t i o n ( 7 . 1 . 1 0 ) , n o t p e r h a p s on t h e f i x e d v a l u e x +. A n u n m e a s u r e d v a r i a b l e t h a t is n o t o b s e r v a b l e is c a l l e d u n o b s e r v a b l e .
From (7.1.18) follows
The 1-th unmeasured variable is u n o b s e r v a b l e if and only if there exists some J-vector u such that Bu = 0
and l,lI q~
0 .
(7.1.19)
T h e a b o v e c r i t e r i a c a n b e r e w r i t t e n in a m a n n e r that will b e u s e f u l in C h a p t e r 8. Let us have an arbitrary M x J matrix B of column vectors bj (j = 1, ..., J), let rankB = L. If Bu = 0 implies uj = 0 for the j-th component of any vector u = (u~, ..., uj )r then, whatever be J numbers u~, ..., uj J
Z ujbj = 0
implies uj -- 0
(7.1.20)
j=l
because the LHS equals B(u~, ..., uj )v. Hence, if ~j) is the vector space generated by the remaining J-1 column vectors b~ (i ~: j), for any w e ~i) abj+bw=0
impliesa=0
thus bj ~ ~0" Consequently, because the space ImB of dimension L is generated by ... , bj, we have
bl,
dim ~i) = L - 1 .
(7.1.21)
Conversely, if (7.1.21) holds true then bj ~ ~i) and we have (7.1.20). Hence the statements (7.1.21) and (7.1.20) are equivalent. Observe that anyway, dim%) > L- 1. Further, we have dimKerB v + L = M
(7.1.22)
because B x is J x M and rankB ~ = L. Let us have two M-vectors w' ~ ImB, w " r
KerB T .
If, for some real a and b
(7.1.23)
Chapter 7 -
183
Solvability and Classification of Variables I- Linear Systems
aw' + bw"= 0 then, as w ' = B u for some J-vector u, 0 = a B T B u + bBTw '' = a B T B u hence also 0 -- a u T B T B u = a ( B u ) v (Bu) = a w ' T w '
thus if w ' r 0 then a = 0. Consequently, if w' resp. w" is some basis vector of ImB resp. KerB v, the two vectors are linearly independent. Thus according to (7.1.22)
(7.1.24)
ImB + KerB v = 11M and (ImB) n (KerB r ) = {0} ; the two subspaces are
supplementary in
R M.
Going back to the partition (7.1.10), let ai be a column vector of A. If the M-vector at is element of ImB then, whatever be ~ (h = 1, ..., ~h
ai
M-L) in
(7.1.14), we have
= 0; thus
(7.1.25)
for a~ ~ ImB: L ' a t = 0 . On the other hand, if a i ~ ImB then, by (7.1.24) a i --- w ' + w" for some w ' ~ ImB, w" ~ KerB r, w" r 0 hence w " T a i = w " T w '' :~: 0
because, for some u, w"Tw ' = w'Tw '' = (Bu)Tw '' = UT BTw" = 0. Consequently, because w" is linear combination o f certain vectors r r (7.1.14), we have r L ' w " r 0. Thus (as L ' w ' = 0)
r 0 for some Oth , hence
(7.1.26)
ai ~ ImB implies L ' a i ~: 0 .
We thus have the following results. The i-th measured variable is redundant
i f a i ~ ImB
nonredundant
if a i E ImB
(7.1.27)
where a~ is the i-th column vector of matrix A. Thus the i-th measured variable is nonredundant if and only if the i-th column vector a i of A is a linear combination of the columns of B. Further, the j-th unmeasured variable is observable
if dimVo~ = L-1
unobservable
if dimV~) = L
}
(7.1.28)
184
Material and Energy Balancing in the Process Industries
where %~ is the space generated by the remaining J-1 columns bj, (j'~ j) of matrix B. Thus the j-th unmeasured variable is unobservable if and only if the j-th column vector bj is a linear combination of the remaining J-1 column vectors. Recall that we have denoted L = rankB.
7.2
(7.1.29)
C A N O N I C A L F O R M A T OF THE SYSTEM OF E Q U A T I O N S
Let us consider a general linear equation (7.1.1). Having re-ordered and partitioned the variables according to (7.1.9) with (7.1.10), the extended matrix reads C~x = ( B , A , c ) } M . J
I
(7.2.1)
1
The Gauss-Jordan elimination on the set of scalar equations (7.1.1) corresponds to a regular linear transformation of matrix Cex. The transformation consists in forming linear combinations of the rows of Cex, their re-ordering included. Let us, however, proceed in two steps. In the first step, the elimination is restricted to matrix B. So the linear combinations are performed with the rows of the whole Cex, but using only the columns of matrix B in the elimination. The transformed matrix is thus of the form J
I
1
B"
A"
c"
}L
0
A'
c'
} M-L
Fig. 7-1. Transformation of matrix Cox
where L = rankB. In the second step, the elimination is carried out on matrix (A', c'). The transformed matrix is generally I
1
A'1
c',
} M'-L
e'2
}m-m'
,,.
0
Fig. 7-2. Transformation of matrix (A', c')
185
C h a p t e r 7 - Solvability and Classification of Variables I- Linear Systems
If c 2 ~: 0 then the equation is not solvable. There is an error in the model, which has to be found and the problem re-formulated. This done, with the new equation we have c2 - 0 if M - M' > 0, or simply M - M' = 0. Because now rank Cex = M', if M > M' then some M - M' equations are linear combinations of the remaining equations and can be deleted, or we can start from the transformed matrix, where the zero rows have been deleted. For simplicity, let us assume directly that M = M'; hence the transformed matrix is that in Fig. 7-1, and Cex is of full row rank. We are thus in the situation considered in Section 7.1. The equivalent system of equations after the transformation reads B"y + A"x + c" = 0 A ' x + c' = 0
(L scalar equations) ( M - L scalar equations).
t (7.2.2)
According to the scheme (B.7.3) in Section 7 of Appendix B, the elimination includes the selection of certain variables yj, (h = 1, -.., L) such that the elements Bkj, of matrix B" equal 1 for k = Jh, zero for k r Jh ; recall that in Fig. 7-1, we have used only the columns of matrix B for the elimination. For a better visualisation, let us thus re-number the components of subvector y in the manner that the selected variables stand as 1-st, ..., L-th. Denoting by I L the L x L unit matrix, the matrix B" is then of the form (I L , B*) where possibly certain, say L0 rows of B* equal zero_ Let us further rearrange the rows of B" in the manner that the L 0 zero rows of B* stand as 1-st, ..., L0-th; then also the rows of matrix I L are re-ordered. We thus finally re-order once again the variables corresponding to the first L columns so as to have again the unit L • L matrix in the first L columns of B". So finally, after re-ordering the rows and re-numbering the variables, the matrix B" reads
B (iLo Lo
o/, 0 IL_Lo
B*
L-L o
J-L
} L-L o
where rankB" = L
(7.2.4)
and where for any row Bh* of matrix B* we have Bh ~: 0 (h = 1, ..., L - L o) .
(7.2.5)
Here, we have precluded the case that L0 = L but J - L > 1. Indeed, in the latter case some J- L columns of B" equal zero. Recalling the elimination, we conclude that also the J - L columns of the original matrix B then equal zero and the corresponding components of vector y are, in effect, absent in the linear model (7.1.1) with (7.1.9 and 10).
186
Material and Energy Balancing in the Process Industries
We also know that (having possibly deleted zero rows after elimination in the second step) matrix A' is of full row rank, hence rankA' = M - L .
(7.2.6)
If there are zero columns in matrix A', say in number I0, on renumbering also the I components of vector x we obtain
A'-(A*,O)
} M-L
(7.2.7)
I-Io Io where (7.2.8)
rankA* = M - L and where for any column a *i of matrix A* we have
(7.2.9)
ai ~ : 0 .
The final format of the extended matrix of the equivalent system (7.2.2)
Lo
L-Lo
J-L
1-1o
Io
1
I
L-L o
M-L
y
I observable
II unobservable
v ' - -
III redundant
IV nonredundant
Fig. 7-3. Canonical format of matrix of linear system (7.2.3) (The verbal classification is explained below)
Chapter 7 -
187
Solvability and Classification of Variables I - Linear Systems
where the void fields are zeros, and where we have the conditions (7.2.5) and (7.2.9). We call it the canonical format of the extended matrix; to be more precise, one should also add the zero rows according to Fig. 7-2. Observe that one of the groups I and II of columns can be absent, and also group IV of columns can be absent. We can also have M = L, in which case the last M-L rows are absent. A special case is when z = x in (7.1.9), in which case subvector y is absent and the first L rows are also absent. The wording 'canonical' will be explained below. Let us now go back to Section 7.1. Consider first the special case where all the variables are qualified as measured, thus formally J = 0 hence also L = 0 by definition, in accord with L < J. The matrix B" in (7.2.2) is absent, as well as the columns I and II and the first L rows in Fig. 7-3. If the group IV of columns were nonempty, certain columns of the original matrix A would be zero, thus the corresponding variables would be absent in the model. Precluding this case, the group IV is always empty. Then all the measured variables are redundant by (7.1.17) where we can put A' = A. Let further J > 0 thus L > 0 (else B would be zero matrix). Then Gauss-Jordan elimination on matrix B has been carried out, and we have the canonical format according to Fig. 7-3. If we imagine, for a moment, that the columns in both subsets of unmeasured/measured variables are (separately) re-arranged into the original orders then the transformed matrix (that of the system (7.2.2)) equals LCcx where L is some M x M regular matrix; see Appendix B, (B.8.28). Here, Cox is the matrix (7.2.1) where we have directly assumed that C~x is of full row rank M. Decomposing L")}L L =
L'
} M-L
(7.2.10)
as corresponds to the decomposition (7.2.2), we have in particular L ' B = 0, L'(A, c) = (A', c ' ) .
(7.2.11)
Here, the M-L rows of L' are linearly independent and B T L 'v = 0; hence if oth (h = 1, ... , M-L) is h-th row of L', we have Br0~hr = 0 thus CtTh e KerB r.
Consequently, our transformation is just one of those admitted in (7.1.16). Although we have not needed computing the matrix L explicitly, formally the transformation to canonical format is a matrix projection, according to the terminology introduced after formula (7.1.16). Only the variables have been re-numbered to obtain the arrangments (7.2.3 and 7). Let us first examine the columns III and IV in Fig. 7-3, thus the matrix A' (7.2.7). Let L < M (else the matrix is absent). Then by (7.1.17), the group III of columns represents the redundant variables, the group IV the nonredundant ones. In the total, we thus have I-I o redundant variables. Each of them separately
188
Material a n d Energy Balancing in the Process Industries
is uniquely determined by the remaining ones as a component of vector x § obeying the condition A'x + + c' = 0. More generally, we can select a subset of H linearly independent columns of A', thus after rearrangement, matrix A' reads
A' = ( A ; , A ; )
(7.2.12)
H where clearly, the columns of A'~ are in the group III. Then, if the corresponding + + subvectors of x + are Xl and x 2 , the condition of solvability +
~
+
~
A~ x~ + A 2 X 2
+
"- 0
(7.2.13)
determines uniquely the subvector Xl+, given x2+ such that the condition has some solution. The (full row) rank of A' being M-L, we have necessarily H < M-L and taking H = M-L, this number is maximum. Then, taking arbitrary I-H components of x~, x~ is unique. Observe that the choice of the H linearly independent columns is generally not unique (but also not arbitrary; some columns of A' can be linearly dependent). The maximum number M-L of linearly independent columns is called the degree of redundancy. In accord with this definition, if in particular L = M then, according to (7.1.17), all the measured variables are nonredundant. In that case, we do not partition the measured variables in Fig. 7-3, set formally I 0 = I and consider formally the group III empty. Let us now examine the matrix B" (7.2.3). If u is a J-vector, we have Bu = 0 if and only if B"u = 0; see the fine-printed paragraph preceding the criterion (7.1.18). W e will apply the criteria (7.1.18 and 19). By (7.2.3), B"u = 0 is equivalent to ul = 0 f o r l =
1, ... , L 0
(7.2.14a)
J-L
ULo+h + t__Z113~tUL+t = 0 for h = 1, ... , L-L o
(7.2.14b)
where ght is the t-th component of the row vector 13~ (h-th row of B* ). We see immediately that by (7.2.14a), all the first L0 unmeasured variables (group I) are observable. Let further the j-th column be some of the first L-L o columns in group II, thus j = Lo+k where , 1 < k < L-Lo. Recall that Bk ~ 0 thus B~v ;e 0 for some v (1 < v < J-L). Thus setting ul = 0 for l = 1, ... , L o Uj - " U L o + k - "
1
1 -
u,§
B~v
UL+t = 0 f o r U L o + h -- -
1 < t < J-L , t 4: v
1 , ~ B h, v f o r h ~ : k Bkv
C h a p t e r 7 - Solvability a n d Classification o f Variables 1 - Linear Systems
189
as the reader readily verifies, all the conditions (7.2.14) are obeyed. Thus the j-th variable is unobservable. Finally let the j-th column be some of the last J-L columns in (7.2.3), thus j = L+v where 1 < v < J-L. Then, setting ul = 0 for l = 1, --- , L 0 Uj =
UL+ v =
UL+t = 0 f o r
1 1 < t < J-L, t # v
ULo§ = - 8~ for h = 1, .-., L-L o we see immediately that again, the conditions (7.2.14) are satisfied. Thus the j-th variable is again unobservable. Consequently, all the J-L o unmeasured variables of group II are unobservable.
We have thus completed the classification. The group I of columns represents the observable variables, the group II the unobservable ones. In this manner, the canonical format of the extended matrix enables one to identify uniquely the following invariants of the given linear system (independent of the admissible equivalent transformations). (i)
The solvability in variable z of Eq.(7.1.1); the unsolvable case is not considered in Fig. 7-3 (see Fig. 7-2)
(ii)
The rank of matrix C = (B, A); in Fig. 7-3, full row rank M is assumed, otherwise some zero rows occur in addition
(iii)
The rank L of matrix B, with the partitions (7.1.9 and 10)
(iv)
The degree of redundancy (say) H = M-L
(v)
The partition of measured variables into redundant (columns III in number I-Io ) and nonredundant (columns IV in number I o ), where the group III is empty if M = L
(vi)
The partition of unmeasured variables into observable (columns I in number L 0 ) and unobservable (columns II in number J-L o ).
Note that generally, the partition of columns II as drawn in Fig. 7-3 is an ad hoc partition, not an invariant; using another elimination procedure, another partition of the variables could be obtained (only the numbers J-L and L-L o are invariant). Also the matrices B* and A* depend on the way of elimination. In addition, we have the equivalent set of equations (7.2.2). Given x = x § we have to check the condition of solvability A'x + + c' - 0 and if not satisfied, first adjust the value x+; if it is the vector of actually measured values, it means the reconciliation (see Chapter 9). If the condition is obeyed then the observable
190
Material and Energy Balancing in the Process Industries
unmeasured variables are uniquely determined by (7.2.2)1 ; in particular if J = L (B is of full column rank) then all the unmeasured variables are uniquely determined. Remarks
(i)
Comparing with the graph analysis in Chapter 3, we find certain common features of both methods. Having decomposed graph G O into connected components, we have merged the nodes in any of the components. This corresponds to summations of subsets of rows in the full incidence matrix, in the manner that certain rows of submatrix B are annulled. The result is the system (3.2.4) of equations. Clearly, the matrix A* is that obtained generally in (7.2.7), and the I 0 variables of group IV are represented by the flowrates mi where i a J' (3.2.6). The first K' vector equations (3.2.4) are further transformed according to (3.3.1 and 2). Irrespective of the way of computing the inverses Rk = (B~,)-1, the result (3.3.2) is the same as by a Gauss-Jordan elimination. The zero rows of matrices Rk B~ thus uniquely correspond to the zero rows in the last J - L columns of matrix B" (7.2.3) and identify the observable variables (flowrates associated with arcs i e Sk ). Hence, as has to be expected, the classification by both methods is identical. See the example in Section 3.4. By (3.4.1), the variables m2 and m~ are nonredundant thus m2+ and m +l~ are arbitrary. The remaining measured variables have to obey the conditions (3.4.7), else the vector m § has to be adjusted to some fla. Then the unmeasured variables must obey the conditions (3.4.10), as commented in the last paragraph of Section 3.4.
(ii)
We have not rewritten the matrix A', thus A* in (7.2.7) as would correspond to a Gauss-Jordan elimination, giving unit submatrix in certain columns. The variables in the latter columns would represent certain components of a 'maximal' subvector x~ in (7.2.13), with H - M - L in (7.2.12). The choice of the columns is generally not unique. One can also imagine the case where some row of the matrix A* is zero in all the columns with the exception of one thus A* reads, after rearrangement i0
/1 0
0A** ) .
But if io is that column then our condition reads, with c' - (Cl
(7.2.15)
,'",
~
T
CM-O
Chapter 7 - Solvability and Classification of Variables I- Linear Systems X +i0 - - -
c~'
191
(7.2.15a)
hence the i0-th variable is uniquely determined as a constant of the model. (iii)
According to the fine-printed remark following after formula (7.2.5), we do not consider the case where some column of matrix B equals zero. In the linear model, this means that the corresponding unmeasured variable is simply absent. Formally, it can then be regarded as unobservable according to the classification (7.1.28). With a (linearized) nonlinear model, such possibility can incidentally occur at some point z since B as a function B(z) depends on z (see Chapter 8).
(iv)
The canonical format can be further specified using a special strategy of elimination. See Section 12.2 of Chapter 12.
7.3
COMMENTARY AND EXAMPLES
Let us return to Section 7.1 and let L < M in (7.1.12). Hence the condition (7.1.16) applies. As shown, the choice of the basis vectors ~T ~ KerB v is arbitrary. This can be verified directly. Taking some other M-L basis vectors, say ~,T, any ~,T is a linear combination of the former vectors, thus also any row vector 7h is such linear combination, thus the new matrix (say) L'~ replacing L' equals L'~ = Z L '
(7.3.1)
where Z is some regular (M-L) • (M-L) matrix. [Indeed, if Z were of lower rank than M-L then also L'1 would be of lower rank.] The new condition thus reads Z ( A ' x § + c') = 0 and is equivalent to the former condition. The set of solutions (in x +) of Eq.(7.1.16) is thus independent of the choice of L'. Let M § be this set, thus x~
M§
(7.3.2)
and the condition of solvability reads x+ ~ M + .
(7.3.3)
In the same manner as in (7.1.8), M § is again a linear affine manifold, of dimension I-(M-L), and determined uniquely by the linear system (7.1.1) with the partition (7.1.9). In fact, M § is the projection of M (7.1.8) into the subspace of vectors x. This means that
192
Material and Energy Balancing in the Process Industries
x ifand~176176
(7.3.4)
For example if we have two scalar equations y-x~-x
2+ 1 =0 (7.3.5)
2y-
x 1 +2
2 -
1-0
then 914is a straight line in the space (y, Xl,
X2), viz.
y=2t X 1 --
(7.3.6)
3t
x2=l-t with parameter t. Given 21 and 22 , they have to obey the condition of solvability (21,22)x ~ M+ thus, by elimination 2~ + 322- 3 = 0
(7.3.7)
which represents a straight line in the plane (x~, x2), parametrized as x~ = 3t and x2 = 1 - t. The straight line M + is the projection of the straight line 914 into the plane (x 1 , x 2 ).
!
.x~~ Fig. 7-4. Projection M §
~ x 2
Chapter 7 - Solvability and Classification of Variables I- Linear Systems
193
If x + is a vector of actually measured values, we have generally x + ~ M § due to measurement errors. The reconciliation starts from the condition ~,~ M + ( 9 , = x + + v ) ;
(7.3.8)
v is the adjustment obeying certain additional conditions derived from statistics. Given ~,, the first subset of equations (7.2.2) reads B"y + A":~ + c " = 0
(7.3.9)
where rankB" = L. Again, the set of solutions y is a linear affine manifold, of dimension J-L (a unique point if L = J), but dependent on i. Let M (~) be this set, thus
y ~ M(~)
means
/y/
~ M
(7.3.10)
thus
B"y + (A"~ + c") = 0
if ~ ~ M §
(7.3.10a)
while
M(~) = O
if :~ ~ M + .
(7.3.10b)
Observe that the linear equation (7.3.10a) is (B" being of full row rank L) solvable in y for any value of :~; but only with the condition ~, ~ M +, it is equivalent to the full condition (7.3.10), thus also independent of the choice of matrix L in (7.1.14), i.e. also of the way of elimination according to Section 7.2. Generally, if vector z is partitioned as in (7.1.9) then the subset of M where the x-components (coordinates) have been fixed (thus x = :~) is called section of M at x = :~. Thus our M(~) is the projection of the section into the subspace of y-components, according to (7.3.10). Clearly, if the section is empty (thus if i ~ M +) then also its projection M(i) is empty. In the above example (7.3.5), fixing :~ ~ M + means fixing a point on the straight line M + in the (x~, x2 )-plane. Then the straight line x~ - ~ , x2 = x2 parallel to the y-axis in the space (y, x~, x 2 ) intersects the straight line M in one point; if taking some ~, ~ M + then the intersection is empty. The intersection is (say) point G, x~, x2 )v and M(~) is a one-element set, thus point ~ on the y-axis. For instance in Fig. 7-4, taking ( ~ , X2 )T = (3, 0) T E M +, the vertical line parallel to the y-axis is drawn; then ~ = 2. If we have only one scalar equation Y~ - Y2 - x + 1 = 0 (x measured)
(7.3.11)
194
Material and Energy Balancing in the Process Industries
then M i s a plane in the space ( Y l , Y2, X) and the equation is solvable whatever be the choice of x =2; the projection M + of the plane into the x-axis is the whole x-axis. Fixing some 2 means adding the condition x - 2 - 0 to the equation (7.3.11), thus finding the intersection of M with the plane x = 2 parallel to the ( Y l , Y2 ) coordinate plane. The intersection is a straight line and its projection M(2) into the (y~, Y2 )-plane is the straight line Yl
- Y2 -I- ( 1 - ~ )
- 0 .
Alas, even the simplest example where both M § and M(~) are some nontrivial subsets of the x- and y-space, respectively, requires four variables at least. Let us for instance substitute yl+Y2 for y in (7.3.5). Then the condition of solvability is again (7.3.7), thus M + is again a straight line in the (x~, x2 )-plane. M is now a twodimensional linear affine manifold in fourdimensional space. Taking :~ ~ M +, the intersection of the subset of vectors (Yl, Y2, x~, x2 )v such that x~ = ~ and x2 = ~2 are fixed, with M is empty. If ~ ~ M + then this intersection is the set of vectors (y~, Y2, ~ , ~2 )v such that (7.3.12)
Yl + Y2 + (1-~1-&2) - 0
for instance according to the first equation (7.3.5); the second equation, provided that (7.3.7) is obeyed, is equivalent. M(~) is a straight line in the (Yl, Y2)-plane, whose equation is (7.3.12). The excursion into 4-dimensional space has only shown that it is necessary to rely upon linear algebra, while geometric imagination fails. Let us consider three equations Yl - Y2
- X1
Yl - Y2 - Y3 +
---- 0
X l "1- X2 -I- X 3 -
-Yl + Y2 + Y3 + xl +
X2 - X3 -
1
= 0
1
= 0.
(7.3.13)
As the reader readily verifies, the rank is full (M = 3) while the rank of submatrix B is L = 2, with the notation (7.1.10 and 12). Hence the solvability condition reads Xl + x2 - 1 - 0
(7.3.14a)
while the variable x 3 is nonredundant. The set M + in the (Xl, x2, x3 )-space is a plane
195
C h a p t e r 7 - Solvability and Classifi'cation of Variables I- Linear Systems
X3
plane ,/It' +
.k
s S
9
s
s
s
s
9
s S
9 9
s
9
9
X2
Fig. 7-5. Special form of the set 914+ with nonredundant variable x3
parallel to the x3-axis. Given ~, e M +, the solutions in y are subject to (L =) 2 equations Yl -
Y2
-
21
=
0
- Y3 + 221 + 22 + 23 - 1 - 0
(7.3.14b) .
(7.3.14C)
Notice that ranging the equations in the order c, b, a, multiplying Eq.c by -1, and taking the y3-variable as first we have the canonical format of the equivalent matrix of the system. Thus, in accord with direct inspection, the variable Y3 is observable, Yl and Y2 are unobservable. Taking for instance Xl = 1 thus 22 = O, and 23 = 0 the equations read =1
Yl - Y2 Y3
-1.
Thus M(~) is a straight line parallel to the ( Y l , Y2 )-plane, but not to any of the latter two axes. Due to the latter fact, the variables y~ and Y2 are not observable. See Fig. 3-8 in Section 3.3 where (x, y, z) stands for (Yl, Y2, Y3 )" Again, the example was at the limit of what one could imagine geometrically; the whole 3-dimensional manifold in 6-dimensional space lies beyond our imagination.
196
Material and Energy Balancing in the Process Industries
We did not need the sophisticated terminology of linear affine manifolds, projections, and sections in the above analysis of solvability. The formal mathematical language is, however, useful when one attempts to analyze the problem rigorously in a nonlinear case.
7.4
MAIN RESULTS OF CHAPTER 7
A linear system occurs not only in the mass balance according to Chapter 3, but also always when a nonlinear system is linearized in some step of a numeric solution procedure. The solvability analysis of linear systems brings no theoretical problem and is fully practicable by the methods of linear algebra; see Section 7.1. The general linear equation (7.1.1) thus Cz + c = 0 is called solvable when there exists some z satisfying the equation. Here, z is the N-vector of unknowns, C a constant M x N matrix, and c a constant M-vector. The condition of solvability, given matrix C, concerns the vector c (7.1.2 and 3). Assuming the condition fulfilled and having eliminated linearly dependent equations we obtain the regular linear model Cz + c = 0 where rankC = M < N (matrix C[M, N])
(7.4.1)
according to (7.1.4 and 5), precluding the trivial case where C is a square regular matrix thus z =-C-~e the unique solution. The model represents a set of constraints the components of vector variable z have to obey. The set of solutions has been denoted by 9V/(7.1.8). Assuming that certain variables thus/-subvector x of vector z is fixed, we partition z according to (7.1.9) into J-vector y (J = N-/), and x. Accordingly, the matrix C is partitioned (7.1.10) into B [M, J] and A [ M , / ] and the model reads By + Ax + c = 0
(7.4.2)
where we put x = x + (7.1.11) as the fixed value. By the same convention as in Chapter 3, we call the subvector y unmeasured and x measured, while x + is thus the vector of given (measured) values. Given some x = x +, Eq.(7.4.2) is generally no more solvable in the unknown y. The new condition of solvability can be T T formulated using the matrix projection (7.1.16). If rankB - L and ~ , ... , o~M_L are arbitrary vectors constituting a basis of the null space KerB T, we multiply Eq.(7.4.2) by the (M-L)x M matrix L' of rows ~1, "'" , ~M-L; then, with A' = L ' A and c' = L ' c the necessary and sufficient condition of solvability reads, for a general x = x +
Chapter
7 -
Solvability and Classification of Variables I- Linear Systems
A ' x + c' - 0 where rankA' = M - L = H (say)
197 (7.4.3)
is full row rank. If in particular L = M (H = 0) then the condition is absent and x = x + is arbitrary. In the latter case, if in addition L = J (thus B is square regular), we call the solution y thus the whole vector z ~ M just determined by the measured subvector. More generally, if H > 0 then the choice of x = x + is not arbitrary, and if L < J then the solution in y is not unique. The classification of variables enables one to decide which of the variables x i (components of x) is, perhaps, still arbitrary thus must be determined a priori so as to determine a unique solution (a 'nonredundant variable'), and which of the variables yj (components of y) is, having satisfied the solvability condition, perhaps still uniquely determined by the given x (an 'observable variable'). It will be shown later (in Chapter 8) that generally (for a nonlinear system), such a verbal classification is somewhat vague. For a linear system, it can be precisely formulated and the classification based on the partition C = (B, A) only, not on the particular choice of x - x +. We call a measured variable xi redundant if its value is uniquely determined by the other neasured variables and the solvability condition, else nonredundant. There are H (redundant) variables xi at most whose values are simultaneously determined by the other measured variables' values; the number H is called the degree of redundancy. We further call an unmeasured variable yj observable if it is uniquely determined by x obeying the condition of solvability, else unobservable. The classification criteria are (7.1.17) and (7.1.18), from where also (7.1.19). The classification criterion (7.1.17) requires a matrix projection to obtain some matrix A' (7.4.3), but is independent of the particular choice of the transformation (matrix) L'; whatever be such L ' A = A' = (a'1 , -.., a I ), if a i :r 0 resp. a'i = 0 then xi is redundant resp. nonredundant, and if H = 0 then all the measured variables are nonredundant by definition. The criterion can also be formulated directly as independent of the transformation (projection) of (B, A), according to (7.1.27): If the original A = (a~, ..- , a I ) then x i is nonredundant if the column vector a i is a linear combination of the columns of matrix B, else redundant. The classification criterion (7.1.18) with (7.1.19) depends on matrix B only: If the j-th component of any J-vector u obeying Bu = 0 (thus u ~ KerB) equals zero then yj is observable, and if there exists some u e KerB such that its j-th component uj r 0 then yj is unobservable. An equivalent formulation of the criterion is (7.1.28): The j-th unmeasured variable yj is unobservable if the j-th column vector bj of B is a linear combination of the other J-1 columns, if not then yj is observable. Thus clearly, if a measured variable x i is redundant resp. nonredundant then including the variable in the list of the unmeasured ones ('deleting the i-th measurement'), it becomes observable resp. unobservable; and vice versa, for an unmeasured variable yj added to the measured ones.
198
Material and Energy Balancing in the Process Industries
The arbitrariness of the above matrix L' makes possible to replace the theoretical construction (using a basis of KerB T) by Gauss-Jordan elimination; see Section 7.2. By a procedure described in the section and leading to the final arrangement according to Fig. 7-3, we obtain the canonical format of the matrix of the system (7.4.2). The extended matrix (B, A, c) can be transformed into equivalent form
(B, A, c) ~
B" A" A' 0
c" ) c'
J
1
I
} L
where
} H
rankB" = rankB = L rankA' = H
(7.4.4)
by Gauss elimination only, without re-ordering the components of y and x. This is a matrix projection, without computing the transformation matrix explicitly. By the way, suppressing the requirement (7.4.1) of regularity, we obtain generally some M-M' (with M' = rankC) rows in addition; if some of the rows is nonnull then the model (7.4.1) is not solvable, if the rows are null then they can be deleted and we can again start from the matrix (7.4.4). Then, by Gauss-Jordan elimination and with a reordering of the variables yj (thus of the columns of B), we obtain transformed matrix B" (7.2.3)
J-L0 B"
ILo 0
~
0
0
IL_L0B*
} Lo
with 131 r 0 for each
} L-L o
row 131 of matrix B*
(7.4.5)
where lz is generally Z x Z unit matrix. Simultaneously, matrix (A", c") is transformed. Further, re-ordering the variables xi (columns of A) we obtain re-arranged matrix A' (7.2.7) A'~
(
A*,0
I-Io Io
)}H
with a i ~ 0
for each
column a i of matrix A* (7.4.6)
(and of course also re-arranged matrix A", transformed before simultaneously with B"). We can directly imagine the new matrix of the linear system as written in the form (7.4.4) with (7.4.5 and 6); we then have the canonical format (Fig. 7-3). We here suppose that no column of the original matrix B was null. As summarized at the end of Section 7.2, before Remarks, the canonical format determines certain invariants of the linear system (7.4.2). For the solvability in z (of Cz + c = 0) and for the regularity (7.4.1), see above (absence of linearly dependent equations). Then the invariants are the number H (degree
Chapter 7
-
Solvability and Classification of Variables I- Linear @stems
199
of redundancy) with the partition of measured variables into I 0 nonredundant and I-Io redundant (possibly I 0 = 0, and I = I 0 if H = 0), and the rank L of matrix B with the partition of the unmeasured variables into Lo observable and J-L o unobservable (possibly L0 = 0, and J = L0 if L = J). Of course if J = 0 (all variables measured) then no elimination (matrix projection) is necessary and z = x, C = A = A', c = c' in (7.4.3) for a regular linear model. If J > 0 then (if H > 0) the nonredundant measured variables correspond uniquely to the last I 0 columns in (7.4.6), and the observable unmeasured ones to the first L 0 columns in (7.4.5). See also Remarks (i)-(iv) to Section 7.2. The solvability analysis and variables classification are translated into more formal mathematical language in Section 7.3, with illustrative examples. The formalism is an introduction to that employed in the theoretical analysis of nonlinear systems (Chapter 8). Generally, the set of solutions of a linear (vector) equation constitutes a 'linear affine manifold', such as M above (solutions of Cz + c = 0). The vectors x obeying the solvability condition (7.4.3) form manifold M § (7.3.4), independent of the particular choice of the matrix projection (elimination). Given some ~ ~ M § the vectors y obeying (7.4.2) with x = :~ form manifold M(~) (7.3.10).
7.5
RECOMMENDED LITERATURE
The method of matrix projection was introduced, in the context of balance equations, by Crowe et al. (1983). The observability/ redundancy classification criteria were clearly formulated also by Crowe (1989). The transformation of the set of linear equations to canonical format was presented in Madron (1992), Section 4.2, and in special form with more details in Madron and Veverka (1992). Crowe, C.M. (1989), Observability and redundancy of process data for steady state reconciliation, Chemical Engineering Science 44 2909-2917 Crowe, C.M., Y.A. Garcia Campos, and A. Hrymak (1983), Reconciliation of process flow rates by matrix projection, AIChE J. 29, 881-888 Madron, F. (1992), Process Plant Performance, Measurement and Data Processing for Optimization and Retrofits, Ellis Horwood, New York Madron, F. and V. Veverka (1992), Optimal selection of measuring points in complex plants by linear models, AIChE J. 38, 227-236
This Page Intentionally Left Blank
201
Chapter 8 SOLVABILITY
AND CLASSIFICATION
OF VARIABLES
II
N O N L I N E A R SYSTEMS
When also chemical components and/or energy are included in balancing, the system of equations is generally nonlinear. From the mathematical point of view, the analysis then brings numerous problems not completely resolved so far. In practice that means that a method of solution (involving possibly reconciliation of measured data) can fail; the reader perhaps knows from his own experience that this is not an uncommon case in numerical mathematics, when treating nonlinear problems. Along with the (unavoidably incomplete) analysis and classification, our aim is to illustrate what can be the reasons of such failure. The topic is a matter of further research. To the best of the authors' knowledge, the material presented in this chapter is largely quite novel. We have, therefore, at least outlined also certain rather lengthy mathematical proofs. They are fine-printed and the results summarized for a reader not interested in details. The reader is anyway recommended to peruse Sections A.1-A.4 of Appendix A and B.1-B.8 of Appendix B, and of course Chapters 3, 4, 5, and 7.
8.1
SIMPLE EXAMPLES
Let us consider blending of two streams (1 and 2) of mass flowrates mj, mass fractions y~ of k-th component, and temperatures Tj . Possibly, the blending unit includes a heat exchanger; for convenience and in contrast to the general notation in Chapter 5, let Q be the heat withdrawn (Q < 0 if heat is supplied). Stream 3 is the output stream. Q
2
T "- 3 r
-q Fig. 8-1. Blending of streams
202
Material and Energy Balancing in the Process Industries
If we have two components in the mixture, we can determine the composition by the mass fraction of one selected component, thus 3) in stream j. Pressure P is considered constant and known, thus the thermodynamic state variables are yJ and T j in stream j. The set of balance equations reads m~
+ m2
- m3
m l y l + m2y2 _ m 3 y 3
= 0 = 0
(8.1.1)
ml hi + m2h 2 - m 3 h 3 - Q = 0 where hj ( = / T with the notation introduced in Section 5.1) is specific enthalpy of j-th stream, a given function of 3~ and T j, given P. We assume m~ > 0 and m 2 > 0. Then the nonlinear system (8.1.1) in variables mj, 3;, T j (j - 1, 2, 3), and Q is solvable: taking arbitrary values of m~, m 2 , yl, y2, T 1, T 2, Q the solution reads m 3 = m I + m 2 (> 0)
(8.1.2)
thus y3 =
(m 1yl + m2y2 )
(8.1.3)
( m 1 h 1 + m 2 h 2- Q)
(8.1.4)
ml+m2
and with h3 =
m~+m2
the RHS is given function of the above variables, where y3 follows from (8.1.3), and there remains to resolve the equation in unknown T 3 /_~(T3; y3 ) = h 3
(8.1.5)
with (by hypothesis known) specific enthalpy function/4. Here, given y3 the specific enthalpy is increasing function of temperature, thus T 3 is uniquely determined. Let us, however, precise the latter point. The mass flowrates mj are subject to the only condition mj > 0 .
(8.1.6)
For the mass fractions, we suppose 0 < yJ < 1 .
(8.1.7)
Chapter 8 - Solvability and Classification of Variables H- Nonlinear Systems
203
But taking for instance yl = 0 or y~ - 1 the stream 1 is, in fact, a single-component one and the problem is modified; yl is no more a variable of the process. Let us rather adopt the condition 0 < 3~ < 1
(8.1.7a)
thus 3~ has to lie in an open interval. Then, if (8.1.7a) holds for j - 1 and 2, it holds also for j = 3 by (8.1.3), as is readily shown formally. We suppose of course T j > 0 (absolute temperature). But the enthalpy function is continuous within certain limits where the medium does not change its state of aggregation; also the technological process admits some range of temperatures only. When necessary, the heat withdrawn (or supplied) allows one, by (8.1.4), to maintain the h3-value, thus the solution T3 of (8.1.5) in these limits; imagine mixing of water with concentrated sulphuric acid. Generally, in the system of balance equations we suppose a priori that the variables' values are restricted to certain intervals, thus to a multidimensional interval in the whole variables space. The enthalpy function/q is assumed to be infinitely differentiable (imagine a polynomial expression). Then, as can be shown formally, the solutions (8.1.2 and 3) and that of (8.1.5) with (8.1.4) are infinitely differentiable functions of the (chosen) 'independent variables', in number 2 + 2 + 2 + 1 = 7 for 3 'dependent variables' (our solutions). The special partition of variables into 'independent' and 'dependent' as chosen is not critical. The set of equations (8.1.1) can be written as g(z) = 0 (z ~ U)
(8.1.8)
where g is an (infinitely differentiable) M-vector of functions (M = 3), z is the vector of N (= 10) variables mj, 3~, T j, Q, and U is the multidimensional interval of admissible values. The equation is solvable, thus the set M of solutions is nonempty. The fact that the general solution can be found as (infinitely differentiable) function of N-M (= 7) variables (components of z) is expressed, in mathematical language, by saying that M is a 'differentiable manifold', of dimension N-M. It is called the solution manifold of the system (8.1.8). Another example of solution manifold is the linear affine manifold (7.1.8). The dimension (N-M) is, in less formal language, the number of degrees of freedom of the system, thus the 'number of independent variables'. In the example, in accord with the intuition, it equals the number of variables ('dimension of the problem') minus the number of equations ('constraints'). Such set of constraints can be called regular; see later for a precision. It is to be stressed immediately that not any N-M (= 7) variables can be chosen as independent; for example including the three variables ml, m2, m3 among the seven independent ones is erroneous, because they are subject to the condition (8.1.2).
204
Material and Energy Balancing in the Process Industries
The simple picture changes when some of the variables (components of z) are fixed, for example as measured values. Generally, if Zn is the n-th component of z, let Zn be a fixed value. Let us examine the solvability conditions; they read generally z e 914(solution manifold) with certain fixed values Zn" In the system (8.1.1), for example with fixed mass flowrates one of the solvability conditions reads (8.1.9)
/'h 1 -I- /'h 2 - /'~'/3 - - O .
Let us rewrite the system (8.1.1) as m 1
+ m2
= m3
m l (yl_y3)
+ m2 (y2_ y3 )
- 0
m l(hl-h 3)
+ m 2(hz-h 3)
-Q
(8.1.10)
and let us consider less trivial examples.
Example 1 Let us have measured the mass fractions 3: and temperatures 7j, thus also the specific enthalpies hj are known. Let also Q be known, for example having measured the mass flowrate and inlet-outlet temperatures of the cooling (or heating) medium. Then the conditions read, having eliminated the variable m 3 m, Q~l_~3 ) -I- m 2 (~2_~3) _ 0 m, (~,_~3) + m2 (~t2_~t3) _ Q and
(8.1.11)
m~ >O, m 2 > O . The inequalities correspond to the general condition z ~ '// in (8.1.8). For example if it happens that ~ = ~3 then, by the inequalities, we have also ~2 _ ~3 as a solvability condition; precluding this case, the inequalities imply only (.~l_y3) (~2_~3) < 0
(8.1.12)
because m~/m2 > 0, hence the algebraic signs of the differences must be different. Suppose the inequality is satisfied. If now Q , 0 then the solvability condition reads ~'-/93 )(ktz-kt3 ) ~ (.92-~3 )(h'-kt 3 ) for 0 ~ 0
(8.1.13)
Chapter
8 -
Solvability and Classification of Variables H- Nonlinear Systems
205
(linear independence). Let also this condition (inequality) be obeyed. Then the equations are uniquely solvable in the mj. If we had for example m~ = 0 then, according to (8.1.11)~ and (8.1.12) also m 2 - 0 , which would contradict the second equation with ~) g: 0. Hence the solutions m~ g: 0 and m2 g: 0. If it happens that some of the flowrates becomes negative, our data are simply wrong (physically absurd) and such set of measurements has better to be discarded. [By the way, such case could occur as well in the solution of mass balance equations in Chapter 3.] Precluding this case, the given values determine uniquely m I and m2, thus also m 3 ( > 0 ) .
Example 2 Let further the heat exchanger be absent. Then the condition of nonnull flowrates mj reads
Q~l__~3 )(~2__~./3 ) __ Q,~2__~3)(~1__~3 )
for ~) - 0 ;
(8.1.14)
else the equations (8.1.11) have the unique solution m~ = m2 = 0. The absence of the heat exchanger means that ~) does not enter the set of adjustable values. The solvability condition then takes the form of a (nonlinear) equation. With (possibly adjusted) measured values, one of the equations (8.1.11) is eliminated. Assuming again the inequality (8.1.12), we can eliminate the second equation and by (8.1.11)1 with (8.1.2), we have the homogeneous linear system m 1 +
m2
(.91@3)ml + @2@3) m 2
- m 3 =0 =
0
} (8.1.15)
of rank 2, thus the solution manifold is a onedimensional vector space. The equations (8.1.14) and^ (8.1.15) represent a decomposition of the system (8.1.2) and (8.1.11) (with Q - 0) into the solvability condition and those for the unmeasured values.
Example 3 If we add also the variable m 3 to the set of the measured ones, the elimination of Eq.(8.1.2) by (8.1.11) subsists without modification and we arrive again at the condition (8.1.14), whatever be m 3 = rh3 . Then the set of constraints is solvable if and only if the condition (8.1.14) is obeyed, with arbitrary rh3 , and on substituting rh 3 for m 3 in (8.1.15) 1 the variables ml and m2 are uniquely determined.
206
Material and Energy Balancing in the Process Industries
There is a close analogy with the classification of variables in Chapter 7. If m 3 is not measured one would call the variables m~, m 2, and m 3 unobservable; if m 3 = rh 3 is measured then m 1 and m 2 can be regarded as observable, and m3 as nonredundant. The values of measured composition and temperature variables have to belong to the set (say) 914+ determined by the condition (8.1.14). With (8.1.12), the condition can be rewritten
~2 = ~t3 +
~ 2_~3
143
(~t~_~t3)
(8.1.16)
hence applying the same consideration as above, for example temperature ~.2 can be expressed as function of the remaining (3+2 =) 5 variables ~ , ~2, ~3, i,~, ~,2. We conclude again that 914+ is a (differentiable) manifold, of dimension 5. If compared with the linear case there are, however, also essential differences. In Chapter 7, the classification was independent of the variables' values. But now, (a)
The classification is unambiguous only if the admissible flowrates are restricted to nonzero ones and then, in addition
(b)
The solvability condition fails as insufficient when the measured variables take certain special values.
Indeed, concerning point (a), if m 3 is not measured and if we admit zero values for m~ and m2 then Eqs.(8.1.11) with Q - 0 are always solvable by m~ = m 2 = 0 thus also m 3 = 0 , and we have no solvability condition; if m 3 = rn 3 is given then the condition reads either rh 3 = 0, or (8.1.14). Concerning point (b), if for example kt1 = kt2 = kt3 then the condition (8.1.14) is obeyed identically; but if also ~1 _ ~3 then, by the requirement that m2 > 0, we must have also ~2 = ~3. In the latter case, thus admitting ~1 _ ~3, the condition (8.1.14) is insufficient and we, in fact, do not know which of the measured values has to be adjusted and which left fixed, or also according to which criterion. We then can say that admitting ~1 _ ~3 somewhere in the a priori admitted region r variables, the problem of adjustment is 'not well-posed'. In other terms, if it can happen that the mass fractions in the streams according to Fig. 8-1 are equal (or only slightly different) then determining the mass flowrates from measured concentrations is inappropriate. See Section 5.5 for another example of such 'ill-posedness'. In complex systems, less trivial cases than (a) and (b) above can occur.
Chapter 8 - Solvability and Classification of Variables II- Nonlinear Systems
207
Example 4 It is not easy to give simply analyzable examples that should illustrate all mathematically possible cases, and would not be technologically na'fve at the same time. As another example, let us consider again the system (8.1.1), equivalent to (8.1.10). Let us have fixed (measured) the variables yJ = (j = 1, 2, 3), T j - 7"J (j = 1 and 3), and Q = Q; thus T 2 is now unmeasured. Let us, however, admit both positive and negative values of Q; perhaps the heat-transporting medium in the exchanger can be cooler or warmer than stream 3. Then Eqs.(8.1.10) yield ^
~ 2_~3 mI =
-
(8.1.1.7)
m2
from where also m3, and
h2
= ]'/3 q-
q" ,-1-3
(f,/1 f,/3 ) .
(8.1.18)
m2
Here, kt~ and f/2 are given, and h 2 depends only on the unmeasured T 2, given also ~2; cf. (8.1.5). We assume again the condition (inequality) (8.1.12) fulfilled. Then, in the same manner as before and after the formula (8.1.8), we conclude that ml, m3, and T 2 c a n be expressed as (infinitely differentiable) functions of m 2 (> 0), thus that the set of solutions is a (differentiable) manifold, of dimension one. It is thus a curve in the 4-dimensional space of variables ml, m2, m3, T 2. It is generally a curve and not a straight line, because the dependence of T2 on m E by (8.1.1 8) is generally nonlinear. If Q 4: 0, none of the variables is uniquely determined; they are not 'observable'. But if it happens that Q = 0, the mass flowrates are again not uniquely determined, while T 2 (by h 2 ) is; it becomes 'observable', given the measured values. Let ~: be the vector of measured variables, 9V/'(~) the above manifold (curve). Thus in the special case where = 0, 91,f(:~) is a straight line parallel to the (m 1 , m 2 , m 3 )-hyperplane of coordinates. The reader can perhaps imagine variable m 3 eliminated as a 'dependent' variable, thus consider only the system (8.1.17 and 18). Because the coefficient at m 2 in (8.1.17) is positive by (8.1.12), we then have the following picture. ^
208
Material and Energy Balancing in the Process Industries
0>0v~ 0=0vc 0 0) the balance (8.1.23) implies for Q' = 0:~./3 ~./6_ 0
(8.1.26)
hence ~.3 and ~,6 are subject to a solvability condition ('redundant'), the other measured variables are 'nonredundant', and m 5 , thus also m3, m l , and m 2 are unobservable; also T 2 is unobservable with the exception of Q = 0 (attention: the latter Q, the former Q'). It is thus seen that it can also happen that
(d)
Some variable can be (called) 'nonredundant' with the exception of certain special values of some other measured variables, where it appears as 'redundant'.
But such classification is misleading. If we have admitted positive as well as negative values of Q' and found (measured) Q' = 0, we in fact do not know
212
Material and Energy Balancing in the Process Industries
which of the measured values (~.3 and p6, or perhaps Q') has to be corrected; only if it were Q' , we should not know according to which condition, as m 5 is unknown in (8.1.23). Simply, the classification 'redundant'/'nonredundant' can fail. The (adjustment) problem is then again 'not well-posed'. ^
if
Let us summarize. The examples have shown that, according to the selection of measured variables and their admitted values Either (i)
The solvability condition takes the form of a system of algebraic equations (determining a differentiable manifold M § ); generally, the condition does not involve certain variables, which can be called 'nonredundant', while the remaining measured variables are 'redundant'.
(ii)
If the measured values have been adjusted so as to obey the solvability condition (to lie on the manifold M+), the unmeasured variables are subject to a condition taking again the form of a system of algebraic equations (determining a differentiable manifold M(~) where i is the vector of adjusted measured values); generally, given i some unmeasured variables are uniquely determined and can be called 'observable', while the other are not uniquely determined thus 'unobservable'. But the classification can depend on ~,; in the examples, some unobservable variables become observable at some special values of :~
(iii)
There can exist certain values in the admitted region of the measured variables, such that the solvability condition fails as an adjustment condition (the condition does not determine a differentiable manifold); then a meaningful classification of variables is not possible.
Then
Or also
In the latter case, we have called the adjustment problem not well-posed, which can be interpreted as an inappropriate selection of the set of measured variables. Still other cases than illustrated by the examples are possible. It is, alas, generally not easy to analyze the possibilities a priori.
Chapter 8 -
8.2
Solvability and Classification of Variables H- Nonlinear Systems
213
S O L V A B I L I T Y OF M U L T I C O M P O N E N T BALANCE EQUATIONS
Our aim is now to show that, under certain plausible conditions, the whole set of (mass, components, and energy) balance equations is solvable and, in certain sense to be precised, 'regular'. In the first step, the energy balance will not be considered.
8.2.1
Transformation of the equations
The case where only total mass balance is considered has been completely analyzed in Chapter 3. So let us begin with the multicomponent balances, as formulated in Chapter 4. We already know that the balances (4.5.2) with (4.5.1) involve also the total mass balance of the set of nodes as a consequence, hence the latter need not be written explicitly. Generally, in addition to the equations (4.5.2) we have introduced the conditions (4.2.14): certain components are absent in certain streams. If again K is the number of components occurring in the balances we have introduced K sets Ek (k = 1, ..., K); E k is the set of streams in which component Ck can be present. Then instead of (4.5.1), we have the expression (4.5.4). Further, some of the conditions (4.5.2c) are consequences of other conditions. We thus rewrite the set of balance equations in the following manner. We define, for any node n k = 1, . . . , K: n k (n) = - Z
Cniy~mi]M k
(8.2.1)
i~ E k
formally for any k, with some a priori given order. Then our equations read, having again partitioned the set N u of units into S (splitters) and T, = Nu - S, n e T, : D(n)n(n)= 0
(8.2.2a)
with (8.2.1), n(n) being the vector of components n k (n) s u c h t h a t component C k is present in the node n balance, further
s e S"
Z_ C~j mj = 0
(8.2.2b)
J~Js m
where J~ = Js u {j~ } is the set of arcs incident to splitter s, see (4.2.9 and 10), further s e S" y~?- y{ = 0
(j e J~, k = 1, ..., K)
(8.2.2c)
Material and Energy Balancing in the Process Industries
214
and having partitioned the set J into J' (arcs incident to some splitter) and Ju = J - J' according to (5.2.2 and 3), further conditions are K
J e Ju "k__E1YJ = 1
(8.2.2d)
and K
se
S: Z y ~ s = l ;
(8.2.2e)
k=l
the additional conditions read J
~ Ju"
Y~, = 0 for j ff
(k = 1, ..., K)
(8.2.2f)
Ek ( k = 1 , . . . , K )
(8.2.2g)
Ek
and se
S:yJk~ - 0 f o r j ~
Indeed, from (8.2.2e) and (8.2.2c) follows also (4.5.2d) for any j ~ J', and from (8.2.2g) and (8.2.2c) follow also the additional conditions (4.2.14) for j ~ J', because j~ ~ Ek if and only if Js c F_~. Then in (4.5.1), y~ = 0 if i ~ ~ . Recall that each Eq.(8.2.2a) represents K(n) - R o (n) (linearly independent) scalar equations, where R0 (n) is dimension of the reaction space in node n (Ro = 0 in a nonreaction node), and K(n) is the number of components present in the node n balance; see the commentary to (4.3.16), and also Remark (i) at the end of this section. We designate again I MI the number of elements of set M. The number of the scalar equations equals M=
Z
n~T u K
(K(n)-Ro(n))+ IsI + g ~
IJsl + IJul § Izl
K
+ X I J u n ( J - E k)[ + X k=l
s~S
X ]{j~} n(J-gk)]
k=l s~S
;
(8.2.3)
the sophisticated notation in the last sum means, for each k, summation of terms equal to 1 over such splitters s for which j~ ~ J-Ek thus Js ~ Ek, while if j~ ~ then the term equals zero. The number of variables (mass flowrates and mass fractions) equals N = (K + 1) lJ[ .
(8.2.4)
Observe that we thus formally regard as variables all the mass fractions, even if some of them are put equal to zero by the condition YJk= 0 for j ~ J - ~ , which
Chapter
8 -
Solvability and Classification of Variables II- Nonlinear Systems
215
is a consequence of the conditions (8.2.2c,f,g). The convention facilitates the formal analysis. Let us designate k - 1, "" , K:
mk
(n) = M k n k (n)
--
(8.2.5)
~, CniY~mi i~F~
and i m k --
y~ m
(8.2.6)
i
(mass flowrate of component Ck in stream i). Then, by (8.2.1)
k = 1, ..., K: m k (n) - - E
Cni m ki .
(8.2.7)
i~ E k
The case when J-F_,k ~: O in (8.2.3), thus when some component Ck is absent in certain streams by an a priori technological assumption, complicates the solvability analysis of complex reacting systems. Of course it can be assumed that the technological requirements are formulated in the manner that the system of balance equations is solvable. But it is not easy to find some general criteria of solvability used in the mathematical analysis. We shall not attempt to give a complete answer to the problem. Let us only analyze the case that will be regarded as 'regular'. Let us begin with a simple example. Let the technological system be a sulphuric acid plant as in Section 4.6, G its graph according to Fig. 4-2. Let Ck be sulphur dioxide; the subset Ek of streams is the set E 5 in (4.6.1). Restricting the graph to the arcs j e E k , we have subgraph G k [N, E k ]; N is the set of nodes, node n = 0 (environment) included, thus Gk is
J A2
AI
node 0
G Fig. 8-5. Subgraph Gk for sulphur dioxide
We see that G k contains isolated nodes D, S1, and $3. The remaining nodes and arcs form a connected graph, say G k [N k , E k ]. The subset Juk = Ju n E k is the set of arcs not incident with any splitter and containing component C k . Restricting
216
Material and Energy Balancing in the Process Industries
G k to arcs Juk and deleting the splitters makes the subgraph Guk of G k disconnected.
.-I "1
R nodes Nk'
A2
,,- node 0
nodes Nk~
Fig. 8-6. Subgraph Guk for sulphur dioxide
The subgraph Guk has two connected components; the component Nk 1 contains reaction nodes (B and R), N~k contains the environment node. The reader can himself make the reduction (restriction to E k and deletion of splitters) in the case when C k is sulphur trioxide. According to Fig. 4-2 and the list (4.6.1), he will find node S1 isolated in the first step, in the second step N~ = {B,R} and N O- {D, A1, A2, 0} (stream 13 connects D with A2). If C k = 02 or N 2 , N~ and N Owill be the same as in the preceding example (with different structures of the subgraphs), while if C k = H20, Guk will remain connected and contain the node 0. Finally if C k is elemental sulphur then Guk has nodes 0 and B, and is connected. Alas, the scheme is simplified, for example concerning the flow scheme of water and acids. Adding further streams and splitters, it can happen that the decomposition of Guk will comprise more components. Let us now try to generalize. Let again G [N, J] be the original graph, Ck some chemical component, and ~ the subset of streams as above. S is again the set of splitters, J' the set of streams incident to some s ~ S, and Ju = J - J'. We have the partition m
m
J' = w Js where Js = Js u {Js } s~ S
(8.2.8)
according to (4.2.9 and 10). Let (k = 1, ..., K) Juk = Ju ~ Ek
(8.2.9)
and Sk: set of splitters s ~ S such that j~ ~ E k
(8.2.10)
m
hence also Js c Ek; S k is thus the set of splitters where component C k is present. Then, in (8.2.7)
Chapter 8 - Solvability and Classification of Variables H. Nonlinear Systems
m k (n)
---
E
i Z Cni m k -
ie Juk
Z
_
se Sk je Js
Cnj m~, .
217
(8.2.11)
If j s Js, let us designate (splitting ratio) %
%
(0 < % < 1 )
(8.2.12)
%8 assuming of course mjs > 0. The inequalities follow from the splitter balance mj~ = E mj (mj > 0), and we have j~J~
Z % = 1.
(8.2.13)
J~Js
According to (8.2.6) with the condition y]s - y~, for j e Js, we have for s ~ S k 9m~, = ctj m~,~
(J ~ Js ) .
(8.2.14)
1 3 j - % i f j ~ Js 9
(8.2.15)
Let us define, for J ~ Js'gj = 1 ifj-Js, Then (8.2.11) reads
n~
m~s
]~ Cni mki - s ~ S T u 9, i n k ( n ) --_ i~J~
(8.2.16)
J~Js
where o f c o u r s e Cnj = 0 if node n is not adjacent to splitter s (not endpoint of any j ~ Js ), and Cnj 4 : 0 for arc j whose n is endpoint; then (see Fig. 4-1) Cnj~ = - 1 if n (~ T, ) is endpoint of Js, Cnj -- 1 if n is endpoint of j ~ J~. We shall now formulate
8.2.2
Additional hypotheses
Let us introduce the factor (subgraph) Gk [N, Ek] of G. It contains generally isolated nodes. If node n is isolated in Gk then component Ck is absent in the adjacent streams; thus mk (n) = 0 if n is isolated in Gk
9
(8.2.17)
218
Material and Energy Balancing in the Process Industries
In fact, such mk (n) does not occur in the balances (8.2.2a). Inthe (full) incidence matrix of Gk, the n-th row equals zero as n is isolated. Let N k be the remaining set of nodes. We shall a s s u m e m
0 ~ Nk (k = 1, ... , K)
(8.2.18)
hence the environment node (denoted by 0) is not isolated in G k , thus any Ck is present at least in one of the input or output streams. The hypothesis is not quite trivial. It can happen that Ck is some intermediate product that arises in some reaction node and is again fully consumed in other reaction nodes. In that case, one would expect that there were an inventory of the intermediate product. But in our steady-state models, wehave included the inventories in the environment node, thus we have still 0 ~ Nk. This assumed, deleting the isolated nodes we have subgraph Gk [Nk, Ek ] of full incidence matrix I
I
graph G,~
I I
I
J,,k
]
J'c~ Ek
:
Nuk
I I I -
Nk
Sk
Fig. 8-7. Full incidence matrix of general Gk
where the void field is zero. The void field in the left lower part of the figure_is due to the fact that the arcs of Ju, thus a fortiori Juk are none of the arcs j ~ J~, whatever be s ~ S. See (8.2.9 and 10). We thus can restrict Gk to the arcs j e Juk and nodes n ~ Nuk = N k - S k , and we have subgraph Guk [Nuk, Juk ] with 0 ~ Nuk. Generally, Guk is not connected. Let Gluk be the/-th connected component, of node set N~ and arc set Jluk. We thus have the partition L k
Nuk = N~uk ~9 l--~N~ where 0 ~ N~k
(8.2.19)
(one and only one of the components contains the environment node); thus Lk+ 1 is the number of connected components (Lk = 0 means that Guk is connected).
C h a p t e r 8 - Solvability and Classification of Variables H- Nonlinear Systems
219
Summation over n e Nk~ in (8.2.16) yields, for
I_>1"(0+) E ( Z
Z CnjBj
se Sk \ je]'s ne N~
m~,s + Z m k(n)-0 neN~
(8.2.20)
because the sum of rows of the incidence matrix of a graph equals zero; here, Cni for n E N~ and i e J~k (C Juk ) are just the elements of the full incidence matrix of G~uk.Conceming the node n = 0, the summation only determines m k (0) by the remaining terms in Eq. (8.2.20), and is of no use (no balance of node 0 is set up). Hence Eq. (8.2.20) is relevant for l > 1, if L k > 1 thus if Guk is not connected. In that case, and in the above manner the integral reaction rates (occurring implicitly in m k (n)), splitting ratios otj (8.2.15), and component mass flowrates m~,~through the splitters are interrelated due to the a priori assumed absence of some components in some streams. Let us precise the point. Recall the observation after formula (8.2.16). In the inner double sum in (8.2.20), given s ~ Sk the summation concerns only nodes n adjacent to node (splitter) s via some arc j e J~. It can happen that for some l > 1, none of the nodes s e Sk is adjacent to any n e N~. This, however, means that even before deleting the splitters, no node n e N~ was connected by a path with any node n' ~ N~, because it is just the arcs j e Js (s e Sk ) that have been deleted. Then also the graph G k [N k , E k ] contains at least two connected components, one of them being a subgraph of node set N~; see Fig. 8-7 and imagine a subset of rows (~ 0) empty in the columns J' n Ek, and with just two nonnull elements in any column of J~,k (incidence matrix of G~k ). Then the sum over Sk in (8.2.20) equals zero and we must have, in case of u
1 > 1, Glukconnected component of Gk" ]~ .mk(n) = 0 . neN~
(8.2.21)
This means that the linear system (8.2.20) in variables m~,, is not generally solvable, unless the condition (8.2.21) is satisfied identically. If so, the condition (8.2.21) is added to the equations (8.2.2a). The case is conceivable but again, one feels thatthere is something wrong in the model. We then cannot have Gu~kas an isolated node in ~ [Nk, Ek ] because in that case, it would have been deleted already by the construction of Gk from Gk [N, Ek ]. Thus Ck is again an intermediate product in a subsystem, as above. We shall not examine this case and instead, we shall
Assume that n
Gk [Nk, Ek] is connected (k = 1, .-., K) .
(8.2.22)
Here, Gk is the subgraph of G k according to Fig. 8-7, comprising all the arcs j e Ek.
220
Material and Energy Balancing in the Process Industries
Then in particular for each 1 > 1 in (8.2.20), some splitter s ~ Sk is adjacent to some node n ~ N~, unless S k is empty. But in the latter case, Gk [Nk, Ek ] = Guk [Nuk, Juk ] (nothing deleted), hence also Guk is connected by hypothesis, hence L k - 0 and we have no condition (8.2.20). Let again Lk > 1. With the above observation, the inner double sum in (8.2.20) equals, for any s ~ S k
s.s .s J--J``
where n s is the non-splitter endpoint of j``, n i that of j e Js, and e(J's ) = 1 if n`` e N~, else zero (8.2.23) e(j)= 1 ifn ie N~,elsezero. Thus recalling again the observation after (8.2.16), with (8.2.15), the sum equals
(say) 7., = - e(j``) + ]~ e(/')% j~J``
(s e
SO
(8.2.24)
given k and I thus N~ in (8.2.23). Thus Eq.(8.2.20) reads
(8.2.24a)
]~ ],``m ~ + ]~ m k (n) = 0 . se Sk ne N~
Let us examine the coefficients (8.2.24), generally dependent on the ratios %. If the splitter s is 'inside' of the subset N~, of nodes, thus if all the adjacent nodes are elements of Nk~ then
(8.2.25a)
7`` = -1 + ] ~ otj = 0 j e Js according to(8.2.13). Else either n`` e N~ but not all nj e N~, then -1 < ~'s < 0
(8.2.25b)
because the incomplete sum of otj over Js is > 0 but < 1 or
n s ~ N~k but some nj e N~, then 0 < ~,``< 1
(8.2.25c)
or
n s ~ N~. and nj ~ N~ for any j, then in the latter case, however, But if it were only the first above, Gk would again not must take place for some s
~,``= 0;
(8.2.25d)
some of the preceding three cases occurs for another s ~ S k . case (all splitters 'inside') then, by the same consideration as be connected. Thus, in fact some of the cases (8.2.25 b or c) ~ Sk, given l > 1" hence some ~'s * 0 for any l > 1.
C h a p t e r 8 - Solvability and Classification of Variables H- Nonlinear Systems
221
i
Assuming L k > 1 and l > 1, let thus S~ be the nonempty subset of S k , of elements s adjacent to some n 9 N~ and some n'~ N~ (thus Ys * 0), and let us generally write ~k for any k = 1 , . . . , K and 1 < l < Lk. We thus have, for m
(8.2.26)
s 9 S ~ ' - I _< ~k < 1 and ~k r 0 m
while ~k = 0 if s 9 S k - S~. For s 9 S~, we have one of the two possibilities (8.2.25 b or c). According to (8.2.24a), Eq. (8.2.20) reads (for k = 1 , - . . , K) Z Y~km~s+E m k ( n ) = 0 seSm, neN~
(8.2.27)
(1 < l < ~ ) .
The coefficients ~,, = ~sk are functions (8_.2.24) of the ratios aj obeying the condition (8.2.13); we have [Js [ > 2. For any l, as S~ ~ ;O, we have some ~sk ~ 0 by (8.2.26).
The Lk equations (8.2.27) are linear in the IS k ] variables m~, and of rank < ~ . They are not homogeneous unless the sums over N~ equal zero. We shall not examine their solvability in general; generally, they impose certain restrictions on all the variables, mk (n) and % included. We shall limit ourselves to the case when they are solvable in the variables mikef o r any k = 1, ..., K such that L k > 1; if L k = 0 (Guk connected), the condition (8.2.27) is absent. More precisely: Recalling (8.2.24) where (given k and l) y~ stands for ~k, let us introduce the matrices k = 1, ..., K" Gk = (~k) with rows 1 = 1, ..., Lk and columns s ~ S~ (8.2.28) (for some given order in each S k ). We then assume that all the matrices are of full row rank, thus rankG k = L k (k = 1,-.., K)
(8.2.29)
whatever be the splitting ratios (xj [obeying (8,2.13)] in some intervals admitted by the technology. This clearly implies
Lk < I Sk [
(8.2.29a)
as a necessary condition for (8.2.29). Denoting by mk: the/_q,-vector of components Z
n~N~
m k (n)
(l = 1, ... , L~ )
(8.2.30)
and by Uk" the [ Ski-vector of components m j~ (s ~ S k)
(8.2.31)
222
Material and Energy Balancing in the Process Industries
the system (8.2.27) reads Gk Uk + mk = 0
(8.2.32)
with (8.2.28) and (.8.2.24) where 7~ stands for ~sk. The hypotheses can be verified as follows. Let k = 1, -.., K (component C k ). (a)
Identify the subgraph Gk [Nk, Ek ], restriction of G to the streams j ~ Ek containing component Ck
(b)
Delete the isolated nodes of Gk" get subgraph Gk [Nk .Ek ]; verify if Gk is connected and if 0 ~ Nk. If so then
(c)
Partition the node set of Gk into the subset Sk of splitters, and the subset Nuk of non-splitters (including the node environment)
(d)
Delete the arcs of E k incident to splitters, and the splitters s ~ Sk; the subgraph Guk is of node set Nuk
(e)
Decompose Guk into Lk+l connected components Gluk (l = 0, ..., Lk ); if Lk = 0 then stop. If Lk > 1 then
(f)
Identify the node sets N~ (1 < l < Lk) of G~k, while N Ois determined as the node set containing node 0 (environment)
(g)
Identify the arcs j~ and j ~ Js incident to splitters s ~ Sk, where Js is the input stream to s, and find the other endpoints n s of Js and nj of j ~ Js
(h)
Identify the coefficients e by (8.2.23) (l = 1,---, Lk ) and
(i)
Taking some admissible values of the splitting ratios % (8.2.12) obeying (8.2.13), compute the coefficients ~k denoted as ~/~ in (8.2.24), for l = 1, -.. ,Lk and s ~ S k Identify matrix Gk (8.2.28)
(k)
Identify the rank of G k (e.g., by Gauss elimination), and verify the condition (8.2.29).
Recall that if, in step (e), Lk = 0 then Guk is connected and there is nothing more to verify; the equation (8.2.32) is absent.
Chapter 8 - Solvability and Classification of Variables II- Nonlinear Systems
223
Because Gk as function of the t~j is continuous, if its rank is maximum at some special values of the % then it is such at least in some neighbourhood of the values.
In certain cases, the hypothesis (8.2.29) can be verified directly. Let for instance L k = 1 as in the above example (sulphuric acid plant). Then Eq.(8.2.32) thus (8.2.27) for 1 = 1 reads Z ]'~km~,~ + Z m k (n) = 0 s~S k n~N~
(L k - 1)
(8.2.33)
where some 7~k, according to (8.2.26), is nonnull whatever be the splitting ratios ctj. Thus clearly, the rank equals 1 - L k and some m~,~ can be expressed as (infinitely differentiable) function of the sum over N~ in (8.2.33), splitting ratios t~j, and the other flowrates mJk~(t ~ S, t ~ S k ), if there are any. Indeed, we then have
mJs
--
_
'~slk
t~S ')(:k mJt + ]~ mk (n)) n~N~ t-4:s k
(8.2.33a)
where the ?-coefficients depend generally on the txj. Going back to Figs. 8-5 and 8-6 (Ck = SO2 ), the whole set Sk consists of one element $2. Denoting by s the splitter $2, according to (8.2.24) We have 3'~k = -1 (+ 0) = -1 and Eq.(8.2.33) reads m~ = m k (B) + m k (R) where, according to Sections 4.1 and 4.2, m k (X) equals the integral production rate of Ck by the chemical reactions in node X; in the present case the sum represents SO2 produced by burning in B minus that consumed by conversion in R. Clearly, it must equal the inlet mass flowrate of SO2 into $2. As an exercise, the reader can set up the balances (8.2.33) for the other chemical components according to the list (4.6.1) and Fig. 4-2. For Ck = N2, one will in addition set mk (n) = 0 in (8.2.33), because nitrogen is (assumed to be) nonreacting. For Ck = H20 (or S), Guk is connected (Lk = 0) and no condition (8.2.32) is formulated.
224
Material and Energy Balancing in the Process Industries
8.2.3
Independent variables
The condition (8.2.29) is not a necessary condition of solvability. Only we have limited ourselves to the cases where it is obeyed as a structural property of the graph, with the choice of the sets E k . If so, our solvability analysis can continue. _
Let us have verified the condition (8.2.29) at some special values of the o~j; then, at least in some neighbourhood of the special values, there exists a subset of columns of Gk that are linearly independent, in number ~ = rankGk. Rearranging appropriately the columns of G k , thus the components of vector Uk (8.2.31) on which the matrix operates, thus in fact the splitters s e Sk, if Uk(S) = m~, Sk = I Skl, s = 1, ..., Sk
(8.2.34)
then the vector Uk is partitioned
uk =
(8.2.35) Vk
} Sk- L k
where the first 4 components correspond to the linearly independent columns; vector Vk is absent if Sk = ~ . Accordingly, matrix Gk is partitioned
Gk = ( G~,, G~ ) Lk
(8.2.36)
Sk-L k
where G~, is L k • ~ regular, and Eq.(8.2.32) is equivalent to G~u~ + G[.' v k + m k = 0 thus to
(8.2.37)
u~ = - G~ l (GkVk + m k ) .
Thus if v k , thus the last Sk- Lk components Uk (S) = m~ are arbitrary, and if the L k components (8.2.30) of mk, thus also if the mk (n) for n e Nuk (8.2.19) are arbitrary then u~, thus also the whole vector Uk (8.2.35) is an (infinitely differentiable) function of the Sk- Lk variables m~,,, of the mk (n), and (via Gk ) of the splitting ratios ~j subject to the conditions (8.2.13) and otherwise arbitrary in a (multidimensional) interval. In addition, by (8.2.14), the remaining m~ (j e Js) are thus also functions of the above variables. Thus in the whole subsystem formed by splitters s e S k and the incident streams j e Js, the vector n
Wk of components mJk (j e Js, s ~ Sk )
(8.2.38)
is an (infinitely differentiable) function of the Sk- ~ components of Vk, of the mk (n) (n ~ Nuk ), and of the otj, say
225
C h a p t e r 8 - Solvability and Classification of Variables H- Nonlinear Systems
(8.2.39)
wk = Fk (Vk, mk, or)
where o~ stands for the composed variable, say vector of components % where j ~ Js and where for each s, one of them has been eliminated by the condition (8.2.13). Recall now Eq.(8.2.16). Given k, we have decomposed graph G,k into connected components G~k (l = 0,-.. , ~ ), of node sets N~. If Lk > 1 then by the summation over n ~ N~, we have eliminated one equation for each N~ (l > 1). For l = 0, instead of such elimination we have simply considered the equations only for n , 0. Thus for each connected component, we have I N~I-1 equations left; they are, with (8.2.14), equivalent to the equations (8.2.11), considered each for n ~ N~ without the eliminated one thus in number ] NLI-1, 1 = 0,--., L k . Restricted to streams (arcs) i ~ Jluk(arc set of Guik), for each I the rows of (Cni) in number I NLI-1 constitute the reduced incidence matrix (say) C~k of connected graph G~uk, hence the matrix is of full row rank. In the same manner as in (8.2.35-37), we can identify some ([ N i l - 1 ) x (] N~ I -1) regular submatrix. Instead of m k in (8.2.37) we now have, for each I, the vector (say) m kI of I NLI 1 component s mk (n), n e N~ (minus the deleted reference node). Let us designate P~ = I N~I - 1
(l = 0, ..., L k)
(8.2.40)
and R~ = [ Jluk ] - P~
(8.2.41)
further
(8.2.42)
i i 6 Jluk Zk, . vector of components mk,
It can, however, happen that some of the G~uk is an isolated node. Then I Jluk I = 0 and I NLI = 1, thus PL = eL = 0 and the subvector z k1 is simply absent. With this exception, there then exists a partition
,
,
Xk
} Rk
0 = o , .-. ,L~)
(8.2.43)
such that the corresponding P~ x P~ submatrix of C~ukis regular, thus such that y~ is an (infinitely differentiable, in fact linear) function y~. = Z~ (x I , w k , m kI )
(8.2.44)
1. recall (8.2.38). Then also (having added the identity x k1 = x k1 ) the whole whatever be x k, vector zki is such function. Now mki is subvector of vector
(8.2.45)
ffak of components m k (n), n e Nuk - {0} where node n = 0 does not occur, and let us introduce the composed vectors
Zk --
and x k l=0,...
~
1
(8.2.46)
Xk
l=O,
... , L k
226
Material and Energy Balancing in the Process Industries
But because the union of subsets J~k is a partition of Juk ,in fact Zk is vector of components mk,i i e Juk"
(8.2.47)
the selection of the x kl depends, however, on the connected component and its incidence matrix. On the other hand, the vector m k (8.2.30) is linear function of the mk (n), n e Nuk - {0}, thus of vector m k . Thus finally, by combination with (8.2.39) we have m
u
(8.2.48)
Zk= Z k(Xk, Vk, (X, m k)
(where Zk is infinitely differentiable). The vector z k is column vector of I Jukl components. The dimension of Xk is
~e~=
/=0
~lJ~kl-
/=0
~ I N ~ I + t k + 1 = IJ~kl - INukl +Zk + 1
/=0
and the dimension of Vk is Sk - ~ ; recall (8.2.35). Hence
xk ) is a (I Juk I +Sk-[ Nuk I +l)-vector
(8.2.49)
Vk of variables (component Ck mass flowrates) m~,, appropriately selected in the set of streams j ~ E k . The result (8.2.48) holds true for any k = 1,-.. , K. Let us now consider the components mk (n) where k = 1, ... , K(n), and n e T, (set of non-splitters). Here, for convenience, we have re-numbered (given node n) the components present in the node as written. Now for any n, the K(n) components mk (n) are subject to the condition (8.2.2a) with (8.2.5), with full row rank (K(n)-Ro(n)) x K(n) matrix D(n). There remains again to select, for each n, certain (K(n)-Ro (n)) linearly independent columns of D(n) and having possibly re-ordered the columns, thus also the components n k (n) of n(n), we have the partitions
n(n) =
n'(n) ] } K(n)-Ro(n) n"(n) } R o (n)
and D(n) = (D'(n), D"(n))
(8.2.50)
from where n' (n) = - D' (n) "1D"(n)n"(n)
(8.2.51)
hence each of the K(n)-Ro (n) components of n'(n) is linear combination of the R 0 (n) remaining components. Having again added the identities n k (n) = nk (n) for the latter R 0 (n) components, we find that each nk (n) (k = 1, ... , K(n)) is linear combination of the R 0 (n) components of n"(n), with constant coefficients. Clearly, the subset of the last R 0 (n) components of n(n) is empty if the node is nonreaction, in which case n'(n) = n(n) = 0. Multiplying each n k by M k according to (8.2.5), we have m k . To the subvector n"(n) thus uniquely corresponds certain m"(n) of R 0 (n) components. Hence each mk (n) is a linear combination of the R 0 (n) components of m"(n), with constant coefficients determined uniquely by matrix D(n) and the choice of the partition. This holds true for any node n ~ T u . Let us introduce the composed vector
Chapter 8 - Solvability and Classification of Variables H- Nonlinear Systems
m" =
227
(8.2.52)
m"(n) n~ T u
Thus in the total, each m k (n) (n ~ T u , k = 1, .-. , K(n)) is a given linear combination of the components of m". Rearranged in another order, the mk(n) constitute vectors m k (k = 1, ... , K) in (8.2.45), where Nuk - {0 } c T,. Hence also the components of each ffak are the above linear combinations and the latter can be substituted for 1~k . Considering the totality of the relations (8.2.48), we first introduce the composed v e c t o r
Z
(8.2.53)
"-
k=l,...,K For each k = 1, .-., K, in z are comprised just the components m ki w h e r e i E Juk = Ju ('~ E k , thus where component Ck can be present. We then introduce the composed vectors
X =
and v =
Xk
Vk
k=l,...K
(8.2.54) k=l,...,K
Further, taking certain ]Js l-1 ratios % in each Js (s E S), the remaining one is determined. Let the former % constitute vector a. Then, finally, we obtain some (by the construction unique) function Z (infinitely differentiable) such that
(8.2.55)
z = Z(x, v, a , m " ) . Here, by (8.2.49)
(x /
is of d i m e n s i o n
V
g
[Juk I
k=l
+ ~: Is~lk=l
~: INu~l +K k=l
(8.2.56)
further
a is of dimension s
[Js[ - I s I
(8.2.57)
R 0 (n) .
(8.2.58)
s~ S
and
m" is of dimension s
n~ T u
228
Material and Energy Balancing in the Process Industries
The whole vector argument in (8.2.55) is thus of dimension K
o:g+
X(IJu~l
k= 1
+
Is~l)- ~ INu~l + x I J s l - I s I + x e0(~) k= 1
s~ S
n~ T,
(8.2.59)
where Juk = J, n Ek, S k is the set of splitters s such that Js e ER, see (8.2.9 and 10). Further Nuk is the node set of subgraph Guk, see the text before (8.2.19). It is thus the subset of nodes n e Tu u {0} incident with streams j e Juk, node 0 included. By (8.2.55), wehave determined the vector z of mk, i e Juk, k = 1, ... , K. In i
addition, also the m~, (j e Js, s e S k ) are determined as w k by (8.2.39), thus finally again
by the variables occurring in (8.2.55). Hence introducing the composed vector
w =
wk
(8.2.60)
k=l,...,K we can writeas well w = W (x, v, o~, m")
(8.2.61)
for some uniquely determined (infinitely differentiable) function W. In the total, the function r
F =
/z 1 W
(8.2.62)
determines the whole vector of c o m p o n e n t mass flowrates.
8.2.4
Degrees of freedom
Our intermediate result can be summarized as follows. W e have, by graph decompositions in the subgraphs G k of G restricted to streams j ~ ~ where c o m p o n e n t Ck can be present, selected certain special parameters (in n u m b e r D), such that the component mass flowrates m~, are determined as (infinitely differentiable) functions of the parameters. It is the vector function denoted as F in (8.2.62) with (8.2.55 and 61). W e have not explicitly written the function, we only k n o w that it is uniquely determined by the structures of the graphs G k , by the assumed reaction stoichiometries, and by the (not necessarily unique, but not arbitrary) selection of the parameters. W e have assumed c e r t a i n c o n d i t i o n s for this kind of solvability. The graphs are successively d e c o m p o s e d and the conditions verified by the procedure (say) P described in points (a)-(k) following after (8.2.32).
Chapter 8 - Solvability and Classification of Variables H- Nonlinear Systems
229
The group (say, vector) of parameters in (8.2.55) is selected in the following manner. Let first k be fixed. Then (a)
One identifies vector Uk of component mass flowrates (8.2.34), thus inlet mass flowrates of Ck into the splitters where Ck occurs, and by the partition (8.2.35), one selects subvector Vk as described, further
(b)
In the ultimate decomposition into subgraphs G~k by P:(e), J~k is the arc set of Gluk. In each (nonempty) J~k, one identifies vector Zkl of component mass flowrates (8.2.42) in streams not incident to splitters and, by the partition (8.2.43), one selects subvector x~ as described; note that for different l, the corresponding sets of flowrates are two-by-two disjoint. Then
(c)
By composition, one identifies vector x (8.2.46).
Now, in the totality of k = 1, .--, K (d)
One forms composed vectors x and v (8.2.54) of selected component mass flowrates; note that by different k, also the components of x and v represent different variables.
Then (e)
One identifies vector (or simply group of variables) ~ of independent splitting ratios % (thus eliminating one for each splitter by (8.2.13)), with the only condition of lying in a (multidimensional) interval, thus in a neighbourhood of the values used in P:(i).
Finally
(f)
For each node n ~ T u one partitions the vector n(n) according to (8.2.50), where n'(n) uniquely corresponds to some selected subset of linearly independent columns of D(n), and n"(n) is the remaining subvector, selected in this manner and further recalculated in terms of mass flowrates to m"(n) according to (8.2.5), and
(g)
One forms composed vector (8.2.52) of selected parameters m k (n).
The selections (a)-(g) determine the whole vector of parameters occurring in (8.2.55 and 61). Their total number is D (8.2.59). Now whatever be the values of the parameters, by (8.2.55 and 61) the vectors z (8.2.53) and w (8.2.60) are uniquely determined. The vector z is
230
Material and Energy Balancing in the Process Industries
composed of subvectors z k (8.2.47), each of them being that of component Ck mass flowrates for streams i ~ Juk, thus for streams not incident to the splitters and such that the presence of component Ck is admitted in the streams. The vector w is composed of subvectors Wk (8.2.38), thus of component mass flowrates through the splitters. Hence the vector composed of z and w is that of all component mass flowrates m~ (j ~ J) that can be nonnull. Given these m~,, recalling (8.2.6) we determine also, for any K
j ~ J: mj =
kZ=lm~,
(8.2.63)
where the summation is, in effect, over such k that j s Ek; we complete formally the definition of m~, by m~ = 0 i f j
~ Ek .
(8.2.63a)
In other terms, we can use the formula (4.5.10) with (4.5.5). Because each j is present at least in one ~ , mj is determined and we can expect mj > 0. We then determine also the mass fractions
yJ=,
(8.2.64)
% obeying clearly K
Z y~ = 1.
(8.2.65)
k=l
In the function F are also hidden the equations (conditions) (8.2.14) with (8.2.13) made use of in the construction. Thus, by (8.2.63 and 64), for J ~ Js" mj = ffj kEmJs = ~j mjs
Y~ _ ctj m~,~ = Y~
(8.2.66)
(8.2.67)
%mjs and
Z% =%s
j~J~
"
(8.2.68)
Chapter 8 - Solvability and Classification of Variables II- Nonlinear Systems
231
The choice of the aj has been subjected to the condition (8.2.12), hence mj~ > 0 makes also mj > 0. In this manner, all the 'primary' process variables occurring in the original set of equations are uniquely determined by the D parameters introduced by (a)-(g) above. Compare with the modified system (4.5.7)-(4.5.11). It is also physically clear that with a realistic choice of the parameters, we shall have indeed mj > 0 for all j ~ J. From the mathematical viewpoint, the case where some mj = 0 is possible; such point in the variables space is then 'singular', as Eq.(8.2.64) is not solvable, or has an infinity of solutions if also m ~ - 0. We shall not attempt specifying formal conditions precluding this possibility. One can say that the D 'independent parameters' represent certain D 'degrees of freedom'. Let us precise the point. Let us conversely have some solution of the system (8.22) with (8.2.1) in the variables mj and y~, (j ~ J, k - 1, .-. , K). Let us assume mj > 0 whatever be j e J
(8.2.69)
(precluding thus possible singular solutions). Then, by (8.2.66) %_
mj
(j E Js)
(8.2.70)
mj~ thus in particular the selected parameters % in (8.2.55 and 61) are uniquely determined. Further~ by (8.2.64) m~ = y~mj (j ~ J, k = 1, ..-, K)
(8.2.71)
thus in particular the selected vector parameters x and v in (8.2.55 and 60), composed of certain component mass flowrates, are uniquely determined. Finally, according to (8.2.7) we find the mk (n), thus in particular the vector m" (8.2.52) in (8.2.55 and 61) is uniquely determined. Consequently, the assignment of the N variables mj and y~, (8.2.4) to the D parameters (8.2.59) by (8.2.55 and 61) with (8.2.63 and 64) is one to one and bicontinuous (continuous along with its inverse; in fact infinitely differentiable). In this manner, the set (say) M of solutions is parametrized. Compare with the parametrisation of a straight line such as (7.3.6), or (in mathematical idealisation) of a territory on Earth's surface by geodetic coordinates (0, q0). Also in the latter case, the parametrisation is conventional (not the unique possible); for instance the zero meridian (q~ = 0) was chosen by convention. In addition, for example North pole is not uniquely assigned the q0-coordinate; also above (8.2.70), the points where mj = 0 (j e Js, thus also mjs = 0) are not uniquely parametrized.
232
Material and Energy Balancing in the Process Industries
If some parametrisation is possible, and if the set is, in certain mathematically precise sense 'smooth' then the set is called (differentiable) manifold; in the cases considered here, it is a 'submanifold' of an 'ambient space'. For the above set M of solutions, the ambient space is R N, phYSically interpreted as the N-space of mass flowrates mj and mass fractions y~,; see (8.2.4). The number D (8.2.59) of parameters is called dimension of Yff, which is a mathematically precise expression for the 'number of degrees of freedom' for the solutions of a set of equations. The proof that the set 9V/chas the required property of'smoothness' is, however, quite nontrivial. The proof is too technical to be reproduced here in detail. One has to show that the matrix of partial derivatives (Jacobi matrix) of F (8.2.62) is of full column rank D. One makes use of the fact that at constant a in (8.2.55 and 61), F is linear, and using the construction of F, that F(x, v, ~, m") = 0 implies x = 0, v = 0, and m" = 0 whatever be in the admissible region; hence the linear map (F restricted to variables x, v, m") is injective, hence the corresponding submatrix of partial derivatives is of full column rank. One then considers, in F, the rows of W (8.2.61) corresponding to the equations (8.2.14), thus m-~ = aj m~s 0" ~ Js ); by the differentiation, one obtains the corresponding rows of the Jacobi matrix. For any such row, thus for any (k, j) where j ~ Js, one multiplies by c~j the m~-row of the Jacobi matrix of W, and subtracts from the former; one considers only I Js l-1 elements j~ Js for each s as corresponds to ] Js 1-1 independent splitting ratios c~j in the subset Js of streams. One finally selects certain rows such that the corresponding submatrix in the a-columns is diagonal, of elements m~s r 0 for an appropriately selected k. This is possible under the condition mj~ > 0 whatever be s ~ S
(8.2.72)
One concludes the first part of the proof by proving that the Jacobi matrix is of full column rank. The second part of the proof makes use of the equations (8.2.63-65) transforming the variables m~ to mj and y~, under the condition (8.2.69), which implies in particular also (8.2.72). In mathematically precise language, the latter transformation is called 'diffeomorphism of manifolds', and it shows that our Yd is, in fact, a submanifold of the intersection of hyperplanes (8.2.65) over j e J.
Let us also observe that all the functions considered above are not only infinitely differentiable, but 'analytic'. Mathematicians know the precise meaning of the concept; for the reader it suffices perhaps to consider functions composed of elementary functions he knows from practice. Thus 914is, in fact, an 'analytic manifold', an expression used in Section 4.5, before-last paragraph. Before summarizing the final results, let us show that the set of equations (8.2.2) with (8.2.1) is, in certain sense, 'regular', on precising the sense; the ultimate precision follows in Section 8.4.
233
C h a p t e r 8 - Solvability and Classification of Variables H- Nonlinear Systems
Let us give another expression to the number D (8.2.59). We have the partitions
(8.2.73)
k = 1, ..., K: Nuk = (N,k n T , ) u {0}
into the set of non-splitters n ~ T u contained in N,k, and the one-element set {0} (node environment), because 0 ~ Nuk for any k according to (8.2.19). Hence
K-Z k=l
IN.~I =-
~(INu~nTul
+ 1)-K)
k=l
and denoting
(8.2.74)
N~,k = Nuk n T u we have K
K-
Z k= 1
I Nu~ I =- ~ I N;k I 9
(8.2.75)
k= 1
Here, N'uk is the set of non-splitters n e T, such that component C k occurs in the node n balance. Let us introduce the numbers 5(n, k) where n ~ T u and k - 1, ..., K, such that 8(n, k) = 1 if Ck occurs in the n-th balance
(8.2.76) = 0 otherwise . In the matrix of elements 5(n, k), the number of nonnull elements equals K
z INu~l
by successive summation over columns:
k=l
Z K(n)
and by successive summation over rows:
n~ T.
where K(n) is the number of nonnull elements in the n-th row, thus of components C k occuring in the n-th balance as introduced in (8.2.3). Hence K k= 1
I N;~I = z K(n).
(8.2.77)
n~ T.
Consequently, by (8.2.59) K
D-- ~ (Ro(n)-g(n))+ Z(IL~I+Is~I)+ ~ n~ T.
k= 1
se S
IJ~l-Is
(8.2.78)
where we recall that Juk "- J, n E k and Sk is the set of splitters s e S such that Js ~ Ek thus E k . The notation is the same as in (8.2.3) Our goal is to compute the sum M + D. Because the sets Juk and Ju n (J-Ek) are disjoint, we have
Js c
234
Material and Energy Balancing in the Process Industries
IJun(J-Ek)J
+ [J,k[ = [ ( J u n ( J - E k ) ) U ( J , n E k ) [ = [ J u n J [
= [Ju[
(8.2.79)
because J, c J. We further have i
x JJ~l + Isl s~]gS [Js[ =sZSlJs u {Js}[ =s~S
because [ Us }1 = 1, hence !
xx
[J~l--KX [J~l-glsJ
s~S
(8.2.80)
seS
and since Sk is the set of s e S such that Js e Ek, while the (disjoint) union of sets {Js } n (J-E k) over s e S is equivalent to the set of s e S such that Js ~ Ek, we have
Is~l + z I {J~} n(J-Ek)J = IsI s~S
thus K
K
(8.2.81)
zls~l + z z I ~ } n(J-gk)[ --KISI"
k=l
k=l se S
n
consequently, summation of the LH-sides of (8.2.80 and 81) gives K Z [Js J, while the s~ S summation in (8.2.79) over k = 1, .-., K gives K IJu I 9Finally m
s~ S
IJsl + ILl + I s I - - ~
s~ S
I J s u {Js}l + ILl
= x IJ~[ + [Ju[ s~ S
= I JJ
(8.2.82)
Using all the numbered formulae, with summation over k in (8.2.79), according to (8.2.78) and (8.2.3) we obtain
M + D = ( K + 1)lJI .
8.2.5
(8.2.83)
Solution manifold W e can n o w summarize.
T h e set of e q u a t i o n s (8.2.2), in n u m b e r M (8.2.3) is s o l v a b l e in the i v a r i a b l e s ( c o m p o n e n t m a s s flowrates) m k ( k 1, . . . , K; i ~ J), with the substitutions (8.2.6), and w h e r e mj (j ~ J) equals the s u m (8.2.63), u n d e r the c o n d i t i o n s (8.2.18), (8.2.22), and (8.2.29); the conditions are of structural
Chapter 8 - Solvability and Classification of Variables H- Nonlinear Systems
235
character (determined by the graph G and its subgraphs G k ) and can be verified according to the points (a)-(k) following after (8.2.32). The conditions are sufficient, but have not been shown to be necessary; they only appear as plausible and not very restrictive. Basically, the conditions limit the arbitrariness in the choice of the subsets Ek (4.2.14). One then restricts the solution in the primary variables mj (j s J) and y~, (j s J; k = 1, ..., K) to the subset obeying the conditions (8.2.69) of positive mass flowrates. The primary variables are then uniquely determined by the m~, according to (8.2.63, 63a, 64), and vice versa. Then the set M of solutions has D degrees offreedom, where D is the number (8.2.78); in rigorous mathematical terms, M is a differentiable (in fact, analytic) manifold of dimension dimM= D
(8.2.84)
and a submanifold of the N-space of the variables mj and y~, see (8.2.4). We have, by (8.2.83) with (8.2.4) M +D =N
(8.2.85)
hence the number of degrees of freedom equals the number of variables minus the number of equations (constraints), as corresponds to what has been intuitively expected. In this sense, we say that the system of equations (8.2.2) with (8.2.1) obeying the above conditions is regular. The wording will be further precised in Section 8.4.
8.2.6
Remarks
(i)
It is the elimination of 'dependent' equations (constraints) that has made the system regular. Let us for instance replace the number K(n) in the K(n)-R o (n) scalar equations (8.2.2a) for some n ~ T u by the number K of all the components C k occurring in the whole system. According to Chapter 4, the balance will be again correctly written; a species C k not present in the node n balance is nonreacting in the node and does not affect the other component balances. Indeed, let us go back to Section 4.3. For a nonreacting species Ck, we have Vk~ = 0 for r = 1, ... , R, thus the k-th row of matrix S (4.3.8) equals zero. Then, in the matrix S O (4.3.10), having possibly re-ordered the components, the corresponding row equals again zero and is necessarily among the rows of matrix B. Hence n k is one of the components of vector n' in (4.3.12) and by (4.3.13) we have
236
Material and Energy Balancing in the Process Industries
nk = 0 for nonreacting Ck
(8.2.86)
as already stated in Section 4.3. By the way, we have thus shown that in (8.2.50), a nonreacting species cannot be represented by any component of vector n"(n) thus m"(n) in (8.2.52), and its balance does not represent any degree of freedom. It is only the reacting species that can do so, as they represent certain reaction degrees of freedom. If a nonreacting component Ck (such as component C 3 = N 2 in the example 4.6) is present in a reaction node n balance (see n = R in (4.6.2)) then the result (8.2.86) completes the balance. If it is not present (see C, = S in n = R above) then the result (8.2.86) is again correct. But according to (8.2.1) with Cn~ = 0 for all i e Ek, the result (8.2.86) is as well a consequence of the a priori assumption (definition of the subset Ek), as corresponds to (8.2.20. If replacing the K(n)-Ro(n) scalar equations (8.2.2a) by K-R o (n) equations involving also the species Ck not present we thus, in the formal scheme, generate an equation that is a consequence of the other constraints. It can be shown formally (by inspection of the above derivations) that the number D of degrees of freedom will remain unaffected. But the number M of equations will increase to (say) M' by (8.2.87)
M' - M = E ( K - K(n)) ne T~
where possibly, for some n e T u we have K(n) < K, hence the system will no more be regular; we shall have D>N-M'ifK(n) 1 we can modify the analysis applied to subgraph Guk; see Fig. 8-7 in Subsection 8.2.2. The analysis is simpler; if the reader has perused Section 8.2 in detail he will be able to find the modifications. In Fig. 8-7, we replace Juk by Ju, J' n E k by J', Nuk by T u w {0}, and Sk by S. The connected components (say) G~u (l = 0, ..-, L+l) of Gu will be of node sets N ~and arc sets J~. Now in the equation (8.3.1a), we merge the nodes in each G~o where 1 0 (j s J), possibly also by other inequalities in addition. Let z 0 s U. For an arbitrary z s U, the Taylor formula (restricted to the first degree) reads g(z) = g(z o ) + Dg(z 0 ) ( z - z o ) + d(z; z 0 )
(8.4.3)
where given Zo, d(z; z 0 ) depends on z in the manner that if the difference Z-Zo tends to zero, d(z; z 0) becomes 'negligibly small'. In fact Taylor's formula gives an exact expression to this d in terms of an integral; if dm is the m-th component then
C h a p t e r 8 - Solvability and Classification of Variables H- Nonlinear Systems
dm =
]~,Dm;vv, (zS~,v )(Z~v, )
259
(8.4.3a)
V, V
where AZv is the v-th component of z-z 0 , and Dm;vv, = Dm,v, v (symmetric) is determined (as an integral expression) by the values of the second derivatives on the line segment between z 0 and z. One thus can say that d m is 'quadratically small' in the differences AZv, if they tend to zero. The linearisation of function g in a neighbourhood of point z 0 (for small AZv ) consists in approximating _
g(z)
--- g(z 0 ) + Dg(z 0 )(z-z 0 ) = Dg(z 0 )z + (g(z 0 )-Dg(z 0 )z 0 ) .
(8.4.4)
In this manner, for example the equation (8.3.53) becomes a linear equation (7.1.1) and can be analyzed by the methods described in Chapter 7. Let us have a model (set of constraints) g(z) = 0
(8.4.5)
as in (8.3.53), where g is the function considered in (8.4.1-4). Let us assume g infinitely differentiable on the N-dimensional interval U, so as to simplify the mathematical terminology and in accord with Sections 8.2 and 8.3. Thus Taylor's formula (8.4.3) applies. Even then, not any such function admits of a meaningful approximation (8.4.4). Imagine a function h, with m-th component h m = (gm)2. Then h(z) = 0 if and only if g(z) = 0, thus the set M of solutions remains unaltered. But because Dh m = 2g mDg m , we have Dh(z 0 ) = 0 for any z 0 ~ M. Although the approximation (8.4.4) with h in lieu of g remains correct up to the first degree, it is of no use when the properties of M have to be examined. Less trivial examples can be invented. Generally, the same set of constraints (representing the same feasible set M) can be formulated by an infinity of equivalent equations. While in linear algebra, the equivalence means simply a regular transformation (multiplying by a regular square matrix), this is not the case when nonlinearity is admitted. Then not any (though equivalent) formulation of the model is equally appropriate for the solvability analysis. Observe that in (7.1.4), we assumed that the matrix C was of full row rank. It is thus natural to require also in the present case that rankDg(z o ) = M for any z o e M
(8.4.6)
thus that Dg(z 0 ) is of full row rank (at least) on the set M of solutions of (8.4.5). Such model (better to say, its formulation using the function g) will be called regular. To be precise, we (of course) suppose that there exists some solution, thus M ~ ~ . Well-known theorems of Analysis then show that the rank remains constant at least in a neighbourhood of the set M (at points 'not very distant'
260
Material and Energy Balancing in the Process Industries
from M), and that the feasible set M is a differentiable manifold, in the rigorous mathematical sense. Moreover, its dimension is .
dimM= N- M ;
(8.4.7)
compare with (7.1.1), (7.1.4), and (7.1.6-8) with the subsequent text. Going back to the approximation (8.4.4) where now z0 ~ M thus g(z 0 ) = 0, and substituting v for z-z 0 we have (approximately) the equation Dg(z 0 )v = 0
(8.4.8)
for any other solution z = z 0 + v ~ M of (8,4.5), 'not too far' from z 0 . Thus any other such solution is (approximately) found when shifting slightly the point z 0 along a vector v obeying (8.4.8), thus belonging to the null space KerDg(z 0 ) of dimension N-M. The null space (generated by the vectors v) is called the tangent space to M at point z o (~ M). In Analysis, it is defined by a more sophisticated construction directly, using the properties of M (independent of the particular g)" the tangent space is generated by tangent vectors to curves traced on M and passing through point z o . Imagine a surface in threedimensional space, and the tangent plane at some point of the surface. In Sections 8.2 and 8.3, we have made use of other ideas leading to the concept of a (differentiable) manifold by way of certain 'degrees of freedom' in a parametrisation of M . The ideas are interrelated and when precised mathematically (which, of course, has not been possible in this book), they lead to the same concept. Although we have stated that the sets M i n (8.2.84) and Mtot in (8.3.50) are differentiable manifolds we have, in fact, still not proved that the models (8.2.2) and (8.3.1) are regular in the above sense. But it is so, indeed. Thus under the structural hypotheses summarized in Subsection 8.3.2 The multcomponent mass balances (8.2.2) with (8.2.1) and the energy balance (8.3.1) constitute a regular model (set o f constraints).
The proof is again quite nontrivial in details; let us only outline the idea of the proof. It follows the same lines as in (8.2.11)-(8.2.72), and in (8.3.2)-(8.3.26). One first transforms the equations (8.2.2) with (8.2.1), using the substitutions (diffeomorphisms) (8.2.70 and 71) with (8.2.69); one proves that at points of M, the rank of the system remains unaltered when Eqs.(8.2.2b) are multiplied by l/mis , Eqs.(8.2.2c) by ~.i mj, Eqs.(8.2.2d and f) by mj, and (8.2.2e and g) by mj~. One then forms the differentials of the transformed equations and puts them equal to zero. The differentials are in terms dm~, d%, and dmk (n), and one finds that all the differentials of the transformed variables dm~ and dotj are linear combinations of the components of dx, dv, dc~, and din" where x, v, c~, and m" are the same as in (8.2.55), thus representing D scalar components. In this manner, one shows that the dimension of the null space is D, thus the rank of the Jacobi matrix equals N-D = M for the system (8.2.2).
C h a p t e r 8 - Solvability and Classification of Variables H- Nonlinear Systems
261
The analysis of subsystem (8.3.1) is easier. One has only to show that the submatrix corresponding to the new variables T -i and qi is of full row rank. At constant mass flowrates and compositions of the streams, by (8.3.19) the transformation (substitution) (8.3.18) is a diffeomorphism, and in terms of t h e / T and qi ~at constant m (vector of mass flowrates) the equations (8.3.1) are linear; the result is then immediate, using the linear transformations (8.3.5)and (8.3.15). Thus the rank of the submatrix equals Mh and is again full. The row rank of the whole system is also full, equal to M + Mh.
In the more detailed analysis of the balance equations that will follow in Section 8.5, we thus can start from the Jacobi matrix Dg where g is represented by the LH-sides of the equations (8.2.2) and (8.3.1). The equations and variables are partitioned into certain groups and not assigned a fixed numeric order; in addition we make use of composed variables (substitutions) such as (8.2.1). So as to find a general expression for the Jacobi matrix, let us rewrite it in terms of differentials. If h is a differentiable function of variable y then its differential is the formal expression dh(y) = Dh(y)dy
(8.4.9)
having the property that with the substitution y = fix) thus k(x) = h(f(x)) we have (8.4.10)
dk(x) = Dh(y)df(x)
(the 'chain rule' of differentiation). The formalism enables us to identify the elements of the Jacobi matrix as coefficients at the corresponding differentials dzv in any row of the differentiated equation, whatever be the order of the equations gm (Z) = 0 and components Zv of z. In the system (8.2.2) with (8.2.1) we thus have the differentials in the rows n ~ T u in number K(n)-R o (n) for each n: D(n)dn(n) where
dn(n) =
dnk'(n) k~ K(n) (8.4.11a)
1 Z Cn i ( y ~ d m i + m i d y ~ ) ,9 and dnk (n) = - -Mki~E~
262
Material and Energy Balancing in the Process Industries
here, K(n) is the set of K(n) indices k of components Ck occurring in the node n balance; further, in the rows s~S"
Z_ Csj dmj, thus dmjs - Z dmj
j~js
s~J~
(8.4.11b)
represents the corresponding row of the Jacobi matrix, with element 1 in column mj, -1 in columns mj, j ~ J~, else zero; further
s ~ S , j ~ Js k = 1, ..., K:
dy~s- dye, K Z dy~
J ~ Ju"
k=l K
s e S"
Z dy~
k=l
k=l,...,K J e Ju, J ~ Ek"
(8.4.1 lc) (8.4.11d)
(8.4.11e)
dy~
(8.4.11f)
dye?
(8.4.11g)
and
k=l,...,K s E S, j~ ~ F_~"
The equations (8.2.2b-g) are linear and the elements of the Jacobi matrix in the rows (8.4.1 lb-g) are constants (+1 or 0). In (8.4.1 la), the elements can be found if the values yik and m i are given. Then, if Dtk (n) (t = 1, --- , K(n)-R o (n); k ~ K(n)) is an element of matrix D(n), the t-th differential in the n-th subset of rows equals
1 - E Dtk (n) ]~ Cni (y~ d m i + m i dyl~ ) . k~ K(n) M k ie F~
Thus for example the element in the column m i (i E J) of the Jacobi matrix equals, in the t-th row of the n-th subset
1 - Y~ Dtk (11) Cn ini k i k~ K(n) M-k Yk
where Bik = 1 if i ~ E k , Bik = 0 if i ~ Ek; cf. (4.5.5). The element in the column y~ (corresponding to dy~ ) equals
Chapter 8 - Solvability and Classification of Variables H- Nonlinear Systems -Dtk (n)
1
Cni mi
263
for i ~ E k
and zero for i ~ E k . One could also discard directly all the variables y~, i ~ E k , equal to zero by hypothesis, from the list of variables. We leave the modification to the reader. The reader can also set up the Jacobi matrix in the special case where no chemical reaction is admitted, and all components are admitted in all streams; see then Remark (iii) in Subsection 8.2.6. In the system (8.3.1), we shall make use of the substitutions (8.3.18). Consequently, with (5.2.15 and 16) where lau is vector of components/T, j ~ Ju (arcs nonincident to splitters)
(8.4.12)
and fi' is of components/T, j s J' (J' - J-Ju )
(8.4.13)
we have the following differentials. In the subset of rows n ~ Wu: A
C, (diagla u )dm, + C'(diagll')dm' + Cu (diagmu)dllu + C'(diagm')dh' + Dud q (8.4.14a) in the rows d ~ DE:
D e dq
and in the groups of rows s ~ S, in number [Js I for each s" Sdh'
(8.4.14b)
(8.4.14c)
thus -d/-~ + d / ~
(j ~ J s)
represents the corresponding I J~ I rows of the Jacobi matrix, with elements -1 in column/T~, 1 in column/T, else zero. The reader can himself set up the (quite analogous) Jacobi matrix of the reduced system (8.3.41), and also of the (possibly again reduced) system of heat and mass balances (5.4.6). In the latter case, the subsystem of mass balance equations is linear (thus with Jacobi matrix equal to the matrix of the linear subsystem), and the remaining subsystem yields Jacobi (sub)matrix of the same format as (8.4.14). What remains now is to express d/T in terms of the differentials of the variables T and yJ, see (8.3.18), and substitute the differentials for the
264
Material and Energy Balancing in the Process Industries
components of vectors dlau and dl~'. Again, pressure PJ is considered known a priori, not perhaps adjusted according to the measured values, nor computed from the balance; thus dP j does not occur in the differential. By the way, regarding also (some of the) PJ as variables would only increase the number of variables, but not that of the equations (constraints); hence the (full row) rank of the matrix would not change. The expression for d/T (j ~ J) depends on how detailed is our thermodynamic description of the system. Let us begin with the simplest case, that of heat and mass balance equations. Then, according to Section 5.4, the specific enthalpies /T, denoted by hJ~, are functions of temperature only; see (5.4.5). Thus J dT j (j e J)
(8.4.15)
by (8.3.19). [Attention: the subscript s has here nothing in common with any J can still splitter; it is related to the wording 'sensible heat'.] The specific heat Cp depend on temperature (thus inducing a higher degree of nonlinearity), or be assessed as constant. Note that if steam is used as a heating medium, or if it arises in a steam generator then the corresponding items can be included as components of vector q, not necessarily among the heat contents of streams j~J. Generally, thermodynamically consistent are the expressions (C.10) /T
-
Z yJk/4~ k
(8.4.16)
with summation over indices k of components Ck present in the stream;/4~ is partial specific enthalpy of Ck in stream j, thus at T (given PJ ) and 3; (composition of the stream). Since the mass fractions must obey the condition (4.2.2), one of them is not independent and we have E dy~ = 0 .
(8.4.17)
k
Then, by (C.10) and (C.21) we have the thermodynamically exact expression dI)J-c~dTJ+ E /-lJdy~ ke C~j')
(8.4.18)
where C(j) is the set of k such that Ck is present in stream j. But in practice, other expressions for specific enthalpy can be applied directly, for example using tables and interpolation formulae. Recall only again the requirements for
Chapter 8 - Solvability and Classification of Variables H- Nonlinear Systems
265
thermodynamic consistency, in particular if some nodes are reaction nodes, if phase transitions take place, or, in certain cases, also if the heat of mixing is relevant; see the examples in Section 5.3. So the expression for d/T requires an ad hoc consideration. Remark: Complications can arise when stream j is a multiphase mixture. The energy (enthalpy) balance in terms of the specific enthalpies/210 will anyway hold true, as well as the individual component balances, where YJkis the mass fraction of Ck in the whole mixture. The case will, however, require again a special consideration. Generally, new variables, say fie will occur, where fie is mass fraction of phase f in stream j, obeying F. E' ~ f=l
1
(8.4.19)
where Fj (usually - 2) is the number of phases f in stream j. Then
/_Tf= :~J ~/.~ (f) f=l
(8.4.20)
where/T (3') is specific enthalpy of phase f in stream j. We shall not analyze the general case. In particular if the stream j is a vapour-liquid mixture (Fj = 2), an additional condition will be that of thermodynamic phase equilibrium; thus given again PJ, the variables /T, T J, ~ , and the Ck-fractions in the vapour-liquid mixture are interrelated. For example/2p is obtained as function of T j, p~ (mass fraction of the vapour phase), and the chemical composition of the stream as a whole (while the composition variables of individual phases are eliminated by the equilibrium conditions), with parameter PJ; the function can be primarily obtained in molar quantities, and re-calculated to specific enthalpy and mass fractions. In practice, the case can occur as a vapour-liquid feed into a distillation column.
8.5
CLASSIFICATION PROBLEMS; OBSERVABILITY AND REDUNDANCY
8.5.1
Examples
Let us return to the examples in Section 8.1. We have seen that a classification of variables, which was uniquely possible in the linear case, can fail if the equations are nonlinear. Some (though incomplete) information can be obtained when the equations have been linearized. So let us begin with the Jacobi matrix of the system (8.1.1). Let C be the matrix, hence
266
Material and Energy Balancing in the Process Industries m l m2 m3 y l y2 y3
1
C -
1
T 1 T2 T3 Q
-1
yl y2 _y3 ml m2 -m 3
(8.5.1)
h l ha -h3 Pl P2 -P3 q l q2 -q3 -1 where ()h i
i = 1' 2, 3" P i - mi ~~yi ' qi = mi Cpi ,.
(8.5.1a)
Cpi ( > 0 ) is again isobaric specific heat. We have eliminated one of the mass fractions in each of the material streams, say yi1 - 1-y~ where y i = y~, which brings no complication in the present case. We see immediately that if m i > 0
(i = 1, 2, 3) then C is of full row rank even if the variable Q is deleted (heat exchanger absent). But C depends on the state variables (vector z). Let M b e the solution manifold; if z e Mthen z obeys Eqs.(8.1.1). In the sequel, we are referring to the numbered examples of Section 8.1.
Example 1
Let us have measured the variables 3~ and 7~ (j = 1, 2, 3), and Q; we have the equivalent conditions (8.1.11) with (8.1.2) for z e M. Let us partition the matrix C-(
B
,
unmeasured
A
)
(8.5.2)
measured
as in (7.1.10). We shall examine the matrix B; thus ml m2 m3
1
1
-1
B-
(8.5.3) f,2
.
The rank of B remains unaltered when j-th column is multiplied by mj > 0, and the sum of columns 1 and 2 is then added to column 3, giving
C h a p t e r 8 - Solvability and Classification of Variables H- Nonlinear Systems
B' =
m 1
m2
m 1
--I- m 2
- m3
ml ~2
m2~2
ml )1
4. m2 ~2
_ m3 ~3
m, ~1
m2 ~2
m, ~1 + m2 ~./2
_
267
(8.5.4)
m3 ~3
with rankB' = rankB
(8.5.4a)
Let first Q r 0. Then the condition of solvability is (8.1.13) and adding the third column in (8.5.3) to the first and second, one finds immediately that this is also a necessary and sufficient condition for rankB to be full rank. Then, whatever be otherwise the measured values, Eq.(8.1.1) is uniquely solvable. Thus if the admissible region of measured values is restricted to a subset of variables obeying the inequalities (8.1.13) and (say) Q > 0, the system can be called 'observable' in the mj, and at the same time we have rankB = 3. Let us now admit the case that Q = 0; see the text before formula (8.1.17), but let still all the temperatures be measured. The measured values can, nonetheless, obey the condition (8.1.13). But then the only solution is m~ = m 2 = m 3 = 0. Conversely insisting on positive mass flowrates, we must have (8.1.14) for the adjusted values; but then rankB < 2. Or we admit an error in Q; then the mass fractions can be assigned the measured values, but the mass flowrates remain undetermined, as the actual Q is unknown. Simply, we do not know where is the error, and also the adjustment conditions remain undetermined. Observe that having admitted Q - 0, we have rankB < 2 at some points of M, while rankB = 3 at other points. The classification of variables fails, while the problem is 'not well-posed'.
Example 2 Let further the heat exchanger be absent. Then the variable Q is also absent, and we have the condition (8.1.14). Let in addition the condition (8.1.12) be satisfied in the admissible region of measured variables. Then, on M, by (8.1.1) where Q = 0, according to (8.5.4) we have
B'-
m 1
m2
0
mlY 1
m2Y 2
0
m,
m 2 T/2
0
]/1
(8.5.5)
thus by (8.5.4a) rankB = 2 on M; recall that ~1 r ~2 by (8.1.12). Let us suppress the latter condition and admit for instance ~1 = ~3. Then also ~2 _ ~3 and on M,
268
Material and Energy Balancing in the Process Industries
we have points where also ~t~ - ~ / 2 ~./3, and at these points, we have rankB = rankB' = 1. Thus rankB is not constant on M. The classification of measured variables fails. Under the condition (8.1.12) for the admitted region of variables, a classification is theoretically possible, as shown after formula (8.1.15). But some flaw still remains. So as to formulate the solvability condition (8.1.14), a pre-treatment of the equations was necessary, using the condition (8.1.6). In complex systems, such pre-treatment is not always obvious by inspection. Having certain actually measured values (of mass fractions and temperatures in the present example), a condition such as (8.1.14) will most likely not be satisfied, due to measurement errors. Thus in the present case, in the linearized system, when starting from the measured values the matrix B will be of rank 3. The formal degree of redundancy will equal zero and no adjustment (reconciliation) will take place. Without the pre-treatment, the system is linear in m~, m 2 , m 3 and the unique solution is m~ = m 2 = m 3 = 0. Observe that we have here rankB = 3 in the a priori admitted region, with the exception of points z e M where rankB = 2. The problem appears again rather as 'not well-posed'.
Example 3 Let us have again Q = 0 (no heat exchanger), but let us have measured in addition m 3 = m3; let rh3 > 0. Thus our B consists of the columns m~ and m2 in (8.5.3), thus
B'-
1
1
~
~2
i,
(8.5.6) .
It is not difficult to show that if the condition (8.1.12) is fulfilled then ~1 ~: ~2 and rankB = 2 in the whole admissible region, in particular on M. In the linearized system, we thus obtain the degree of redundancy equal to 1. On the other hand, so long as rh3 > 0, we obtain again the condition (8.1.14) and this condition satisfied, we have m~ > 0 and m2 > 0. Further, because the two columns of B are linearly independent and because on M, as shown above, with the third column of (8.5.3) the rank of the matrix equals also 2, the ~ 3 - c o l u m n of the Jacobi matrix is a linear combination of the columns of the new matrix B (8.5.6). According to (7.1.27), at points of M the measured variable rh3 can be qualified as nonredundant, in accord with the tentative qualification before formula (8.1.16). But observe that at points z ~ M, the matrix (8.5.3) is of rank 3, thus in the linearized system, again by (7.1.27), rh3 will be qualified as redundant. If
Chapter
8 -
Solvability and Classification of Variables H- Nonlinear Systems
269
we apply an adjustment (reconciliation) procedure using, in any approximation step, a linearized system then all the temperatures, mass fractions, as well as the variable rh3 will be sucessively adjusted. But in the end, so long as rh 3 remains positive, we must arrive at a solution, thus at a point z ~ 91//where rh3 becomes nonredundant in the sense (7.1.27). A mathematical proof not given here (but see Section 10.3) shows, however, that the final rh 3 will then equal the original one; to be quite precise, under a (plausible) norming condition derived from statistics. Thus the variable/'~/3 c a n be called 'nonadjustable'. We can call the problem 'well-posed'. Nonetheless, under unfavourable circumstances thus when the initial estimates (in particular mass fractions and temperatures) are 'too far' from 914, it can also happen that by the procedure, we arrive at rh3 = 0 and m~ = m 2 -- 0 , along with some incidental values of 53 and ktj. Such possibility can never be avoided; the measured values are then discarded. So in practice, an adjustment procedure can fail either because the problem is 'not well-posed' (it then most likely fails always), or because the initial estimates (measured values) are 'too bad'.
Example 4 Let us now return again to the case when a heat exchanger is present, and let us admit positive as well as negative values of Q; see the text before formula (8.1.17). We now add variable T 2 t o the set of the unmeasured ones. Then, in addition to (8.5.3), we have the T2-column of (8.5.1) in B. Thus ^
B-
m~
m2 m3
T2
1
1
0
-1
)1 )2 _)3
0
~1 h 2 _~3 m2
(8.5.7) 2 Cp
Here, our admissibility conditions read (8.1.6) and (8.1.12). Then, clearly, rankB = 3 is full row rank, and we have no redundancy. Now for observability. Deleting any of the columns m~, m2, or m 3 leaves the rank unaltered. Let us delete the column T 2. We then obtain the matrix (8.5.3). If Q ~ 0, on M w e have (8.1.18), hence the condition (8.1.13) with h 2 instead of Ft2 is fulfilled and as above, B with column T 2 deleted remains with rank 3. According to (7.1.28), all the unmeasured variables will be qualified as unobservable, whatever be an estimated value of m 2 (> 0), and of h 2 such that the inequality (8.1.13) is obeyed; most likely, we shall use such estimates for a classification based on the linearized system. Let now, however, Q = 0. The matrix (8.5.7) is independent of this value and our first estimate of m 2 and h 2 will probably lead to the same
270
Material and Energy Balancing in the Process Industries
classification. But there are certain conditions the unmeasured variables have to obey. If subjecting the values to the conditions, thus estimating m2 and h 2 adequately, with Q - 0 in (8.1.18) we obtain the result (8.1.14) where h 2 stands for the correctly estimated h 2. Then deleting the column T 2 lowers the rank to 2. According to (7.1.28), we qualify T 2 as observable. This is quite in accord with the qualification in the text after formula (8.1.18). The adjustment problem can be called 'well-posed'. In the present case, no adjustment of measured values is necessary. The variable T 2 is 'exceptionally observable', else unobservable. The example was somewhat na'fve, it shall only illustrate the different possibilities. Analyzing the further examples of Section 8.1 in this manner would be annoying. The trickiness of a general and complete classification is perhaps evident. So far, any attempt to find some general criteria of observability/redundancy ended at an incomplete classification. By graph methods, one can arrive at a complete classification only under restrictive hypotheses, not warranted by practice. Else, in the best case one ends up with certain groups ('blocks') of variables that defy further refinement. Let us try to analyze the problem by linearisation, as illustrated by the above examples.
8.5.2
Theoreticalanalysis
Let us have again a general model (8.3.53) thus (8.4.5), with the notation and hypotheses (8.4.1-7). Thus the model reads
(8.5.8)
g(z) = 0 where z ~ U
where U is the admissible region; for simplicity, let U be an open (N-dimensional) interval in the N-space of state variables. Thus the Jacobi matrix Dg is an M • N matrix function of z, and we suppose that it is of full row rank M on the solution manifold M. Recall that M c U by (8.5.8). Let us partition the vector z z_(y
) }J x
} I = N-J
(unmeasured)
(8.5.9)
(measured)
with the corresponding partition
Dg=(B, J
A) }M;
(8.5.10)
I
thus the M x J resp. M x I matrices B resp. A are again functions of z. We suppose that the components of subvector x have been fixed a priori, for example
Chapter 8 - Solvability and Classification of Variables II- Nonlinear Systems
271
as measured. If x § is the vector of the fixed values, we have generally z ~ M if x = x § in (8.5.9), and whatever be y. The adjustment problem then involves finding some ~ such that
/:/
M for some y ;
(8.5.11)
given a priori some x +, we use some criterion for the adjustment ~-x § in the case of reconciliation derived from statistics and minimized by the adjustment. Possibly, we are then also interested in the values of y obeying (8.5.11) with given ~. Generalizing the nomenclature of Section 7.3, let us designate M + the set of ~ obeying (8.5.11)
(8.5.12)
thus the projection of the solution manifold M into the l-subspace of vectors x; cf. (7.3.4). Further, given some ~ obeying the solvability condition ~ ~ M § let us introduce the set M(~,) as in (7.3.10); thus
y e M(~)means
/y/
~ M.
(8.5.13)
Clearly, if ~ e M § then M(~) ~ O, else the set is empty. The adjustment problem thus involves finding ~ e M § 'as close as possible' to an a priori estimated (say, measured) value x +, and then perhaps also identifying the set M(~) of vectors y; in particular if M(~) is a one-element set then this y is unique. If the equation (8.5.8) is linear then the adjustment problem is completely solvable. Generally, because B depends on z, also its rank L(z) = rankB(z)
(8.5.14)
is a function of z; of course the function can take only integer values 0, 1, ..., the maximum being < J and < M. [Basically, it can happen that L(z) = 0 at some z; for instance if admitting also zero mass flowrates in (8.5.1), and if T 1 is the unmeasured variable then the rank of B equals zero if m~ = 0.] Let us designate L: the maximum L(z) for z ~ M .
(8.5.15)
Because the integer L < Min(J, M)
(8.5.15a)
272
Material and Energy Balancing in the Process Industries
the maximum is attained somewhere on M . It can be shown formally that if L(z 0 ) = L at some z 0 ~ M then L(z) = L also in some neighbourhood of z 0 in M (at points z ~ M ' sufficiently close' to z o). Moreover, we then have rankB(z) > L in some N-dimensional interval containing the point z0; but we can have L(z) > L if z ~ M. On the other hand, from the regularity hypothesis (8.4.6) it follows that the rank of Dg(z) equals M also in some N-dimensional interval containing z o , whatever be z0 ~ M . The standard argument reads as follows. If the rank of some matrix M(z) equals K at some z 0 then there exists some K • K submatrix whose determinant is nonnull at z0. Assuming M continuous as function of z, the determinant (as a continuous function) is nonnull also in some neighbourhood of z0, hence the rank is K at least; if K is maximum then rankM(z) = K in this neighbourhood.
The following analysis will be based on the properties of matrix B. In order to preclude 'ill-posed' problems, it would theoretically suffice to assume rankB constant on the manifold M. Motivated by the above examples we restrict ourselves, however, to 'well-posed' problems assuming that the rank equals L also in an N-dimensional neighbourhood of any z ~ M; we can suppose that this neighbourhood is an N-dimensional interval. The assumption rankB = L in some neighbourhood of M
(8.5.16)
means that whatever be z ~ M , there exists an N-dimensional interval (say) U~ such that rankB(z') = L for any z' ~ % .
(8.5.16a)
Such adjustment problem will be called well-posed. Let us designate H = M- L ;
(8.5.17)
we have 0 < H< I.
(8.5.17a)
[Indeed, L < M by (8.5.15a). If we had H > I thus M > L+I then, at z ~ ~ we should have L linearly independent columns of B at most, thus L + I linearly independent columns of Dg(z) at most, which would contradict the hypothesis of regularity.] If the problem is well-posed then also H is constant on any ~ ; it can be regarded as a 'degree of redundancy', as it was in the linear case. The
273
C h a p t e r 8 - Solvability and Classification of Variables H- Nonlinear Systems
theoretical analysis shows that the set M § is again of 'dimension' I-H, but it can happen that it does not have all the properties of a differentiable manifold; only when the solution manifold M i s restricted to some neighbourhood of an arbitrary z o ~ M , its projection into the x-space has the required properties. The following results require a subtle mathematical reasoning and formulation. They are based on the fact that under the condition that rankB(z) = L on M, the mapping (projection) that assigns, to any z e M, its x-component according to (8.5.9) is, in mathematical terms, of constant rank thus a subimmersion of rank I-H. The consequences read. (a)
Locally, thus given an arbitrary z0 ~ M, in some neighbourhood V of z0 the set of x e R I such that
Y )~
VnMforsomey~
RJ
(8.5.18)
x
(projection of V ~ M into the x-subspace R ~) is a differentiable manifold of dimension l-H, a submanifold of R~; compare with (7.3.3)-(7.3.4) where M-L = H.
(b)
Given any i e M § (8.5.12), the set of N-vectors z such that
z=
/y/ i
~ M"
(8.5.19)
(section o f M at constant i) is a differentiable manifold of dimension J-L, a closed submanifold of M ; compare with the fine-printed paragraph following after (7.3.10).
(c)
Under the assumption (8.5.16), given
z0=
I r~ )
e M
(8.5.20)
i0
the neighbourhood V in (8.5.18) can be taken as Cartesian product of J-dimensional interval % and/-dimensional Vx (thus V= Vy • Vx) in the manner that the set
Vy m M(io )
(8.5.21)
is a differentiable manifold of dimension J-L, a closed submanifold of Vy; see (8.5.13) and compare with (7.3.9)-(7.3.10). In particular if L = J then, (at least) in a sufficiently small neighbourhood of Y0, the set (8.5.21) equals {Y0 } thus the solution in y is unique. If we now restrict ourselves to a neighbourhood V = Vy x Vx of some z 0 e M , the result (a) implies that the solvability condition (8.5.18) can be written
2'/4
Material and Energy Balancing in the Process Industries
x ~ Vx:h(x)=0
whereh=
/hi/
and rankDh(x) = H ;
(8.5.22)
(8.5.22a)
hence there exists some function h with full row rank Jacobi matrix, determining the manifold (8.5.18) by the condition (8.5.22). Further, the result (c) says that given some x = i obeying the solvability condition, the set Vy n M(i) of solutions in y at fixed ~ is determined by the condition y e Vy" f(y) = 0
where f =
/'/
and rankDf(y) = L;
(8.5.23)
(8.5.23a)
hence there exists some function f with full row rank Jacobi matrix, determining the manifold of solutions in y (e %). The function f depends on f~ (not written explicitly). Moreover, from the condition (8.5.16a) it follows that V(= Vy• Vx) can be taken such that some L rows of matrix B remain linearly independent in '~, the other M-L rows being their linear combinations at any z ~ 'E. With an appropriate order, let g~, ..., gL be the corresponding components of g (8.5.8). Then the equations
Ye %:gl
/'/ ~
--0, "'", gL
/yl
--0
(8.5.24)
in y, at fixed ~, determine again a closed submanifold of Vy, say M'(x). One has clearly Vy n M (~) c M' (~); tracing a curve on M' (~) starting from a point y e Vy n M (~), one can show that the curve remains on M (:~). One concludes by topological arguments, using the result that Vy n M (~) is a connected component of M '(~). Restricting Vy when necessary, one thus shows that the equations (8.2.24) also determine Vy n M (i), thus the set of solutions in y. Hence the conditions (8.5.23) can take the special form (8.5.24). The beauty of m o d e m Analysis has also certain flaws. One of them is in that m a n y theorems are only existence theorems, and often of local character only. An existence theorem states for example that a solution exists under certain conditions, but the verification of the conditions in practice is frequently not less difficult than finding a solution directly by way of trial. In addition, an existence t h e o r e m need not indicate a practically feasible way of finding the solution. M o r e o v e r , a local theorem states only that (expressed in rather vague terms) the solution exists and is unique only if the 'initial guess' in a numerical procedure is 'not too bad'; else the procedure can fail. So in the best case, a theoretical analysis gives an idea of what can be expected, and perhaps suggests a strategy.
C h a p t e r 8 - Solvability and Classification of Variables H- Nonlinear Systems
275
In terms more pragmatical, the above theoretical results can be interpreted as follows. We have some idea of where a solution of the problem can be found; it is a neighbourhood of some (assessed) value z 0 of the state variable z, obeying the constraints (8.5.8) thus g(z 0 ) = 0. Let
v = % x Vx
(8.5.25
be this neighbourhood (interval estimate); Vy is a J-dimensional interval of the y-variables, Vx an/-dimensional interval of the x-variables, according to (8.5.9). We assume that the model is regular (8.4.6); this is the case with a set of balance equations, as shown (under certain hypotheses) in Sections 8.2-8.4. We further suppose that the problem is well-posed (8.5.16). We then expect that with our interval estimate, the solvability condition reads x = ~, where :~ is some solution of the set of equations (8.5.22). This means that at least hypothetically, the equation (8.5.22) can be obtained by elimination of vector variable y from the original constraints (8.5.8). The theory also shows that if the interval Vx is sufficiently small, the vector equation (8.5.22) with (8.5.22a) is equivalent to a set of scalar equations x~ = X1 (xH+~, "- , x i ) . . . . . . . . . . . . XH
-- S H(XH+I,
'X• ...
,
(8.5.26)
V x
x I)
for an appropriate selection of the H variables Xl, "'" , XH with the corresponding re-ordering of the x-components. The number H is uniquely determined, while the selection of the 'dependent' variables Xl, " . , xH is generally not unique, but also not arbitrary. Consider a simple example where I = 2 and H = 1. Let the set (manifold) of solutions of (8.5.22) look like
fI I I I I I I
i
I'- . . . . . . .
1
,
I
I_
Fig. 8-8. Possible manifold (curve) of solutions to (8.5.22)
276
Material and Energy Balancing in the Process Industries
In Vx, we can take X1 as dependent (uniquely) on x2, but not conversely. Taking a smaller interval, say Vx, x 1 depends on x 2 , or also conversely. Generally, any set of H variables (say, x~, --. , XH ) that are uniquely determined by the remaining ones according to (8.5.26) can be called 'redundant' in Vx. As shown, however, this concept of a 'redundant variable' can depend on the choice of Vx . Anyway, the (invariant) number H (8.5.17) can be called the degree of
redundancy. Let further some x = ~ obey the solvability condition (8.5.22). We then expect that with our interval estimate (8.5.25), the set of solutions in y will be determined as that of certain L equations (8.5.24) for an appropriate selection of some L components gl, "'", gL of function g. More generally, having eliminated the variable y in certain H scalar equations, some (M-H =) L equations remain. The H scalar equations (8.5.22) and the L scalar equations (8.5.23) represent the result of such (perhaps only hypothetical) elimination; they obey the conditions (8.5.22a) and (8.5.23a). The number L is again uniquely determined. More explicitly, let us write the equations (8.5.23) as dependent on fl (Yl,
"'" , Y J ; I~) = 0
(8.5.27) fL (Yl,
"'" , YJ; IK) -" 0
where the parameter ~ has been fixed; Yl, "'" , YJ are the unknowns. Again, if the interval Vy is sufficiently small, the equations (8.5.27) are equivalent to a set of equations Yl = Y1 (YL+I,
"",
YJ; x) (8.5.28)
YL = YL(YL+I, "'", YJ;s for an appropriate selection of the variables Yl, YL with the corresponding re-ordering of the y -components. The number J-L represents the number of degrees of freedom for the vector variable y, given ~. Observe that if J - L, thus if matrix B is of full column rank then (assuming y e Vy ) the whole vector y is uniquely determined by ~. In that case, for a well-posed problem, rankB(z) = L - J for any solution z e M, hence the conclusion is independent of the special value of ~. More generally, it can happen that some of the equations (8.5.28) is of the form "'"
yj = yj (~,)
,
(8.5.29)
Chapter 8 - Solvability and Classification of Variables H- Nonlinear Systems
2'/'/
thus the j-th variable is uniquely determined by the given ~,, whatever be the other yj. (j'~j). We then can call yj 'observable' (in Vy ) at x = ft (~ V x ).
8.5.3
Theoretical classification
Even for well-posed problems, only an incomplete classification of variables is meaningful, if it has to be independent of the particular choice of point z 0 ~ M. Let us introduce two formal definitions. (i)
The j-th u n m e a s u r e d variable (yj) is called observable when
Yl__ [y =
_
/Y'l e M (~) and y' =
Yj
9
e M (~)] implies yj = yj (8.5.30)
~,Y'j
w h a t e v e r be f~ ~ M§ recall (8.5.12 and 13). Hence given any :~ obeying
the solvability condition, the j-th unmeasured variable is uniquely determined. (ii)
The definition of a nonredundant variable (xi) is trickier. Let us first have some solution
f~ =
/'/
~ M.
(8.5.31)
The idea of nonredundancy is that leaving Xh = 2h constant for all h ~e i and changing x i , the equation (8.5.8) with (8.5.9) remains solvable: the variable x~ is not determined by the remaining 2h, and even arbitrary, with the condition
Xi E ,(I/'i
(8.5.32)
where '~i is the interval of admissible values; see (8.5.8) where the admissible region U is Cartesian product of onedimensional intervals. Moreover, we shall require a 'smooth' solvability when xi varies: There exists a curve on Mpassing through f~ and leaving the coordinates Xh -- 2h constant for h ;e i, while xi takes all the possible values in ,~i; 'possible' means that given xi ~ ,~i, there exists some point on M with i-th measured component xi. We then call the variable xi nonredundant at
278
Material and Energy Balancing in the Process Industries
point ~. The i-th measured variable is called nonredundant when it is nonredundant at any ~ ~ M .
The classification criteria can be based on the properties of the Jacobi matrix (8.5.10). Alas, the analysis requires again a subtle mathematical reasoning. Definition (i) Let us designate S M ( i ) the section of M a t constant ~, thus the set (8.5.19); let us trace an arbitrary curve on the manifold SM(:~). Let
be a parametrisation of the curve, thus x = ~ and y = cp(t), with components yj = q)j (t) (j = 1, ..., J). Denoting by ~0' the derivative, by (8.5.8) with (8.5.10) we have
(8.5.33)
B(z)q~'(t) = 0
for any such curve. If now the variable yj is observable then necessarily q~j is constant, hence cp~ = 0. Thus conversely, whatever be z e 914and v ~ 1~J B(z)v = 0 implies vj = 0
(8.5.34)
because (:~ ~ M § being arbitrary) otherwise we could trace a curve on SM(~) not obeying the condition cpj = const. The condition (8.5.34) is necessary for yj to be observable. It is also sufficient if the manifold (section) SM(:~) is (topologically) connected. More generally, it is sufficient at least for yj to be locally observable at any "2 ~ M . This means that having arbitrary
'2 =
i
~ M(thus S' e M(~))
(8.5.35a)
there exists some J-dimensional open interval Vy' such that ~, ~ ~' and y ~ Vy' n M ( i ) implies yj = ~j.
(8.5.35b)
Observe that Vy' can be different for different '2, in particular for different ~. Moreover, let the condition (8.5.34) be obeyed also in some N-dimensional neighbourhood ~ of an arbitrary z e M . Then, given arbitrary '2 (8.5.35a), there exists some neighbourhood ~ x Vx of ~ (a Cartesian product of intervals) such that whatever be x~Vx [y e % n M('~) and y' e % n M(:~)] implies yj = y] .
(8.5.35c)
This is the condition (8.5.30) restricted to M ~ ( ~ x Vx ); here, ~ is independent of x (~ Vx). The assertion can be proved using the equations (8.5.24) and the implicit function theorem, along with the hypothesis (8.5.16).
279
C h a p t e r 8 - Solvability and Classification of Variqbles H - Nonlinear Systems
Definition (ii) Let us further consider a nonredundant measured variable xi. Let again i ~ M (8.5.31). We have a curve on M , parametrized as tp(t) / 7(0 =
~(t)
with 7(0) = i and ~h (t) = q/h (0) = Xh for h # i
(8.5.36)
q/i ( t ) = xi + t where t is in some interval such that ~i + t ~ :c/~ (8.5.32). Let e~ be the i-th unit vector of R I (in the x-space), and with the partition (8.5.10) let
(8.5.37)
a i = Ae i
be the i-th column vector of matrix A (a function of z). The condition 7(0 r M thus g(7(t)) = 0 reads B0'(t))tp'(t) + ai 0'(t)) = 0
(8.5.38)
thus in particular, at t = 0 a~ (i) = - B(i)tp'(0)
(8.5.39)
where i is arbitrary. Thus the necessary condition reads: a~ (z) is element of the vector space generated by the columns of matrix B(z), whatever be z ~ M . Conversely, let us assume that the condition is fulfilled in some N-dimensional neighbourhood Vz of any i e M . Thus, whatever be z ~ Vz , there exists some vector v(z) ~ R J such that a i (z)
=-
B(z)v(z) .
(8.5.40)
Assuming again that the problem is well-posed, we can take Vz such that there are certain L columns of B that remain linearly independent. We thus can take v(z) as the vector of coordinates of ai (z) relative to these L columns (constituting a basis), the remaining components of v(z) being zero. We thus have a continuous vector field v(z) on Vz. Let us consider an integral curve of the field, parametrized as 9(t), and then a curve
7(0 =
9(0) V(t)
such that 7(0) = i and ~'(t) = e i .
Then, so long as z = 7(0 e d dt g(T(t)) = Dg(z)y'(t) = B(z)v(z) + a i (z) = 0 by (8.5.37) and (8.5.40), thus 0 = g(i) = g0'(0)
(8.5.41)
280
Material and Energy Balancing in the Process Industries
hence T(t) ~ M for any t. We thus have a curve on M passing through i and leaving xh = ~h (t) = ~h(0) = Xh constant for h ~: i, while xi = ~ (t) takes all the values in some neighbourhood of Xi limited by the condition
(8.5.42)
7(0 6 ~ .
This holds true whatever be i ~ M . By the way, replacing i by z 1 = 7(t) ~ M for some t ~: 0, the curve can be continued, and so on. We shall not examine the conditions under which we thus obtain a 'maximal curve' such that finally x~ takes all the possible values in ,c/i (8.5.32). We simply state that the condition (8.5.40) is sufficient for x i to be (at least) locally nonredundant at any i ~ Yv~ thus nonredundant on Vz n M.
The interpretation of the theoretical results, remitting again the mathematical precision, can read as follows. We have a regular model (8.5.8) with full row rank Jac0bi matrix (8.4.6), and a well-posed adjustment problem, thus the partitions (8.5.9 and 10), where matrix B is of constant rank L, thus obeying the condition (8.5.16). We are usually not interested in all the possible values the state variable z can have theoretically, but rather examine a limited region, say an interval V (8.5.25) where our hypotheses are expected to hold. Instead of the full solution manifold M, we limit ourselves to some portion M n V o f M. Then: An observable unmeasured variable (yj) is uniquely determined by the measured variables' values (obeying the condition of solvability), say ~j = Yj (i) where :~ is the vector of (adjusted) measured values; the hypothetical function Yj need not be known explicitly. The necessary condition of observability is (8.5.34). Compare with (7.1.18) where we substitute B(z) for B, with variable z. According to (7.1.28)~, the condition is equivalent to rankB0)(z)=L- 1 (z~ Mn
V)
(8.5.43)
where L = rankB and where Ba) is the M x (J-1) submatrix of B with the j-th column excepted. The necessary condition requires the condition (8.5.43) to be fulfilled at any z e M ~ V. Under plausible mathematical hypotheses, the condition is also sufficient; else, it is sufficient only for yj to be locally observable according to (8.5.35). The local observability is rather a theoretical construction" it does not preclude the existence of another solution (say) y] for given ~, it only states that within some (not a priori known) finite distance from ~j, no other solution exists. [For the uniqueness of the solution in the (a priori assessed) interval V, it is sufficient to suppose that the condition (8.5.43) is fulfilled whatever be z e V, thus not only at points z obeying g(z) = 0; see (8.5.35c). But the latter condition can be too strong.] In particular if L = J thus if matrix B is of full column rank the condition (8.5.43) is obeyed at any z e V, where B is of constant rank by hypothesis. We
Chapter
8 -
Solvability and Classification of Variables II- Nonlinear Systems
281
then call the vector variable y observable (on M n V). Thus the whole vector y is uniquely determined by ~. A n o n r e d u n d a n t measured variable is not affected by the solvability condition; it can be freely varied in some interval leaving the model equations solvable, if the remaining fixed measured variables obey the condition of solvability. The necessary condition reads, according to (8.5.39) a i
(Z) E ImB(z) (z s M m V)
(8.5.44)
where ai is the i-th column vector of matrix A (8.5.10). Compare with (7.1.27) 2. Thus at any z ~ M n V, a i (z) is linear combination of the columns of B(z), thus in fact of certain L (= rankB) linearly independent columns. A sufficient condition assumes that ai (z) ~ ImB(z) at any z ~ V, thus not only at points z obeying g(z) = 0. The theoretical definition following after (8.5.31) is mathematically formal. In the applications (in particular in the statistical reconciliation of measured values), even the fact that the condition (8.5.44) is fulfilled at some z ~ M n V is relevant. Under frequent statistical hypotheses, the variable is then nonadjustable (at point z): by the reconciliation, the measured value can remain unadjusted (at least if the error is considered as uncorrelated with the other errors); see further Chapters 9 and 10. The reader has probably noticed that, in contrast to the linear case, we have not completed the classification by introducing 'unobservable' and 'redundant' variables. The main reason is that we have not considered and classified all the possible cases that can occur theoretically. Still, let us at least examine the cases where some of the above necessary conditions is not satisfied. Going back to (8.5.43), let conversely rankB0~ (z) = L at some z ~ M n V .
(8.5.45)
That means that some set of L (= rankB) columns of B(z), not comprising the j-th column constitutes a basis of ImB(z); the L column vectors are thus linearly independent. By standard arguments, one concludes that the equality (8.5.45) holds true also in some neighbourhood of point z. We thus can state that the variable yj is not observable. It is not even locally observable, because the condition (8.5.43) is necessary even for local observability. The statement (8.5.45) thus 'disqualifies' the j-th unmeasured variable: we cannot expect that with an arbitrary measured (and adjusted) ~, the value of yj will be determined. It can happen that the condition (8.5.43) is fulfilled at certain particular values of z, and even that the yj-value is uniquely determined by some ~; see the example 4 in Section 8.1, Fig. 8-2. But such case is exceptional, due to some coincidence. It is left to the reader's taste, if he then will call the variable 'unobservable' or perhaps 'observable at' some ~.
282
Material and Energy Balancing in the Process Industries
Let us further return to (8.5.44) and let conversely a i (Z) ~ ImB(z) for some z ~ M n V
(8.5.46)
Thus adding the column a i (Z) to those of B(z), the rank of the extended matrix equals L+I. Again by standard arguments, one concludes that a i (Z') ~ I m B ( z ' ) for any z' in a neighbourhood of z. We can say that the variable xi is not nonredundant, or perhaps 'redundant' in some neighbourhood of z. The variable will generally be adjusted by reconciliation, with possible exceptions mentioned above, after formula (8.5.44) (end of the paragraph).
Remarks
(i)
The theory presented in this section applies to any regular model and w e l l - p o s e d adjustment problem, not only to balance equations. As already mentioned, it is in fact sufficient to assume that the function g is twice continuously differentiable. On the other hand, according to Section 8.2, at least in case of component mass balances the set M of solutions is even an 'analytic manifold', and it is such also at least if simple mathematical expressions are used for the enthalpy functions in the whole balance model. In that case, certain stronger conclusions can be drawn from the theory. The parametrisations introduced in Sections 8.2 and 8.3 allow one to suppose that the manifold M is (topologically) connected, and to use the theorem of analytic continuation: if an analytic function equals zero in an open subset of a connected region R then it equals zero in the whole R An analytic function of the state variable z is also an analytic function of the parameters, which can be assumed to lie in a connected region R of dimension D (number of degrees of freedom). By the (analytic) diffeomorphism, to an open subset of M corresponds uniquely an open subset of R . In particular if some determinant of a (sub)matrix (function of z) equals zero in some open subset of M then it equals zero in the whole M. Thus if the rank of some matrix M(z) equals (say) K in M n V where V is open in the z-space 11N then rankM(z) < K on M ; indeed, the determinant of any (K+ 1) x (K+ 1) submatrix (if there is any) equals zero in M ~ V, thus everywhere in M (but not necessarily in the whole admissible region U c 1~y , nor in V). The rank can be lower, however. Then the same theory shows that the points z e Mwhere rankM(z) < K are 'rare' in M; they will be contained in some 'negligible' subset of M, of 'lower dimension' than D = dimM. We shall not precise the latter concepts.
The basic hypothesis adopted in this section is that of 'well-posedness' (8.5.16). Let now M be analytic. The hypothesis then implies rankB(z) < L for any z ~ U
(8.5.47)
Chapter
8 -
Solvability and Classification of Variables H- Nonlinear Systems
283
where U is the admissible region in (8.5.8). Let further the condition (8.5.43) be fulfilled for all z e M n V0 where V0 is an arbitrarily small open N-dimensional interval; then the rank is < L-1 everywhere on M , thus equal to L-1 because rankB(z) = L on Mby hypothesis. Hence if the unmeasured variable yj is (locally) observable in a neighbourhood of some point it is (at least locally) observable on the whole solution manifold M. Conversely if we have (8.5.45) at some arbitrary z e M then (as the rank is < L everywhere on Mby hypothesis) the rank equals L 'almost everywhere' on M. Thus if yj is not (locally) observable at some point, it can be observable at most in some 'exceptional' subsets of M. Thus for well-posed problems (and analytic manifolds), the classification observable / not observable (unobservable) is 'almost complete'. The remaining cases ('exceptional observability') represent mere coincidence. Briefly, an unmeasured variable is either
everywhere 'observable'
or
almost everywhere 'unobservable'
where the quotes recall that mathematical precision has been remitted. Retaining again the well-posedness and analyticity hypotheses, let the condition (8.5.44) be fulfilled for all z e M n V0 where V0 is again an arbitrarily small open N-dimensional interval. Hence the rank of the extended matrix (B(z), a i ( z ) ) equals L on M n V0 , thus it is < L everywhere on M and being also > L (as rankB = L by hypothesis), it equals L on the whole M. The stronger hypothesis, namely that the condition is fulfilled in some V0 open in R N, implies as well that the condition is fulfilled in some neighbourhood of the whole M where rankB = L by hypothesis. Thus if the measured variable is (by the formal definition) nonredundant in a neighbourhood of some point, it is nonredundant on the whole M. According to the terminology introduced in the text following after formula (8.5.44), if the variable is nonadjustable in a neighbourhood of some point then it is nonadjustable on the whole M. Conversely if we have (8.5.46) at some arbitrary z e M then the rank of (B(z), ai (z)) equals L+ 1 thus (being < L+ 1 everywhere on Mby hypothesis), it equals L+ 1 almost everywhere on M. Thus if xi is not nonredundant (in simpler terms, 'redundant') at some point, it can be nonadjustable (or even nonredundant) at most in some 'exceptional' subsets of M. Thus again, for well-posed problems (and analytic manifolds), the classification 'nonadjustable'/'redundant'(not nonredundant) is 'almost
284
Material and Energy Balancing in the Process Industries
complete'. The remaining cases ('exceptional nonadjustability') represent again mere coincidence. Briefly, a measured variable is either
everywhere 'nonadjustable'
or
almost everywhere 'redundant'
where the quotes mean again that mathematical precision has been remitted. But incidentally, it can happen that a variable classified as 'redundant' (almost everywhere) remains unadjusted at some point, though subject to measurement error. Recall also that the expression 'nonadjustable' is imprecise from the statistical point of view (being due to some special, though quite common statistical hypothesis); see further Chapters 9 and 10. (ii)
It is not our aim to introduce a new terminology. The terms '(locally) observable', 'unobservable', ' redundant','nonredundant (nonadjustable)' are common, but (in the nonlinear case) often only vaguely interpreted. A more detailed (and mathematically formal) classification can be found in Stanley and Mah (1981a). We have put up with a simpler classification and shown that and why it remains incomplete.
8.5.4
Classification in practice
In practice, the adjustment problem as formulated in Subsection 8.5.2 (see (8.5.11)) is most frequently a reconciliationproblem: some measured values (vector x + ) are adjusted (reconciled) so as to make the model solvable. The classification of variables gives one an idea of what can be expected from the reconciliation. Thus, first, the degree of redundancy H informs us on the number of independent constraints (scalar equations) the adjusted value ~, has to obey, thus how many measured variables are 'redundant' in the manner that having deleted their measurement, they will be still determined by the remaining measured values. In particular if H = 0 then all the I measured values are necessary (none is redundant). If it happens that H = I then the whole measurement is redundant because the constraints determine the I variables uniquely. Generally, not any H measured variables are determined by the other values, thus redundant; some of them can be nonredundant thus not subject to the constraints (solvability conditions), hence their measurement cannot be deleted. Under frequent hypotheses adopted by the statistical model of measurement, the nonredundant values remain unadjusted by the reconciliation; so they are also called nonadjustable.
Chapter 8 - Solvability and Classificationof Variables II- NonlinearSystems
285
Further, if some vector ~ of adjusted measured values obeys the solvability condition then given ~,, certain L independent constraints (scalar equations) are imposed upon the J components of the unmeasured vector y. The number J-L determines the number of degrees of freedom for the unmeasured variables. It can happen that certain unmeasured variables are uniquely determined by the latter constraints (thus by ~); they are called observable. In particular if L = J then there is no degree of freedom and all the y-variables are uniquely determined. If L < J then at least some of the unmeasured variables remain undetermined; they are called unobservable. The above intuitive concepts have a precise meaning when the model is linear. Then the variables can be classified a priori, and the partition of variables into measured and unmeasured (measurement placement) possibly modified. In any case (assuming 0 < H < /), the measured vector x § can be adjusted by standard reconciliation. The situation is not that simple when the model is nonlinear, as the previous analysis has shown. A well-posed adjustment (reconciliation) problem allows one at least to expect that a reconciliation procedure will converge to some adjusted value ~, if the measured x + is not ' too bad'. Then also an a priori classification of variables makes sense, based on the same ideas as in the linear case. The analysis of solvability and classification of variables is not so much a physical or technological problem, but rather a problem of computation relative to the mathematical model adopted. Observe that any model (even if regarded as 'rigorous') represents a mathematical idealisation of the reality. If we put up with a linear approximation, we can make use of the methods described in Chapter 7. We thus assess a 'representative' value z 0 of the state variable (taken for instance from the design of the plant) and in a neighbourhood of point z 0 , linearize the model according to (8.4.4). Then the model (8.5.8) reads By + Ax + c = 0
(8.5.48)
where vector z has been partitioned according to (8.5.9), and Dg(z 0 ) = (B, A)
(8.5.48a)
is the corresponding partition (8.5.10) of the Jacobi matrix at z = z 0 . We then have c = g(z 0 ) - Dg(z 0 )z 0 ;
(8.5.48b)
of course when z 0 obeys the constraints (model equations), we have g(z 0 ) = 0. Then (8.5.48) is the linear model (7.1.1) with (7.1.9 and 10). Transforming the matrix (B, A, c) (7.2.1) according to Section 7.2, the analysis including the variables classification is complete; see the before-last paragraph of Section 7.2
286
Material and Energy Balancing in the Process Industries
before Remarks. The analysis is, of course, complete only if the linearized model (8.5.48) is applied henceforth to any set of measured values to be reconciled. Let now the model be nonlinear. Then the Jacobi matrix depends on the unknown vector z and the reconcilation consists of a number of steps, say of a sequence of approximations z(n); if the sequence converges then the limit value, say ~, represents a point on the solution manifold M, thus an estimate of the actual value of the state vector. So as to have an a priori idea of what can be expected, one can proceed as follows. We suppose that the state vector z can take its values in some N-dimensional interval V c U where U is the admissible region (8.5.8). The interval can be assessed as some neighbourhood of a vector z0 ~ M. A first information can be obtained in the same manner as above, in the linear case. Taking different z0 ~ M, we can examine the behaviour of the Jacobi matrix Dg(z 0 ) on M (restricted to V, thus on M n V ). [We can also, in the case of balance models, start from different values of the independent parameters representing the degrees of freedom and determining z 0 ~ M; see Sections 8.2 and 8.3. But such procedure may be rather tedious.] In the reconciliation, however, also the behaviour of Dg(z) in a neighbourhood of the solution manifold is relevant. The nonlinear reconciliation starts from some initial guess, say z +. The x-component is the measured x +, but also some initial guess y+ of the unmeasured subvector y is necessary; generally, z § ~ M. We also do not know a priori if the vector z will be determined by the reconciled ~, (thus observable). There are methods that allow one to find some ~ ~ M, 'as close as possible' to the initial z § even if y is not observable; see further in Section 10.4. The analysis (Veverka 1992) also shows that if matrix B (8.5.10) is not of constant rank in a neighbourhood of manifold M, it can happen that a sequence of approximations will not converge. The adjustment problem assuming constant rankB (8.5.16) has been called 'well-posed'. In the interval V, let us select randomly a number of initial guesses z +. Starting from any such z +, let us compute ~ as suggested. If the sequence of approximations converges for any z +, it is plausible to assume that the problem is well-posed (in the a priori assessed region V). The divergence (or oscillation) of the approximations signals that the problem may be not well-posed in V. Of course the reason can be also in that some z + is too distant from the solution manifold (a 'bad' initial guess). In the sequence of approximations z (n~,the Jacobi matrix is computed and transformed according to Section 7.2. Thus in particular the rank of B at each z (n~ is known. Observe that it can happen that the rank is not constant and still, the sequence converges, perhaps by lucky chance. But if such case is detected, the problem is still not well-posed, by definition. Conversely (and more likely), it can happen that the sequence does not converge, while the ranks of all the B(z ~n~)
Chapter 8 - Solvability and Classification of Variables H- Nonlinear Systems
287
are constant. The reason can be a bad initial guess as mentioned above, or again that the problem is not well-posed. The points where the rank of B is lower than the maximum rank are 'rare' in V. Still, as a detailed analysis shows, also in a neighbourhood of such points the matrix B has certain unfavourable properties; see again Veverka (1992). The reader can also imagine the elimination: Certain rows are annulled, but 'what is zero'. Near the 'singular points', the zero becomes uncertain (some subdeterminants are 'nearly zero'). Let us have come to the conclusion that the problem is well-posed. We thus know the constant L (= rankB), thus the number of degrees of freedom J-L for the unmeasured variable y, and also the (constant) degree of redundancy H = M-L (M is the number of scalar equations). So as to draw further conclusions according to Remark (i) to Subsection 8.5.3, let us assume that the manifold M is analytic. That means we consider balance models with simple enthalpy functions, thus algebraic expressions that can be formally extended beyond the limits where they make sense physically (so-called analytic continuation). Further information will be obtained after the last approximation step, thus at points ~ ~ M corresponding to different initial guesses z § We thus know Dg(~) decomposed according to (8.5.10), and transform it to the canonical format according to Section 7.2. See now the before-last paragraph of Section 7.2, before Remarks. According to points (v) and (vi), at each ~, we find the partitions of measured and unmeasured variables, thus their respective classifications. The conclusions will be the following. (a)
If some measured variable x i is classified as nonredundant at each "2 then, almost certainly, it is nonadjustable on the whole V n M (portion of the solution manifold we are interested in)
(b)
If some xi is classified as redundant at some ~ then it is not nonredundant, thus (having simplified the terminology) redundant on the whole V n M, with possible exception of some 'rare' points, due to some coincidence.
['Nonadjustable' means here 'nonadjustable by statistical reconciliation assuming uncorrelated errors'; see Chapters 9 and 10.] Further
(c)
If some unmeasured variable yj is classified as observable at each ~ then, almost certainly, it is (at least locally) observable on the whole V n M
(d)
If some yj is classified as unobservable at some ~ then it is not (even locally) observable, thus (having simplified the terminology)
288
Material and Energy Balancing in the Process Industries
unobservable on the whole V n M, with possible exception of some
'rare' points, due to some coincidence. The wording 'locally' admits of possible other solutions in yj, in some nonnull distance from the estimated value. This is rather a theoretical possibility. In practice, such solutions will most likely represent values not admitted by the technology. The 'rare' ('incidental') points of V n M form certain subsets of 'lower dimension' than D = dimM; imagine isolated points or curves on a surface as a simple illustration. Their presence will, most likely, not be detected by the procedure. It remains, however, at least theoretically. In the case (b) above, in a neighbourhood of the possible 'rare' points, the variable will be 'almost nonadjustable': if an estimate falls into this neighbourhood, the estimated "~i will only slightly differ from the measured x + even if subject to a gross error. Such case can occur in the reconciliation and cannot be avoided by the a priori classification. See later Section 10.5, Remark. Nor can be avoided the cases that for a problem qualified as well-posed, the reconciliation procedure still fails. The only possibility is then to discard the corresponding set of measured data. The possible existence of the 'rare' points, in contrast to the linear case, does not allow one to conclude simply that, for instance, "deleting the measurement of a redundant variable makes it observable"; it can happen that the problem becomes 'not well-posed'. This can also happen when adding the measurement of an unmeasured variable classified as unobservable by the above method (and using the simplified terminology). Compare Examples 4 and 1 in Subsection 8.5.1, where Q - 0 is admitted: if the 'exceptionally observable', else unobservable unmeasured variable T 2 is measured, the originally well-posed problem has no more this property. Thus having changed the measurement placement (having added or, conversely, deleted some measurement), one ought to test if the new adjustment problem is well-posed; one can use again the procedure as above.
8.6
MAIN RESULTS OF C H A P T E R 8
The solvability analysis of a set of nonlinear equations is by far not that straightforward as it was in the case of linear models in Chapter 7. The less straightforward and unambiguous is a solvability classification of variables, which was uniquely determined by the linear model and the partition of variables into 'measured' and 'unmeasured'. This holds even in the case of balance equations having a simple structure; see Section 8.1. Although rather tricky, the structure of the set of balance equations can be analyzed; see Sections 8.2 and 8.3. The complications are mainly due to the
Chapter
8 -
Solvability and Classification of Variables H- Nonlinear Systems
289
presence of reaction nodes, splitters, and to certain a priori technological assumptions precluding the presence of certain chemical components in certain streams; see Section 8.2. We have again (cf. Chapter 4) denoted by Ek (k = 1, .--, K) the set of material streams where component Ck can be present. The arbitrariness in the choice of the E k has been limited by the structural hypotheses (8.2.18), (8.2.22), and (8.2.29) motivated by technological arguments as plausible and not very restrictive. Formally, they can be verified according to the points (a)-(k) following after (8.2.32). Then the set Yd of solutions can be 'parametrized', i.e. the solution z can be expressed as function of certain selected component mass flowrates mki (8.2.6), splitting ratios %, (8.2.12), and component production rates mk(n) (8.2.7) in reaction nodes; see the points (a)-(g) in Subsection 8.2.4. The number D of the parameters represents the 'number of degrees of freedom' for the variables in the set of component mass balance equations. The results are summarized in Subsection 8.2.5, with Remarks 8.2.6 and Example 8.2.7. No further structural complications arise when the constraints are extended by the energy ('enthalpy') balance equations; see Section 8.3. The structural hypothesis (8.3.2) has been motivated in Section 5.2 as plausible and can be weakened, as remarked at the end of Subsection 8.3.1; one adds the conventions (a)-(c) leading to (8.3.3). The specific enthalpies /2p of material streams j are generally considered as functions (8.3.18) of temperature T j, composition 3~(mass fractions of chemical components in stream j), and pressure PJ. Here, we assume that the state of aggregation in each stream is given a priori, and for simplicity, also the pressure PJ (if relevant as a thermodynamic state variable) is assumed to be a priori known thus is not written explicitly as a variable; regarding certain PJ as variables would only increase the number of parameters ('degrees of freedom') without changing the number of equations. The thermodynamic condition of positive specific heat (8.3.19) is formally adopted also for the specific enthalpy functions fJ as given in the database. Then the extended vector z of solutions can again be expressed as function of the D parameters introduced in Section 8.2, plus certain additional D h parameters that are certain selected temperatures of material streams and net energy flowrates q~ (8.3.21). The s u m O t o t -- D + D h is the total number of degrees of freedom for the variables subject to the components mass and energy balance constraints. The results are summarized in Subsection 8.3.2. The parametrisation of the whole set ~ftot of solutions is not unique (i.e. the selection of the parameters is not unique), only the number of degrees of freedom (Dtot) is invariant. In mathematical terms, the set Mtot is a differentiable manifold of dimension Dtot; it is called the solution manifold of the set of balance equations. The main result of the structural analysis is that the set of equations (constraints) (8.2.2) and (8.3.1) is minimal by (8.3.30): the number of degrees of freedom equals the number of variables minus the number of (scalar) constraints.
290
Material and Energy Balancing in the Process Industries
Using the notation introduced in Chapters 4 and 5 (summarized in Sections 4.8 and 5.7), the minimal set o f constraints can be arranged as follows. We designate (8.6.1)
n k (n) - - Z Cniy~mi/Mk i~Ek
which is (4.8.8) with (4.8.5) where y~ - 0 if i ~ Ek. The terms are introduced for any node n ~ T u (non-splitter), and for the K(n) components Ck present in the node n balance thus in some stream incident to n. The K(n)-vector of components nk(n ) is n(n). On the vector n(n) operates the matrix D(n); see the text that follows after (4.8.9), and also (4.8.11). Then the constraints read k-1,...,K J ~ Ju, J ~ Ek"
Y~, = 0
(8.6.2a)
k-1,...,K s ~ S , j~ ~ E k 9
y~,~- 0
(8.6.2b)
y~?- y~,- 0
(8.6.2c)
J ~ Ju"
K Z y~,- 1 - 0 k=l
(8.6.2d)
s ~ S 9
K Z y~s_ 1 - 0 k=l
(8.6.2e)
C"m' = 0
(8.6.2f)
q = 0
(8.6.2g)
Sfi' - 0
(8.6.2h)
D(n)n(n) = 0
(8.6.2i)
Cu (diagmu)hu + C ' ( d i a g m ' ) h ' + Duq = 0
(8.6.2j)
k=l,...,K s ~ S , j ~ J~"
9
De
n e Tu 9
where we recall that for any two vectors a - (a~, ..., a N)T and b = (b~, ..., b N )T we have (diaga)b = (diagb)a = (al b l , "'", aN bN )T. In the graph G[N,J] of material streams, S is again the subset of splitter nodes, T u that of units that are not splitters, J' ( c J) is the subset of material streams incident to some splitter, Ju = J - J'; the set J' is partitioned into subsets J~
Chapter 8 - Solvability and Classification of Variables H- Nonlinear Systems m
291 m
of streams incident to splitters s, j~ (~ J~ ) is the input and J~ ( c Js ) the set of split output streams for splitter s. For the submatrices C u , C', C" of the reduced incidence matrix C of G see (5.7.2a and b); the vector m of mass flowrates mj is again partitioned into m u (j ~ Ju ) and m' (j ~ J'), while hu resp. h' is the corresponding vector of specific enthalpies/T for j ~ Ju resp. j ~ J'. The reduced incidence matrix D of graph GE [NE, E] (5.7.1) of net energy streams is again partitioned into submatrix D u (nodes n ~ Tu) and De (nodes n ~ DE) where D E is the set of energy distributors (possibly empty); q is the vector of net energy flowrates qi (i E E). The equation (8.6.2h) with S according to (5.2.12 and 13) represents the scalar equations - ~ + / T = 0 (s ~ S, j ~ Js ). By (8.6.2c) and assuming also equal pressure PJ = PJ~ (j ~ Js) in streams incident to splitter s, the equation is equivalent to the condition of equality of temperatures s e S, j e Js" Tj~ - Tj - 0
.
(8.6.2h)*
We have thus re-arranged the equations in the manner that Eqs.(8.6.2a-g) are linear, and Eq.(8.6.2h) 'quasilinear', equivalent to the linear subsystem (8.6.2h)*. Observe that the formally written equations (8.6.2a and b) are, in fact, simple instructions (equalities) >~put y~, = 0 ~. The LH-sides of Eqs.(8.6.2) constitute the function g in the model g(z) = 0
(8.6.3)
where z is the vector of model variables (mass flowrates, net energy flowrates, mass fractions, and temperatures) subject to the balance constraints; here, hu and 11' are regarded as functions of the mass fractions and temperatures (given the pressures and states of aggregation). We have included as variables all the mass fractions y~ (j e J, k = 1, 9.. , K), for the sake of formal simplicity. By (8.6.2a-c) however, we have y~ = 0 whenever j ~ Ek; the latter variables are thus always 'observable', i.e. their values are uniquely determined by the model. Recall that a correctly set-up list Ek must not admit the case where, for instance, Js e Ek but j ~ Ek for some J ~ Js. In the solvability analysis, we have adopted the condition of positive mass flowrates mj>0foreachj~
J
(8.6.4)
with the natural assumption that the model admits such solution. Then, with all the structural assumptions fulfilled, the dimension Dto t of solution manifold ~V[tot equals D+D h where D is the number (8.2.78) and D h the number (8.3.23); here, IMI is number of elements of general set M and in addition Juk is the set of streams j ~ Ju ~ Ek, Sk the set of splitters where component C k occurs, K(n) the
292
Material and Energy Balancing in the Process Industries
number of components present in the node n balance, and R o (n) the dimension of the reaction space in node n (R0 (n) = 0 for a nonreaction node). If some unit is a heat exchanger, it has been partitioned into two nodes, say n' and n"; see (8.3.32). In the energy balance, if the heat transfer rate qi between n' and n" is not given a priori, it can be deleted as a variable by merging the two nodes. The procedure is described in detail in Subsection 8.3.3. We introduce the subset Eex ( c E) of net energy streams i to be deleted by the merging, the set of nodes h i (i ~ Eex ) of the corresponding exchangers, and the subset T~ ( c Tu ) of the remaining units. Then the submatrix C u (5.7.2a) is reduced (8.3.37)
(Cu,
c'*)
(8.6.5)
to the matrix of rows (nodes) n ~ T~, and h~(i ~ E~x ). Having merged the nodes also in the graph GE, in the matrix D the submatrix D Ois reduced to the same rows as in (8.6.5), and by the deletion of arcs i ~ Eex to columns i ~ E* = E-Eex ; we thus have D~. Also in the submatrix De, the columns i ~ Eex are deleted and the new submatrix is D~; see (8.3.38). Then the equations (8.6.2a-f) remain, instead of (8.6.2g) we have Deq = 0
(8.6.6a)
Eqs.(8.6.2h and i) remain, and instead of (8.6.2j) we have C~ (diagm u )hu + C'* (diagm')h' + D~q* = 0
(8.6.6b)
where q* is the remaining vector of net energy flowrates qi, i e E*. By the reduction and elimination, the dimension of the solution manifold (say) ~tot (thus the number of degrees of freedom) remains unaltered and is again Dtot (8.3.47). If we consider heat and mass balances only, the set of constraints (5.4.6) is minimal; see Subsection 8.3.4. The dimension of the solution manifold is Dtot = D + D h (8.3.50) where D h is the same as above (8.3.23), and D = I JI - I Nu I (8.3.49) where N uis the set of units; if certain components s(n) of vector s (source terms) are not given a priori, they represent additional degrees of freedom. The set Nu = T Ow S is again set up in the manner that both sides of any heat exchanger are considered separately, so as to take account of separate mass balances. We can again merge the couples of nodes {n',n"} in the energy balance of any heat exchanger, without changing the dimension of the solution manifold. If energy distributors and source terms are absent and if each qi (i ~ E) is a heat transfer rate in a heat exchanger, we have again the set of constraints (5.7.12). The equation (8.6.3) represents a nonlinear model. Generally, g is an M-vector of scalar functions gm of vector variable (N-vector) z. If the function g
Chapter $ -
Solvability and Classification of Variables H- Nonlinear Systems
293
is (at least) twice continuously differentiable, the properties of the solution can be examined using the Jacobi matrix Dg; see Section 8.4. The model is called solvable when there exists some solution z obeying g(z) = 0, uniquely solvable when this solution is a unique point z0 . If M (~ ~ ) is the set of solutions, the model is called regular when the Jacobi matrix Dg(z) is of full row rank (M) at any z ~ M (8.4.6). Then M is a differentiable manifold of dimension N-M (8.4.7). In particular the model (8.6.3) with (8.6.2) is regular, as well as the reduced models following thereafter. The Jacobi matrix of the balance model (8.6.3) has a special structure and its elements can be computed explicitly; see the formulae following after (8.4.9). The columns can be arranged according to the variables mj (j ~ J), y~ (j e J, k = 1, ..., K), TJ(j e J), and qi (i e E); the rows are arranged according to the scalar components gm of g, thus according to the equations (8.6.2). The elements in the rows corresponding to Eqs.(8.6.2a-g) are constants (+1 or 0), and if (8.6.2h) is replaced by (8.6.2h)* then also the elements in the latter rows are constants (+1 or 0). The elements in the rows (8.6.2i and j) can be computed as shown in (8.4.1 la) and illustrated after (8.4.1 lg), and in (8.4.14a); here, we make use of the developments by differentials (8.4.10). A special consideration is necessary if the enthalpy functions involve dependence on the mass fractions (8.4.16-18), and in particular if certain streams are multiphase mixtures; see Remark to Section 8.4. If the values of certain variables are a priori fixed, one can ask again, as in Chapter 7, which of the variables is redundant resp. nonredundant, and which of the unknown ones is observable resp. unobservable. Basically, such solvability classification of variables is possible and follows then the same lines as in Chapter 7, using the Jacobi matrix Dg(z) instead of the constant matrix C of the linear system; see Section 8.5. But since Dg(z) is no more constant, the classification can remain incomplete and need not be unambiguous; see the examples in Subsection 8.5.1. Theoretically, precise definitions and exact theorems can be formulated if the behaviour of the Jacobi matrix Dg is known in the whole admissible region U (8.5.8); in the balance model, the region is anyway limited by the conditions (8.6.4), and perhaps also by other inequalities. But even then, most of the theorems are of local character only (such as "the solution is unique in a neighbourhood of some point"); a global analysis by more advanced topological methods can be hardly thought of. The theory is presented in Subsections 8.5.2 and 3. In every case, the full row rank assumption is adopted for the matrix Dg(z), z e M. It holds true for the minimal set of the balance constraints. The vector z is again partitioned into x (fixed) and y (unknown). As in Chapter 7, x is called the vector of measured variables, y that of the unmeasured ones (8.5.9). Accordingly, matrix Dg is partitioned by (8.5.10) into B (operating on y) and A (operating on x). These conventions and notation are of constant use here and
Material and Energy Balancing in the Process Industries
294
also in the following chapters. The behaviour of matrix B(z) is of key importance for the analysis, and also for the numeric procedures suggested in Chapter 10. Given subvector x = x + in the partition of z, there need not exist any solution z ~ U of g(z) = 0 having this x § as subvector. The adjustment problem consists in finding some ~, such that the equation
g
y:~ / -
0
(8.6.7)
is solvable in y, and further that the difference i-x + minimizes some criterion; a special case is dealt with in Chapter 10 (reconciliation). Irrespective of the criterion, we can say that ~'makes solvable' the equation g(z) = 0. The set of making the equation solvable is denoted by M + (8.5.12). Given ~, ~ M +, we denote by M(~) the set of solutions y of Eq.(8.6.7). In particular, the latter equation can be uniquely solvable, but this property can depend on i. In the most favourable case, also the set M + and the sets M(:~) are differentiable manifolds; M ( i ) can also be a (set of) isolated point(s). Under certain assumptions, the theory is able to determine the properties of M + and M(:~) at least locally: restricting the admissible region to some N-dimensional open interval (say) V (thus formally U = V), the set M + is a manifold and for any ~ ~ M § M(:~) is a manifold whose dimension is independent of ~. One of the assumptions is that of constant rank of matrix B; we have called such problems well-posed. We then designate L = rankB
(8.6.8)
on 'E. Recall that M is the number of scalar equations and N the number of variables thus N = J + I where J is dimension of vector y and I that of x. We designate H = M- L.
(8.6.9)
Also this notation is used henceforth. It corresponds to the notation introduced for the linear systems. The number H can be regarded as the 'number of constraints' the variable x has to obey so as to make the model solvable, thus H is called the degree of redundancy and I-H is the 'number of degrees of freedom' for the variable x. The number L can be regarded as the 'number of constraints' the variable y has to obey, given some ~ ~ M + in (8.6.7), and J-L is the 'number of degrees of freedom' for the variable y; if L = J then the solution in y is (at least locally) unique. In the end, remitting the mathematical precision a 'most likely' classification of variables is possible using the methods of Chapter 7. The main
Chapter 8
-
Solvability and Classification of Variables II- Nonlinear Systems
295
results are summarized in Subsection 8.5.4. Basically, one applies the criteria of Section 7.2 to the model linearized at some point(s) of the solution manifold.
8.7
RECOMMENDED LITERATURE
As already stated in the introduction to this chapter, the present material is largely novel, and only a few relevant references are available. The neceessary mathematics is expounded in university textbooks; we have applied the theorems given in Dieudonn6 (1970). The approach to the observability/redundancy analysis as presented here can be characterized as equation-oriented; cf. Romagnoli and Stephanopoulos (1980), or Crowe (1989). For another (graph-oriented) approach, see Stanley and Mah (1981a and b), Kretsovalis and Mah (1988), summarized in Mah (1990). Crowe, C.M. (1989), Observability and redundancy of process data for steady-state reconciliation, Chem. Eng. Sci. 44, 2909-2917 Dieudonnr,J.(1970), Eldments d'Analyse III: 16.1-8, Gauthier-Villars, Paris Kretsovalis, A. and R.S.H. Mah (1988), Observability and redundancy classification in generalized process networks I and II (Algorithms), Comput. Chem. Engng. 7, 671-703 Mah, R.S.H. (1990), Chemical Process Structures and Information Flows, Butterworths, Boston Romagnoli, J.A. and G. Stephanopoulos (1980), On the rectification of measurement errors for complex chemical plants, Chem. Eng. Sci. 35, 1067-1081 Stanley, G.M. and R.S.H. Mah (198 la), Observability and redundancy in process data estimation, Chem. Eng. Sci. 36, 259-272 Stanley, G.M. and R.S.H. Mah (1981b), Observability and redundancy classification in process networks (theorems and algorithms), Chem. Eng. Sci. 36, 1941-1954 Veverka, V. (1992), A method of reconciliation of measured data with nonlinear constraints, Appl. Math. and Computation 49, 141-176
This Page Intentionally Left Blank
297
Chapter 9 BALANCING BASED ON MEASURED DATA - RECONCILIATION I LINEAR RECONCILIATION
Among the mathematical models of industrial chemical processes, the system of balance equations is basic. If some measured data do not satisfy the balance equations, this fact is attributed to measurement errors, and not perhaps to an inadequate description of the process by the model. In practice, measurement errors are always present. Hence before using the measured data, they are adjusted to obey the balance constraints. The adjustment by methods using statistical theory of errors is called reconciliation. The measurement error is regarded as a random variable; the characteristics of a random variable are briefly summarized in Appendix E. Well-developed is the theory in the case when the constraints are linear. Let us thus begin with linear reconciliation. The reader will also need the results of Appendix B.
9.1
PROBLEM STATEMENT
Let us begin with a simple example.
4 5
+
I
S
,,.-I
i +
D I8,
Fig. 9-1. Example
The system consists of four technological units (A,B,C,D) and splitter S. Stream 2 from node A is split in S into stream 4 and bypass 3; node B is a heat exchanger. Measured are the mass flowrates marked as +, thus m~, + m6, + and m + 7 are the measured values.
298
Material and Energy Balancing in the Process Industries
The system of mass balance equations reads A:
m~
-
S"
m 2
= 0
m 2 -
m 3 -
B" C:
m 4
= 0
m 4 - m 5
= 0
m 3
m5
+
D"
-
m 6 m 6 - m 7 -
(9.1.1)
= 0
m8 - 0 .
The vectors of unmeasured resp. measured variables are m2 m 1
m 3
y
resp. x
m4
=
m 6
m 7
m5 m8
(9.1.2)
.,
By the methods of Chapter 3 (graph analysis) or Chapter 7 (classical elimination) we find the equivalent set of equations by summation over A, S, B, C m1 -
m 6 =
(9.1.3)
0
having thus eliminated the unmeasured variables, and m2
-- m l m 8
-- m 6 m 3 +
m 4
=
m 1
m 4 - m 5
=
0
-
m 7
(9.1.4)
while Eq.(9.1.1):C follows from (9.1.3 and 4). Given values of ml, m6, m7 the system (9.1.3 and 4) is solvable if and only if ml and m 6 obey Eq.(9.1.3). If so, then clearly m2 and m s are observable (uniquely determined), while m3, m4, m5 are unobservable; they are only subject to the conditions m4 = m5 and m 3 + m 4 = m~. The value of my is arbitrary (not subject to any condition); m 7 is a nonredundant variable. The remaining two measured variables (m~ and m 6 ) a r e redundant: given one of them, the other is determined by the condition (9.1.3). Recall Chapter 7.
Chapter 9 - Balancing Based on Measured Data - Reconciliation I
299
Due to measurement errors, the actually measured values (components of x § most likely will not satisfy the condition (9.1.3). We thus have to find some a d j u s t m e n t s v~ and v6 such that, setting m^ 1 -
m §1 + V 1
/'~/6-
m~ +
}
(9.1.5)
126
we have (9.1.6)
/'~/1 - /T/6 = 0 .
The adjusted values thus have to lie on the straight line, say s
m6 = m6
N\
,,•p/ml *4ml+'m6+) T
mI
Fig. 9-2. Solvability condition for adjusted values
while (m~, m +6) T ~ L . The actual mass flowrates m 1 and m 6 are unknown; we can only try to e s t i m a t e their values as the adjusted ones. Intuitively, one would expect that the actual value of vector x would lie in the nearest possible neighbourhood of the vector x + of measured values. If we have no information on the possible measurement errors, we thus draw a line perpendicular to L in Fig. 9-2 and passing through the measured point; the intersection will be the estimated ( ~ , /~6 )T whose distance from (m~ , m +6 )T is smallest. We have thus resolved the problem (9.1.6) with the condition (rhl - m +)2 l
+ (/~6 _
m6+)2
= minimum.
In addition we put/'Y/7 -" m~ (unadjusted) because then also the distance between x § and the estimated :~ is minimum in the threedimensional space; the set (say) eft + of vectors x obeying the solvability condition (9.1.3) is a plane in l~3 passing through L (Fig. 9-2) and perpendicular to the (m 1 , m 6 ) plane.
300
Material and Energy Balancing in the Process Industries
Suppose we know the standard deviations of the random errors in measuring the mass flowrates, say Gi for the i-th measured flowrate; we suppose in addition that the errors are uncorrelated and of zero means. Then the greater is oi, the greater is the error that can be expected. It is thus natural to 'normalize' (re-scale) the adjustments as v~/o~: the greater is cyi the greater adjustment is admitted. Our problem thus reads: Find rh~ and/~6 obeying Eq.(9.1.6) and such that ^
m
+
-m 1
+ 2 /'Y/6 _- _m6 )
2 +
- minimum.
(9.1.7)
cJ 1
We can also imagine different scales for m~ and m 6 in Fig. 9-2. With the normalized scales , the straight line passing through (mT , m6+ )T is again perpendicular to L and the distance is again smallest. It is also smallest between x + and :~ ~ M + when setting in addition/~7 -- m7. Hence formally, the minimum condition can be written + 2 rrti _- m i )
Z
~
- minimum
(9.1.7 a)
i=1,6,7
along with (9.1.6), thus with the condition :~ ~ M + for :~ = (rh 1 , /'~/6, /~7 )T. Let us now have a general set of linear equations (constraints) (7.1.1), with the regularity condition (7.1.4), and with the partition of variables (7.1.9) into measured (x ~ R 1) and unmeasured (y ~ ]RJ ). We thus also know the set 91/[+ (7.3.4) of vectors x obeying the condition of solvability; see (7.3.2). Let x + be the vector of actually measured values. Suppose we know the covariance matrix F of measurement errors; it is an I x I symmetric positive definite matrix. If the matrix is diagonal (errors uncorrelated) thus F - diag(o 2, ..., cyi2 )
(9.1.8)
and if (we can suppose that) the errors are of zero mean then the reconciliation problem can be formulated, as a generalisation of (9.1.7a) with (9.1.6) :~ e M +
(9.1.9a)
where ^
I
+
Xi - X i
Z
i=I
Gi
2
= minimum
(9.1.9b)
Chapter 9 - Balancing Based on Measured Data - Reconciliation I
301
Xi b e i n g the i-th c o m p o n e n t o f x. T h e c o n d i t i o n (9.1.9b) thus reads (~ - X+ )TF-I(~:- X+) = m i n i m u m .
(9.1.9c)
More generally, let us admit that F is not diagonal thus some errors are correlated. Recall Appendix E, Remark (ii) to Section E.2. In the 'proper' coordinates of vector ~-x § (with some fictive 'de-correlated' random errors), the matrix F is diagonal and the minimum (9.1.9c) is again that of a sum of squares; thus again, a 'normalized' distance between x § and M § is minimized. The problem formulated as (9.1.9a) and (9.1.9c) is thus generalized for arbitrary distribution of measurement errors with known covariance matrix and zero mean of the error vector. T h e a p p r o a c h to r e c o n c i l i a t i o n m o t i v a t e d in the a b o v e m a n n e r a p p e a r s as p r a g m a t i c . It w o r k s w h a t e v e r be the distribution o f m e a s u r e m e n t errors, a n d in any case, it p r o v i d e s (as will be s h o w n in the n e x t section) some e s t i m a t e
obeying the solvability condition; it can be r e g a r d e d as the best estimate w e can do w i t h o u r limited i n f o r m a t i o n . F r o m the s t a n d p o i n t o f statistical t h e o r y the m o t i v a t i o n is, h o w e v e r , naive. M o r e r i g o r o u s is the f o l l o w i n g c o n s i d e r a t i o n . T h e actual v a l u e o f x ~ M + is u n k n o w n , thus the error vector e = x +- x
(9.1.10)
is also u n k n o w n ; w e only k n o w that x=x
§
M §
(9.1.11)
L e t f x be the j o i n t p r o b a b i l i t y density for the r a n d o m (vector) v a r i a b l e X o f m e a s u r e m e n t errors. O u r a i m is to c o m p e n s a t e the error by s o m e a d j u s t m e n t v = ~, - x +. Ideally, w e s h o u l d h a v e v = -e; but b e c a u s e e is u n k n o w n , w e e s t i m a t e e in the m a n n e r that fx(e) = m a x i m u m for x § - e ~ M § thus as the ' m o s t likely' error, g i v e n the c o n d i t i o n x = x + - e ~ M +. T h e n ~, = x + + v - x + - e will be our estimate. W i t h o u t g o i n g into details o f the statistical (probabilistic) t h e o r y o f estimates, w e thus p l a u s i b l y a d o p t the
m a x i m u m likelihood principle f o r m u l a t e d as the r e q u i r e m e n t fx ( x+ - :~) = m a x i m u m for ~ ~ M + w h e r e ~ is ( r e g a r d e d as) the best estimate.
(9.1.12)
302
Material and Energy Balancing in the Process Industries
The case that the function fx is precisely known is rare in industrial practice. The standard hypothesis is that the distribution of measurement errors is normal (Gaussian), with zero mean. But then, according to (E.2.5-9) where a = x - 0 and Fx = F ( 1 )T fx(X +- :~) = k exp - 2 ( i - x+
F-I(IK
-
(9.1.13)
x+)
is m a x i m u m (on an arbitrary subset of ~ ~ R ~ ) if and only if the (minus) exponent is m i n i m u m (on the subset). Hence the condition (9.1.12) reads again ( i _ X+ )T F-1 (I~ - X+ ) = m i n i m u m for ~ a 914+ .
(9.1.14)
W e thus have again the problem (9.1.9a and c), where ~, is the sought estimate and v = :~ - x + the adjustment.
Remark Consider in particular the uniform distribution (E.2.2). Then, clearly, if taking arbitrary ~, such that x § - ~, ~ ,c/'N we'll have fx ( x+ - ~') equal to the m a x i m u m (constant) value (E.2.2a) where N = I. The m a x i m u m likelihood principle then leads to an infinity of solutions, at least so long as the intersection of M § with the set of points ~ = x +- x' (x' ~ ,c/N ) is nonempty; the latter set is that of points z~ such that a i _ x +i - "~i 0, with Fig. 9-2 we have
m6
m6
L
m!
ml
a
b
Fig. 9-3. Maximum likelihood condition for adjustments with uniform distribution of errors
Chapter 9
-
303
B a l a n c i n g B a s e d on M e a s u r e d Data - Reconciliation I
According to Fig. 9-3a, if x § is 'too far' from M § then it admits of no adjustment; but if closer to M § there is an infinity of solutions to the adjustment problem according to Fig. 9-3b. On the other hand the naive condition (9.1.9) allows one always to find some 'best' adjustment. Thus assuming again ai+bi = 0 thus E(X) = 0 by (E.2.3), using (E.2.4) we can find the estimate ~,.
9.2
RECONCILIATION FORMULAE As
motivated
in the preceding section, in practice reconciliation problem can be formulated as follows. In the linear model Cz + c = 0
the
linear
(9.2.1)
with M x N matrix C where rankC = M
(9.2.1 a)
is full row rank, and with M-vector c, the state vector z is partitioned into unmeasured vector y and measured vector x, thus Y /
z=
x
J
andC=
} I=N-J
(B,A)
}M
(9.2.2)
~~ J I
is the corresponding partition of matrix C. Let us designate M+: the set of x ~ ~i such that
By + Ax + c = 0 for some y ~ R J
(9.2.3)
thus such x that Eq.(9.2.1) with (9.2.2) is (not necessarily uniquely) solvable in y. Let further the model o f measurement read X+ =
X t -1- e
(9.2.4)
x t is the true (unknown) value of the measured vector, x § the actually measured value, and e random/-vector of measurement errors; for the sake of simplicity, we are using the same symbol for the random variable and its (arbitrary) realisation. Then e is assumed to be of zero mean thus where
E(e) = 0
(9.2.4a)
Material and Energy Balancing in the Process Industries
304
and with positive definite I x I covariance matrix F = E(ee T ) .
(9.2.4b)
The covariance matrix of errors is assumed constant, thus independent of the value x t. We suppose that the matrix is known a priori, for the given method(s) of measurement and instrumentation. Then the problem reads: Find ~ ~ R ~ such that ~, e M §
(9.2.5a)
and (~, _ X+ )T F-I(~, _ X+) = minimum ;
(9.2.5b)
thus the minimum (9.2.5b) is sought on the set M +. We shall first show that this f~ exists and is unique (given x + ); it is called the estimate of the true value x t. The difference v = ~, - x +
(9.2.6)
is called the adjustment of the measured value x +. The existence and uniqueness of the solution ~ can be proved as follows. According to (7.3.2), x ~ M + if and only if A ' x + c' = 0
(9.2.7)
where c' is an H-vector and A' an H x I matrix obtained by matrix projection (7.1.16), in particular by elimination (7.2.2), with H = M- L
where L = rankB
(9.2.7a)
and rankA' = H
(9.2.7b)
thus A' is of full row rank; see (7.2.6). Recall that the transformation (7.1.14) reads, according to (7.2.2)
) 'A" A,oc, c" J
I
1
, LtHM
(9.2.7c)
Chapter
9 - B a l a n c i n g B a s e d on M e a s u r e d Data - Reconciliation I
305
Let us designate R = F -1 .
(9.2.8)
Let us now assume that some :~ ~ M + obeys the m i n i m u m condition (9.2.5b). Having any other ~' ~ M + we can introduce the straight line tp(t) such that tp(0) = ~,, tp(1) = ~' (~ ~,) thus (9.2.9)
qa(t) = :~ + tw where w = :~' - ~, (;~ 0)
and where A ' w = 0 thus tp(t) e M + for any t. Denoting by ~ the scalar function
"~/(0 = (q)(0 -x+ )T R(q)(t)_x + )
(9.2.10)
we have (first derivative) (9.2.11)
~ ' ( t ) = 2(tp(t)-x + )T Rip'(t) where tp'(t) = w is constant, thus (second derivative)
(9.2.12)
xC"(t) = 2w T R w > 0
because w ~ 0 and R is symmetric positive definite. By the property of m i n i m u m at t = 0 where q~(0) = i we have ~ ' ( 0 ) = 0 hence the necessary condition reads
(~ _ X+ )T R w = 0 for any w ~ KerA' ;
(9.2.13)
indeed, any w ~ KerA' obeys A ' w - 0 thus any vector ~' = ~ + w obeys A ' ~ ' + e' = 0 thus ~' ~ M +. But then, as ~"(t) > 0 we have ~t'(t) > 0 for any t > 0 (and ~ ' ( t ) < 0 for any t < 0), hence ~(t) > ~(0) for any t ~ 0 hence, ~:' ~ M + having been arbitrary
(~,
_ X + )T R ( ~ '
- x § ) > (~-
x § )T R ( ~ -
x+)
(9.2.14) for a n y ~ ' ~ M + a n d ~ ' ~ z ~
.
H e n c e if some ~ e M + obeys the minimum condition, it is unique. Let now some ~, ~ M + obey the condition (9.2.13). Then, if ~' ~ M + is arbitrary, putting w = ~' - ~, and introducing again tp(t) and ~(t) as above, by ~ ' ( 0 ) = 0 and ~"(t) > 0 for t ~ 0 we find that the inequality (9.2.14) holds true; hence the condition (9.2.13) is also sufficient. W e have, so far, found the necessary and sufficient condition (9.2.13) for ~ M § to obey the condition (9.2.5b). Let us now set
306
Material and Energy Balancing in the Process Industries
= x+ + v
(9.2.15a)
where v = - FA 'T (A'FA
'T)-I
(A,x § + c')
(9.2.15b)
.
Then A'~,+c'=A'x
§
§
thus :~ ~ 914+, and if w ~ KerA' is arbitrary then VT R w
= - (A'x § +
c') T (A'FA
'T )-~ A ' F R w = 0
because F R is unit matrix by (9.2.8) and A ' w = 0 as w ~ KerA'. Thus ~ obeys also the condition (9.2.13) and as shown above, is unique. The proof is complete. The unique solution of the reconciliation problem can thus be found according to (9.2.15). Recall that A' being of full row rank, the inverse in (9.2.15b) exists. Other formulae giving this ~ can be found. So as to prove their validity, let us reformulate the necessary and sufficient conditions. The general form of the condition (9.2.7) is x ~ M +, with (9.2.3); the condition (9.2.7) is equivalent, whatever be A' resulting from the matrix projection (or elimination). Now for the condition (9.2.13). Observe that putting c = 0 in (7.2.1) we have also e" = 0 and e' = 0 in (7.2.2) and (9.2.7c). Thus in particular the equations
B"u + A " w - 0
}
A'w = 0
(9.2.16)
are equivalent to the equation
Bu + Aw = 0.
(9.2.16a)
Because B" is of full row rank L (7.2.4), if A ' w = 0 then there exists some u ~ R J such that both the equations (9.2.16) are satisfied, thus also Eq.(9.2.16a). Conversely if such u exists in (9.2.16a) then necessarily A ' w = 0 as the solvability condition. Hence w ~ KerA' if and only if Bu + Aw = 0 for some u ~ R J . We thus can reformulate the result, using the condition (9.2.13).
(9.2.17)
Chapter 9 - Balancing Based on Measured Data - Reconciliation I
307
The solution f~ of the reconciliation problem (9.2.5) with (9.2.1)-(9.2.4) exists and is unique. It is determined by the conditions :~ = x + + v ~ M +
(9.2.18)
with (9.2.3), and v x F-~w = 0
for any w ~ ~i such that
Bu+Aw-0
for s o m e u ~
(9.2.19) RJ .
The merit of the formula (9.2.15) consists in that it applies to any model (9.2.1) with any partition (9.2.2); we can have rankB = L < M, in which case some unmeasured variables are unobservable thus not uniquely determined by the reconciled ~. W e shall now give other formulae restricted, however, to the assumption (L =) rankB = J
(9.2.20)
(full column rank of B), thus to the case where, according to Chapter 7, the whole vector y of unmeasured variables is observable, thus determined by ~. Finding the solution of the problem (9.2.5) with (9.2.3) can also be regarded as a problem of reconciliation with unknown parameters (our vector y). With this interpretation and anticipating an extension to nonlinear problems, Knepper and Gorman (1980) proposed an iteration technique; see the next chapter. In the linear case, with the assumption (9.2.20), iteration is not necessary. Using the theoretical results of Kub~i~,ek (1969 and 1976), the solution can be found in one step. It will be rewritten according to Madron (1992). Let us introduce the (M+J) x (M+J) symmetric matrix AFA.r B ]
Z
BT
0
.
(9.2.21)
Let k ]
} M
Y
} J
(9.2.22)
t=
thus Zt = (
AFATkBTk + By
]
308
Material and Energy Balancing in the Process Industries
thus Zt = 0 implies BVk = 0 thus kTB = 0, and AFATk + By = 0 thus k TAFATk = 0 thus A Vk = 0, F being positive definite, thus finally By = 0 thus y = 0 by (9.2.20). Then, however Tk ] (B,
A) w k =
= 0
ATk
hence also k = 0, as (B, A) T is of full column rank; thus t = 0 if Zt = 0. Consequently Z is invertible. Observe that the condition (9.2.20) is necessary, else By = 0 for some y ~: 0 thus Zt = 0 for some t r 0 by (9.2.2) with k = 0.
Let us partition
Z -1
_
Q1,
Q12 )
} M (Qzl = QlV2 )
Q21 Q22
M
(9.2.23)
} J
J
and put k = - Q l l ( Ax+ + c)
= -Q21 ( Ax+ + c)
(9.2.24)
v - - F A T Qll (Ax+ + c) ~:=X+ + V .
W e then have
(,)--z-1(o) k
Ax++c
thus AFATk+B~'+Ax
§
BTk
=0 =0
hence, as v - F A T k B~' + A ( x § + v) + c - 0
thus x + + v e M +, and whatever be w such that B u + A w = 0 for some u we have
Chapter 9 VT F l w
- B a l a n c i n g B a s e d on M e a s u r e d Data - Reconciliation I
= k T AFF-lw
= k T Aw
309
= -k r Bu = 0
because BVk = 0 thus also kVB = 0. Hence ~ = x + + v is the unique solution of the reconciliation problem (adjusted measured vector), and in addition ~ is the unique (observable) vector y of unmeasured values determined by f~. The procedure (9.2.21), (9.2.23 and 24) requires only matrix inversion, without any elimination. The auxiliary vector k (called vector of Lagrange multipliers, due to the original derivation of the formula) can be eliminated. The solution (9.2.24) can be written in compact form V
(
AIj
0)/AFAT")I(Ax++c/0 .T 0 0
and
(9.2.24a)
~:=X++V
where Ij is unit J x J matrix. Observe that if rankB = L < J then By = 0 for some y r 0 and the equation Zt = 0 with (9.2.21 and 22) admits, as shown above, of a nonnull solution; thus Z is not invertible. Consequently, assuming of course again rankC = M in (9.2.2), Z is regular if and only if rankB = J
(9.2.25)
where Z is the matrix (9.2.21). The matrix Z is (M+J) x (M+J). Another formula, requiring inversion of smaller matrices (M x M and J x J), reads as follows. We introduce an arbitrary positive definite matrix Fy ( f o r example unit matrix Ij), denote F as Fx, and
Fz = Fx
/
(9.2.26) 9
Then the M x M matrix U = CFz C T= B F y B T + AFx A T
(9.2.27)
is also positive definite, C being of full row rank. Assuming again rankB = J, B v is of full row rank and the J x J matrix Y = B T U -1 B
(9.2.28)
is also positive definite. Let further W : U -1 ( U -
B Y -I n T )
( V -1 W T = W U - 1) .
(9.2.29)
310
Material and Energy Balancing in the Process Industries
Then ~r - _y-1 B T U-1 s +
v = -Fx A T W U
-is+
(9.2.30)
where s § = Ax + + c;
here, .~ is again the unique value of y determined by the estimate (9.2.30a)
~-x++v. W e have
(9.2.31)
BTW=0 by (9.2.29 and 28). Then, by (9.2.27) A i + c = s + - AFx AT W U l s + = s + - U W U l s + and with (9.2.29) B~' = - B Y 1 B T U l s + = ( U W - U ) U l s + = U W U l s + - s + hence B:~+Ai+c=0 thus ~ ~ 914+, with the uniquely determined S'. Let now w ~ 1~~ obey B u + A w = 0 for some u, hence Aw
= -Bu.
Then v T Fx-lW = _(U-is+ )T W T A w = ( U - i s + )T W T B u = 0
as W T B = 0 by (9.2.31). Hence the conditions (9.2.18 and 19) are satisfied and (9.2.30 with 30a) is the unique solution.
Remarks
(i)
From (9.2.15b) follows immediately that replacing matrix F with an arbitrary kF where k > 0, we have kk -1 =1 hence v thus ~ remains unaltered. The value of the criterion (9.2.5b) will be, however, inversely proportional to k.
Chapter 9 (ii)
-
311
Balancing Based on Measured Data - Reconciliation I
Clearly, if H = 0 (9.2.7a) then the condition (9.2.7) is absent, we have M + = R I and the minimum (9.2.5b) is attained with ~, = x§ no adjustment. If then L = rankB = J this means that M = J, thus B is J x J regular and ~ is uniquely determined by :~ = x § On the other hand, if it happens that H = I then A' in (9.2.7) is I x I regular, thus in such case vector x is uniquely determined by the constraints and need not be measured. Finally, if J = 0 (all variables measured), we can set A' = A and c' = c in (9.2.15b) because no elimination is necessary due to the assumption (9.2.1a) where C = A. Summarizing the special cases H = 0: v = 0
(9.2.32)
[H = I: ~ = - A ' - l c ']
(9.2.33)
J=0:
(9.2.34)
v = - F A T(AFA T)-I(Ax + + c ) ;
the case when H = I means, however, that the whole vector x is a constant of the model and not variable. (iii)
Recall the classification of variables by Chapter 7. Let some measured variables, say subvector x 0 be nonredundant; thus having re-ordered the variables we have
x* ) }I-Io
x =
Xo
and
A'= (A*, 0)
(9.2.35a)
} Io the covariance
according to (7.2.7). Let us partition corresponds to the above partition
matrix
as
F* F' / F =
F 'T Fo
.
(9.2.35b)
Then, with the corresponding partition of x § in (9.2.15b) we have (9.2.36a)
A ' x § + c' = A*x *+ + c';
consequently, the adjustment v is independent of the measured subvector X+ 0 9 Further A ' F A 'T = A* F* A *T thus
V =
( -
F* A*T F' T A, T
/
(A*
F* A *T)-1 (A*x *§ +
,
c) =
(v,) Vo
(9.2.36b)
312
Material and Energy Balancing in the Process Industries
is partitioned into the corresponding adjustments v* of x *+ and v0 of x0+.
If the components of the error vector are uncorrelated then F' = 0 thus v 0 = 0: the nonredundant variable is then nonadjustable. If, however, F' ~ 0 then generally v 0 ~ 0: for example if H = 1, A' = (1,0), c' = 0, and
11,2 / 1/2 1
9
(F is positive definite, as the reader readily verifies), we have v - (v*, v0 )~ where 9
v =-x
*+
andv 0=-
1 2
x
*+
the nonredundant variable thus shares a portion of the adjustment with the redundant one, being correlated, although its measured value itself does not affect the adjustment. This (seemingly paradoxical) result is a consequence of the minimum condition (9.1.14), for a Gaussian error vector thus of the maximum likelihood principle. (iv)
The reconciliation formula (9.2.30) can be obtained formally as a limit for the case when all the variables are measured, but the (arbitrary) covariance submatrix Fy is replaced by Fy + klj where k ---> +0% thus when all the y-error variances tend to infinity; then there remains only x + to be reconciled. The idea is due to Romagnoli and Stephanopoulos (1981). Let us stress once more that the result is independent of the choice o f Fy.
9.3
STATISTICAL CHARACTERISTICS OF THE SOLUTIONS; P R O P A G A T I O N OF E R R O R S Let us start from the expression (9.2.15b) for the adjustment v. Designate
r' = A ' x § + c' ;
(9.3.1)
it is the residual of the equation (9.2.7) with x = x § Thus v = -FA '+ ( A ' F A '+ )-~ r ' . According to (9.2.4) where A ' x t + c' = 0
(9.3.2) Xt
obeys, by hypothesis (9.3.3)
Chapter 9 - B a l a n c i n g B a s e d on M e a s u r e d Data - Reconciliation I
313
we have r' = A ' e
(9.3.4)
with (unknown) random error vector e. Thus also r' is a random variable and because A' is of full row rank H, it has a probability density; see Appendix E. According to (E.1.22 and 23), we have E(r') = 0
(9.3.5)
by hypothesis (9.2.4a), and (say) F c = E ( r ' r 'T) = A ' F A '+
(9.3.6)
according to (9.2.4b). Fc is positive definite. If the error vector is Gaussian then also the residual vector r' is Gaussian. We assume of course H > 0 (else v = 0 according to Remark (ii) to Section 9.2). On the other hand, we can assume H < I; see (9.2.33). But then rankA 'T = H < I hence A 'T is not of full row rank and the random variable v does not have a probability density as introduced in Appendix E. The covariance matrix of random variable v is thus (positive semidefinite but) singular (not regular). If e is Gaussian, the adjustment vector v has a 'degenerate' Gaussian distribution; we shall not examine its properties. We have anyway the mean E(v) = 0
(9.3.7)
and the covariance matrix F v = FA 'T F~!A'F
(9.3.8)
according to (9.3.6). Also the random variable ]K-Xt, thus the error committed by the estimate ~, is of zero mean, but does not have a probability density. See Remark (iii) at the end of this section. Let us now consider the value (9.2.5b) at ~-x + = v where the minimum is attained. Denoting Omin = vT F-iv
(9.3.9)
where v is the adjustment (9.3.2), we have again a random variable. We have Omin = r'T F~!r'
(9.3.10)
with (9.3.5 and 6). If in particular e is Gaussian then r' is Gaussian and according to Appendix E, Section E.2, Qmin has the chi-square distribution with
314
Material and Energy Balancing in the Process Industries
H degrees of freedom, as r ' is an H - v e c t o r r a n d o m variable. O b s e r v e that whatever be the distribution of r a n d o m variable e (thus of r ' ) , w e h a v e the m e a n E(Qm~n ) = H .
(9.3.11) m
Indeed, let X be an arbitrary random variable (M-vector), E(X) = x, with covariance matrix F x . Then, for any x 1 (X-X) T F x 1 (X-X) = yT d i a g
-al
,
,.~
y
aM
~
u
i=1 a i
where y = QT (x-x) with orthogonal matrix Q diagonalizing F x QT Fx Q = diag(at,
(9.3.12)
, aM )
with eigenvalues a~, ..., aM (> 0). Thus M 1 (say) E(Q) = E((X-~)TFx ~(X-~)) = Z - - E(yi2 )
(9.3.13)
i=1 a i
where E(yyr ) = Qr Fx Q thus in particular E ( y 2 ) -- a i
by (9.3.12), thus the mean (9.3.13) equals M
ai
E(Q) = Z - - = M
(9.3.14)
i=1 a i
Setting x = r', x = 0, and H = M we have (9.3.11). L e t us further c o n s i d e r the solutions y of Eq.(9.2.3) w h e r e R = x § + v has b e e n adjusted so as to m a k e the equation solvable. A c c o r d i n g to Section 7, w e thus h a v e to solve Eq.(7.2.2)
B"y + A"~ +c" = 0 ;
(9.3.15)
recall the t r a n s f o r m a t i o n (9.2.7c). U s i n g the special f o r m (7.2.3) of m a t r i x B", if Lo > 0 then an L0-subvector of y, say Y0 is uniquely d e t e r m i n e d (observable); if A~ resp. c~ is the c o r r e s p o n d i n g L o x I submatrix o f A " resp. L0-subvector of c", w e h a v e Yo = $% w h e r e
Chapter
9 - B a l a n c i n g B a s e d on M e a s u r e d D a t a - Reconciliation I tt
A
tt
Yo = -(Ao ~' + Co ) 9
315
(9.3.16)
Let y~ be the (hypothetical) true value of Yo; it then obeys the same equation with x t in lieu of ~,. Subtracting Yo- Y~ = -Ao (e + v)
(9.3.17)
because ~ -/tl t = ]K - X+ 4" X+ - Xt = V "1- e by (9.2.4). Hence Yo-Y~ is a random variable (Lo-vector), E(.~o-y~ ) - 0
(9.3.18)
by hypothesis (9.2.4a), and the covariance matrix F~o = E((Yo-Y~ )(Yo-Y~ )T )
(9.3.19)
equals F ~ o - A~ E((e + v)(e + v) T )AoT . Here, e + v = Pe
(9.3.20)
where P = I - FA 'T ( A ' F A 'x )-~ A' (I ... unit I x I matrix)
(9.3.21)
according to (9'3.2 and 4). Consequently Fyo = (A~ P)F(Ag p)T.
(9.3.22)
Generally, the covariance matrix Fyo need not be positive definite and the random variable Yo need not have a probability density, unless, according to Appendix E, the matrix Ag P is of f u l l row rank L o . It can be shown that this necessary and sufficient condition is equivalent to the condition
(A~/
rank A'
= H + Lo
(full row rank).
(9.3.23)
316
Material and Energy Balancing in the Process Industries
Proof'. Let x e KerA'; then Px = x thus KerA' c ImP. Let x e ImP; then, for some y x = y - F A 'r ( A ' F A 'r
)-1 A ' y
thus A'x = A'y - A'y = 0 hence x ~ KerA', thus I m P c KerA'. Consequently
(9.3.24)
I m P = KerA' .
According to Appendix B:(B.10.31), there exists a regular (orthogonal) I x I matrix Q such that
A'Q = ( A §
H I-H where A § is H x H regular. We then can partition
AoQ=(M,N)
}Lo
H I-H thus
/A~ Ao
/MN/
Q=D=
A§
0
.
(9.3.25)
Let us partition
Olx /
Yo
}
I-H.
Thus x ~ KerA' (= ImP) if and only if
A ' x = 0 thus (A § 0)
= A+y+ = 0 Yo
thus if and only if 3,+ = 0, thus if and only if
Q-ix -
(~
with arbitrary Yo e RIH.
Yo Then
Aox = A o Q Q l x = (M, N)
/~
= Ny o .
Yo Consequently, by (9.3.24), A; P is of full row rank if and only if the vectors Ny o
Chapter 9 -
31~/
Balancing Based on Measured Data - Reconciliation I
(Yo ~ RVl~) generate the whole R Lo, which means rankN = L0. (i)
This condition implies
rankD = rank
/ MN )
= H + Lo
A+ 0 because rankA+ = H. Let conversely rankD = H + L 0 . Then, by successive regular transformations
(ii)
/MN/ /MN / _ A§ 0
IH 0
IH 0
} H
with unit matrix Is eliminating the elements of M; thus rankN = L0. Consequently, rankN regular, we have
= Lo if and only if rankD
rank(A~'P)=Loifand~
= H + L o . But because Q in (9.3.25) is
I =~H + L o A ,
which is (9.3.23).
Let in particular L = rankB = J (thus L o = L), thus let the whole vector y of unmeasured values be observable, thus determined by ~ as ~. Then Ag = A" in (9.3.23), H + L o = H + L = M, and the matrix (9.3.23) is transformed matrix A (9.2.2), according to (9.2.7c). Thus the necessary and sufficient condition for rank(A"P) = J (= L) reads rankA = M
(9.3.26)
(full row rank). Then the random variable ~_yt has a probability density, and if the error vector e is Gaussian then the distribution of the variable is also Gaussian, and the random variable Qy = (~_yt)T F~I ( y _ y t )
(9.3.27)
has the chi-square distribution with J degrees of freedom. Here,
F~ = (A P)F(A P) T tt
t!
(9.2.28)
318
Material and Energy Balancing in the Process Industries
with (9.3.21)and (9.2.7c) where B"=
(9.3.28a)
Ij
is unit J x J matrix, thus where Gauss-Jordan elimination has been applied to matrix B. The expression (9.3.28) for Fy holds anyway; under the (necessary and sufficient) condition (9.3.26), Fy is positive definite. The matrix F~ can be computed using other formulae. In (9.2.24), subtracting again yt we have S' - yt = -Qxl Ae . Computing ZZ ~ = IM§J (unit matrix) according to (9.2.21 and 23), we obtain matrix equations for the submatrices in (9.2.23). They read AFAT Q l l + BQT2 = Ira BT QlJ
AFAT Q12 + BQ22 = 0
= 0
BT Q n
= Ij (thus QT2 B = I j ) .
Hence F~ = Q21 AFAT Q12 = -QT2 BQ22 = -Ij Q22 " thus
F~
=
(9.3.29)
-Q22
where Q22 is the J • J submatrix in (9.2.23). Using the formulae (9.2.30) we obtain ~, _ yt = _y-i B T U - 1 A e
hence F~ = y-1B T U-1AF x A T U-1By-i where AF x A T = U - BFyB T (9.2.27) thus F~ = y-1B T U-1 By-1 _ y-1B T U-1BFy B T U 1 BY "1 with (9.2.28)" consequently
F~ = y-i
_ Fy
(9.3.30)
where Fy is arbitrary (for instance unit) J x J matrix, and Y the J • J matrix (9.2.28) with (9.2.27).
Chapter 9 - Balancing Based on Measured Data - Reconciliation I
319
Remarks
(i)
Consider in particular the system of mass balance equations (Chapter 3). Then the reduced incidence matrix C of graph G in (3.1.6) is partitioned C = ( B, A ) jo j+
(9.3.31)
according to (3.2.1), where J+ is the set of streams with measured flowrates ('measured streams'), j0 corresponds to the unmeasured ones. Hence A is reduced incidence matrix of the subgraph G § [N, J+] restricted to the measured streams. The condition (9.3.26) of full row rank is thus equivalent to the condition: G + [N, J§ ] is connected.
(9.3.32)
The condition of observability, thus rankB = J = I J~ requires that all the connected components G Oof subgraph G O[N, j0] are trees (possibly isolated nodes), as shown in Section 3.3. Under these two conditions, the covariance matrix Fy is positive definite. Consider for example Fig.3.6 in Section 3.2. The subgraph G O consists of isolated nodes and two (nontrivial) trees; hence y is observable. We have K = 5 for the number of connected components G O, thus K- 1 = 4 scalar equations (3.2.3) for reconciliation, and by the adjusted measured mass flowrates, the 4 unmeasured flowrates are uniquely determined; the covariance matrix F~ can also be computed. But the subgraph G § has two connected components (one of them containing stream J2 only), hence is not connected, hence F~ is not positive definite. (ii)
The means and covariance matrices of the computed variables characterize statistically the propagation o f errors in the (linear) system. Generally, if some (vector) variable x is measured and some other y is a (deterministic) function of x, committing an error in x this error is propagated among the components of y. In the present case, with measured x = x § the unmeasured y is determined only if x obeys the solvability condition; we thus can examine the (observable) components of y only as functions of the adjusted (reconciled) values ~. Let generally some vector u be determined as function of the state variable z (9.2.2) obeying Eq.(9.2.1). Having measured only x, the value of u can be computed only if y is observable, in which case we obtain first ~ by reconciliation, then ~ as an estimate
320
Material and Energy Balancing in the Process Industries
$, = M~ + d
(9.3.33)
with J x I matrix M and J-vector d. Thus by (9.3.16) where L o = L - J (the observable case), M = -A" and d - -c". Let u be linear in z, plus some constant, thus (say) (9.3.34)
u = D y + E x + Uo
with constant u o. If u depends only on (observable) subvector Y0 (or is independent of y), we replace y by Y0 (or set D = 0). The true (unknown) value of u obeys U t --
Dy t + Ex t + u o
(9.3.34a)
while using the estimates ~, and ~', we can estimate (9.3 34b)
fi = D~' + E ~ + U o .
Then the error in the fi-estimate fi- u t = D(.~-
yt) + E ( ~ - x t )
is a random variable. We have ~- x t
(9.3.35) = vq-e
andS'- yt = M(v+e) thus .
- u t = (DM + E)(v + e) .
.
(9.3.36)
B y hypothesis (9.2.4a) E(fi
- i1 t ) = 0 .
(9.3.37)
Further, for e+v we have (9.3.20). Hence the covariance matrix Fa - E ( ( f i - u t ) ( 1 1 -
U t )T) :
NFN T
(9.3.38)
where, with (9.3.21) (9.3.38a)
N = (DM + E)P
is V x I if u is a V-vector. We can now repeat, step by step, the proof of (9.3.23) where D M + E is substituted for A~. Consequently DM+
FQ is positive definite if and only if rank
A'
E
I
-H+V
(9.3.39)
Chapter 9 - B a l a n c i n g B a s e d on M e a s u r e d D a t a - Reconciliation I
321
where A' is an (arbitrary) matrix obtained by matrix projection (7.1.16), for instance by the procedure according to Section 7.2, of full row rank H. Then, if the error vector e is Gaussian the random variable fi- u t is also Gaussian, and the variable QQ = (fi_ Ut )T F~u1 (I]- Ut )
(9.3.40)
has the chi-square distribution with V degrees of freedom. When the equations are nonlinear, the propagation of errors is a delicate problem of statistical theory that will not be discussed here. In practice, some information can be obtained from linearized equations; cf. Section 10.3 below. (iii)
Let us return to the matrix (operator) P (9.3.21). According to (9.3.24), its rank equals the dimension of the null space KerA', thus I-H because rankA' - H. Hence, so long as H > 0 (else v = 0 and no reconciliation takes place), the I • I matrix P is not of full rank. Because, by (9.3.20) -
X t --
V
"4- e
-
Pe
(9.3.41)
the random variable (error committed by the estimate ~) is of zero mean E(i-
x t) = 0
(9.3.42)
by (9.2.4a), while the covariance matrix F~ = E ( ( i - Xt ) ( X - Xt )T) _ pFpT
(9.3.43)
is positive semidefinite, but singular. The random variable :~- x t does not have a probability density as introduced in Appendix E. According to (9.3.41), its values occupy a lower-dimensional space, viz. KerA' by (9.3.24). Observe that the latter space, as well as the matrix P, are independent of the particular transformation of the original equation (9.2.1) with (9.2.2). Indeed, see (7.3.1); because, taking another matrix for A', the new matrix (A'~, say) obeys A'~ = ZA'
(9.3.44)
with regular Z[H, H], we have A'x - 0 if and only if A'~ x - 0 thus KerA' - KerA'~, and the new P (say, P1 ) equals P1 - I - FA 'T Z T ( Z A ' F A 'T Z T )-1 ZA'
= I - FA 'T Z T ( Z T )-1 (A,FA,T)-1 Z-1 ZA' =P
.
322
Material and Energy Balancing in the Process Industries
Recall that
(9.3.45)
Px = x for any x r KerA' = ImP by (9.3.24). Let us designate
(9.3.46)
p* = FA,T (A,FA,T)-1 A' = I - P thus P* is also independent of the transformation. We have P*P = 0 and PP* = 0, while P P = P and P'P* = P*
(9.3.47)
as is readily verified. Any x ~ R N equals x = Ix = Px + P*x
thus R N = ImP + ImP* where (IMP) n (IMP*) = {0}
(9.3.48)
because x = PY0 = P'Y* implies Px = PP*y* = 0 and P*x = P*PY0 = 0 thus x = 0. Consequently, according to Appendix B: (B.3.4), the spaces KerA' = ImP and ImP* are
supplementary. The matrices (operators) P and P* are projectors into KerA' = ImP and IMP*, respectively. The two subspaces have the property that if x 0 ~ KerA' and x* ~ ImP* then x~F-lx * = 0 because if x o = PYo and x* = P'y* then
(9.3.49)
y*Tp*T F-1PYo = y*TF-1 P*PYo = 0 .
The result can be interpreted as follows. If the covariance matrix F is diagonal then generally, for two/-vectors x 1 and x 2 of components x~i resp. x2i
T F - 1X2 = X Xl,
I Xli X2i
i=l
(5i2
is the canonical scalar product of'normalized' (re-scaled) vectors (Xli/(Yi) and (x2~/cYi); if it equals zero then the two latter vectors are orthogonal (perpendicular to one another in the classical threedimensional space if I = 3). [If F is general, one can imagine the two vectors expressed relative to their 'proper' coordinate axes; see the fine-printed note after formula (9.1.9c).] The decomposition (9.3.48) by the projectors P and P* is thus an orthogonal decomposition in the generalized sense (9.3.49), via the 'normalizing' matrix F -1. Now by (9.3.20), the adjustment vector v = (P-
I)e = -
P*e
(9.3.50)
Chapter 9 - B a l a n c i n g B a s e d on M e a s u r e d Data - Reconciliation I
323
taken with opposite sign is, in this sense, the (minus) projection of the error vector e into the subspace orthogonal to KerA' = ImP. If I = 2, imagine
X2/0 2
+:A-x+c'=0 ^
/
/
9 X+
Fig. 9-4. Orthogonal projection of error vector
in the 'normalized' (re-scaled) coordinates. The reader can perhaps also imagine 914+ as a straight line or plane in 3-dimensional space. The portion ~,- x t = Pe tangent to the set 914+ remains unadjusted. We only know (assume, since by hypothesis E(e) = 0) that its statistical mean equals zero, and that the covariance matrix is (9.3.43). (iv)
Let us apply the result (9.3.39) to two special cases. First, let u (9.3.34) be the i-th component of the measured vector x; hence D = 0, u 0 = 0, and E = ~i is the i-th unit row/-vector; for example 8~ = (1, 0, . . - , 0). k
Y
/
I The rank of matrix (9.3.39) is > H as rankA' = H. Let it equal H thus ~i is linear combination of the rows of A'. Then, given vector x obeying the solvability condition A'x =-c'
since ~i X "- Xi this xi is a linear combination of the components of (-c'), hence xi is a constant of the model and not variable. Precluding such case, the condition (9.3.39) is always obeyed for any i = 1, ... , N. Consequently, by (9.3.38) 0.2xi = E ( ( ~ i -Xi t)2 ) > 0 (i = 1, .-., N)
(9.3.51)
324
Material and Energy Balancing in the Process Industries
and if e is Gaussian, the variable (9.3.40)
0 .2
has the onedimensional )~2-distribution giving the probability P{lxi-x{I
< ao~,} for any a > 0
which, in this case, follows directly from the standard normal distribution (see the next remark). Let further u be the j-th component of unmeasured variable y; let yj be o b s e r v a b l e . Thus E = 0 and u0 = 0 in (9.3.34); while D = ~Sj where ~ij is the j-th unit row J-vector. Hence, with DM + E =-~Sj A" as remarked after formula (9.3.33), the matrix is the j-th row vector (say) -~j of matrix -A". The same consideration as above then shows that if
rank
= H (exceptional case)
then % is linear combination of the rows of A', thus yj = -t~jx - c]' (9.3.16) is constant whenever x obeys the solvability condition, thus yj is a constant of the model. Precluding again this case, the condition (9.3.39) is again satisfied and cyyj2 = E((~j- y} )2) > 0 (for yj observable)
(9.3.52)
If e is Gaussian then (~j- y} )2/(y?Yj has again the onedimensional )(;2-distribution and the probability P{[~j-y~ I < boyj} for any b > 0 follows from the standard normal distribution.
(v)
In practice, the distribution of errors is considered Gaussian. For a Gaussian scalar variable x, of zero mean and standard deviation CYx,the variable y = x/c~ x has the standard normal distribution, as is readily shown by substitution in the formula (E.2.5) for N = 1, thus
Chapter 9 -
B a l a n c i n g B a s e d on M e a s u r e d D a t a - Reconciliation I
1
P{x 0) the standard deviation of the i-th adjustment. Hence the where
(Yi
reconciliation cannot but decrease the standard deviations of the estimates, i.e. improve their precision. It will be shown in the next section (9.4.7) that at least with uncorrelated errors, we have even o 2v i > 0 unless the i-th variable is nonredundant (nonadjustable). Hence in the most frequent case, the reconciliation improves the precision of
redundant variables' estimates.
9.4
GROSS ERRORS
Statistically, a gross error is an error whose occurrence as realisation of a random variable is highly unlikely. It can arise out of inattention, a fault in the measuring instrument, erroneous calculation, or some other unforeseen event. The presence of a gross error corrupts also the results of other measurements and estimates, due to the propagation of errors in the reconciliation and unmeasured variables' estimation. A detailed analysis lies beyond the scope of the present book. Let us only summarize the theoretical possibilities for detection and identification of gross errors. See further for instance Madron (1992). The presence of a gross error can be (not necessarily) detected when computing the criterion (9.3.9) Qmin = vT F - i v
(9.4.1)
where F is the covariance matrix of measurement errors, and v the adjustment of the measured vector x +, thus :~ = x + + v
(9.4.2)
is the reconciled value of x, obeying the solvability condition (9.2.3), thus ~ M + (9.2.5a), and minimizing the criterion (9.2.5b). Assuming, as is common in practice, that the vector of random errors has a normal (Gaussian) distribution, the distribution of the random variable Qm~nis ~2 (/_/) where H is the degree of redundancy (9.2.7a); see (9.3.10). Given some ct (0 < ct < 1), with probability
330
Material and Energy Balancing in the Process Industries
ct the value of Qn~n will not exceed the quantile Z~-~(H); taking a critical value of ot (say, ct = 0.05 thus 1 -tx = 0.95) we have 1 -
Qmin > ~-a (H)
(9.4.3)
with probability oc Thus if ct = 0.05 then the event (9.4.3) occurs with probability 5 %. Regarding such event as unlikely, exceeding the critical value (9.4.3) signals the presence of a gross error. Observe that an error in measuring some nonredundant variable does not affect the value of the residual r' according to (9.2.36a); hence such (even gross) eror is not detected. [It can, however, still corrupt the estimate $, of the unmeasured variables.] Having detected the presence of a gross error, we further search for its source. The simplest method is computing standardized adjustments. According to (9.3.8), the i-th diagonal element of matrix F~, thus the variance of the i-th adjustment equals 0.2v,- ~ i F A , T F~,A -1 , F ~ Ti where ~5i is i-th unit row/-vector. In the sequel, we shall limit ourselves to the case when the covariance matrix F is diagonal. Then ~i F
= f i ~i
where f
= 0.i
(> o)
(9.4.4)
is the i-th diagonal element of F thus the variance of the i-th component e i of error vector e = (e, , . . - , e, ) T .
(9.4.5)
Let us write A' - (a'~, -.., a'~)
(9.4.6)
thus a'i is the i-th column vector of matrix A' (9.2.7). Consequently 0 .2Vi =
-1 ~ f2i ai,T F~,ai
(> 0 whenever ai ~ 0)
(9.4.7)
is positive for any redundant variable; recall that the nonredundant variables Xh are uniquely identified by a~, = 0, according to Section 7.1. Then, if u = (121 , ... , k, I )Y
the standardized adjustment of a redundapt variable is defined as
(9.4.8)
331
Chapter 9 - Balancing Based on Measured Data - Reconciliation I vi zi -
(9.4.9)
. (Yvi
The
variable
with greatest absolute
value ]zil
is c o n s i d e r e d
most
suspect
being the source of a gross error. Here and also in the sequel, we shall need some additional remarks concerning the generalized Euclidean scalar products and norms of vectors. See Section B.10 of Appendix B. Let S be generally a symmetric positive definite N x N matrix. Designate (9.4.10)
( a [ b ) s = a T Sb and llalls = (a [ a)su2
for any two N-vectors a, b; if S is unit matrix, we have the canonical Euclidean scalar product (B. 10.1) and norm (B. 10.3). We can again introduce the notions of orthogonality and orthogonal decomposition with respect to (9.4.10); let us briefly outline the construction. Two vectors a and b are called S-orthogonal if and only if
(9.4.11)
(a I b)s = 0 . Let Q be an orthogonal matrix diagonalizing S, thus QT SQ = diag(s 1 , --. , SN) 9 Denoting T = diag(~/s,, ... , ~/SN) we have ( a l b ) s = (a' [ b') where a' = TQTa and b' = TQTb
and where (a' [ b ' ) is the canonical scalar product; hence ( a l b ) s = 0 if and only if (a' I b') = 0, whatever be the diagonalizing orthogonal matrix Q. Let V be a subspace of IIN; for a moment, let us designate V' = T Q T V the space of vectors TQTv where v ~ 'g. If V '^ is the canonical Euclidean orthogonal to V' introduced according to (B. 10.13), let % " = (TQT) -1 V ,^ be the space of vectors (TQ T ) l w where w ~ V'". Then b ~ Vs^ means, for any a ~ V (b I a)s = (b' I a') where
b'=TQTb~
V '^
a' = T Q T a E
V'
hence (b' I a') = 0, hence (b[ a)s = 0. Thus given 'I7, the subspace denoted as Vs^ is the S-orthogonal to 'E. It is uniquely determined by the condition b e Vs^ if and only if ( b [ a ) s = 0 for any a e V.
(9.4.12)
of
Material and Energy Balancing in the Process Industries
332
W e shall not need the construction, but only the fact that the S-orthogonal is uniquely determined and, as is readily shown is a supplementary subspace to '12, hence dim qTs^ = N - dimq/'
(9.4.13)
as in (B.10.14). For any vector x e R N , we thus have the unique S-orthogonal
decomposition x = xl + x2 where xl e q/and x 2 e q2s^ .
(9.4.14)
Let now a and b be two nonnull elements of R N . Taking q/as the onedimensional vector space generated by vector a, b is uniquely decomposed b=ka+b'
whereke
Rand(alb')s
=0.
Thus (a I b)s = kllall~ while lib I1~ = k 2llall~ + lib' I1~ hence (alb)~
= k2llalls2 [lall~ Ilalls2 (k2 Ilall~ § IIb'lls2) -- Ilalls2 Ilblls2
with equality if and only if b' = 0. Consequently I (a [ b)s [ -< Ilalls Ilblls
(9.4.15)
with strict inequality unless vectors a and b are parallel thus b = ka, k ~ R. W e further have (llalls + Ilblis)2= Ilall~ + Ilbll~ + 211alls Ilblls and Ila + bll~ = (a + b l a + b)s = Ilalls2 + Ilbll] + 2(a ] b)s -Ilalls2 + Ilblls2 + 211alls Ilblls by (9.4.15), hence
Ila + blls ~ Ilalls + Ilblls
(9.4.16)
with strict inequality unless a = 0 or b = 0. or b = ka, k > 0; in particular
Ila + bll~- Ilall~ + Ilbll~ if (a I b)s = O.
(9.4.16a)
Chapter
9 -
Balancing Based on Measured Data - Reconciliation I
333
In (9.4.7), let us put S = F~!
(9.4.17)
which is an H • H symmetric positive definite matrix. Thus (9.4.7) (y2
2
,
2
, 2
v~ = fi (a'i]ai)s = f i ]lai
IIs
9
(9.4.18)
On the other hand, by (9.3.2) with (9.3.4) and (9.3.6) v = -FA'T SA'e
(9.4.19)
hence by (9.4.4) with (9.4.5) and (9.4.6) I
Vi ---- - f (all fl ej a~ )s
9
(9.4.20)
Consequently, according to (9.4.9), for any redundant variable x i 1
Zi
-"
Ila'ills
I
E ej (a'i I a] )s
9
(9.4.21)
J=l
Let some j-th redundant variable be subject to gross error ej; neglecting the other e i we have
r zjl - l ejl
1
]la]lls while I z~ I
- [ejl Ila~lts I(a'i laS)s I [ ejl Ila]lls
by (9.4.15), hence I Zi I ~ ]Zjl
(9.4.22)
for any other redundant variable xi, with equality only if the column vectors a'i and a I are parallel. This inequality motivates looking for the source of a gross error among the variables with greatest value of I z~l. Observe that if the column vectors a] and ah are parallel then I zi I = I Zh I
(9.4.23)
because then a~, = ka'i thus in (9.4.21) (a~la I )s = k(a] ] a~ )s for each j and Ila~lls- I kl Ila'ills, hence zh = - % . So in particular for a mass balance, the
Material and Energy Balancing in the Process Industries
334
(nonull) vectors a'i are columns of the reduced incidence matrix of the graph obtained by merging the nodes connected by unmeasured streams; see Chapter 3, graph G* and Eq.(3.2.3). For two parallel streams of G* (such as Jl and J2 in Fig. 3.7), the two corresponding column vectors are parallel (being of the same two endpoints), hence we have the equality (9.4.23). For a system of mass balance equations, the method of standardized adjustments makes no distinction among parallel streams of the reduced graph G*. Because gross errors are (considered) responsible for values of amin exceeding the critical value (9.4.3), one expects that including the measured variables subject to gross errors among the unmeasured ones will decrease Qmin substantially, in the manner that the new Qmin will not exceed the critical value 2 XI-~ (H-H~); H~ is the number of the deleted measured variables. Instead of performing new reconciliation for any such tentative deletion, methods have been proposed for direct computation of the new Qmin(Romagnoli and Stephanopoulos 1981, Crowe 1988). It can be shown in particular that deleting one (redundant) variable (say, xi ), the new value (say) O ~r ~) equals lo(i) ~,min =
Qmin-Zi2
(9.4.24)
where z i is the standardized adjustment (9.4.9). Let us first prove a lemma. Let A[M, M], B[M, N], C[N, N] be three matrices such that
D=
(A" / BT C
(9.4.25)
is symmetric positive definite.
Then, clearly, A =
A T, C - C T,
and because, for any w, r 0 resp. w2 :;/: 0
0D/ 0w / = wTAw, > 0 resp. (0, wT)D (0/
= wTCw: > 0
W2
we have A and C symmetric positive definite. In addition D is invertible, thus the partitioned matrix
D_l= / U Z ) } M ZT
W
M
N
}
(9.4.26)
N
is also symmetric positive definite and U, W are symmetric positive definite. Since
/ / Au+"zT Az+"w /
/ A "/( BT C
ZT W
BTU + C Z T BTz + C W
C h a p t e r 9 - Balancing Based on Measured Data - Reconciliation I
335
is unit matrix, we have AU + BzT= IM
AZ+
BW=0
(unit matrices) BTu + C Z T= 0
B Tz + C W = I N hence Z = -A l B W
and also
Z T "- - C -1 B T U
(9.4.27)
thus from A U - B C "l B T U = I M and
-B T A "l B W + C W = I N
follows (A - B C -1B T )U = I M and
(C - B T A l B ) W = I N
(9.4.28)
where A - BC l BT =
U "l
is M x M s y m m e t r i c positive definite
(9.4.29)
and C - BTAtB
= W t is N x N s y m m e t r i c positive definite.
T h e l e m m a thus determines the inverse of the partitioned matrix (9.4.25). It will be also later useful.
Let us now return to the adjustment v computed by (9.3.2) V - -FA 'T ( A ' F A 'T )-1 r'
(9.4.30)
where (9.3.1) r' = A ' x + + c'
(9.4.31)
with a m i n by (9.4.1). W e already know that deleting the measurement of a nonredundant variable does not alter the value of Qmin ; a nonredundant variable x h is characterized by ah = 0 in (9.4.6), hence we suppose a'i ~ 0 for a deleted variable x i . More generally, let us delete some H~ (< H) measured variables, say x 1 , ..., XH~ with an appropriate re-ordering, and assume that the column vectors a'i (i = 1, . . . , H 1 ) are linearly independent. The deleted variables are now formally regarded as unmeasured. Matrix A' is partitioned
A'=(A
1,A
2) }H
Hi I-H1
(9.4.32)
336
Material and Energy Balancing in the Process Industries
where A~ is of column vectors al, .-. , a'Hi , with full column rank '
rankA 1 = H 1
(9.4.32a)
Our goal is to prove the formula (9.4.33)
Qmin = Q2 + ~
where Q2 is the new (reduced) value of the criterion (with H 1 measured variables deleted), and where 5 = r 'T Nr'
(9.4.33a)
with (9.4.33b)
N = SA~ (AT SA1 )-I A T S ;
S is the matrix (9.4.17). Recall the full row rank of matrix AT, thus AT SA~ is invertible. By regular transformation, using H x H regular matrix Z1
} H1
Z2
} 1-12= H-H 1
(9.4.34)
Z
we obtain
ZA' =
/iI
H1
0 A~
thus ZA~ =
/ill 0
(9.4.35)
H1 with H~ x H1 unit matrix 11 . The transformation corresponds to the elimination of H2 linearly dependent rows of matrix A~. The equation (condition of solvability) A'x + c' = 0 now reads, in equivalent form (Z1A'x
+ Zlc' = 0 and)
(Z2AIX1 +) Z2A2x 2 + Z2g' = 0
where x 1 is the subvector of deleted variables; we have Z2 A1 = 0. Because x2 is now the vector of variables regarded as measured, the second equation is the new condition of solvability. By reconciliation, with residual
r~ = Z2 A2x~ + Z2 c' = Z2 (A~x~ + A2x~ + c') = Z2 r'
(9.4.36)
337
Chapter 9 - B a l a n c i n g B a s e d on M e a s u r e d D a t a - Reconciliation I the new value of the criterion computed according to (9.3.10) with (9.3.6) equals Q2 = (Z2 r') T (Z2 A2 F2 (Z2 A2 )T )-1 ( Z 2 r')
(9.4.37)
= r 'T Z T (A~ F2 A2T )-i Z2 r' where F z is the covariance matrix of measurement errors in x 2 . We a s s u m e
(F, /
F =
(9.4.38)
F2
hence the subvectors of errors in x~ and x 2 are uncorrelated. We have (9.3.6)
(9.4.39)
S = (A'FA 'T)-I . We shall also need the matrix Z A ' F A 'T Z T =
/
F1 + A2 F2 A~T A~ F 2 A~T
A2 F2 A2T / A~ F2 A2T
(9.4.40)
computed according to (9.4.35) with (9.4.38). Using (9.4.37) and (9.4.33a and b), we find Q2 + 8 = r 'T S(A, (A T SA 1)" A T + S" Z~ (A~ F 2 A~T )-i Z2 S-1 )Sr' where (denoting Z -T-- (Z T )-1)
Z 2 S" = Z 2 A'FA 'T Z TZ -T "-- (A 2 F 2 A~T, A 2 F 2A2T ) Z "T by (9.4.40) with (9.4.34), hence Q2 + 5 = r 'T SZ -1 (ZA 1(A T SA l )-i A T Z T + p)Z-T Sr' where P = ZS "1 Z T (A2 F2 A2 T )-1 Z2 S-i Z T
=
(
A~ F2A~T ) )-1 A;F 2A;T (A;F 2A; T (A;F 2A~T,A;F 2A;T)
_ ( A2 F2 A2T (A2 F2 A2T )-1 A~ F2 A~T
A~ F2 A2T "~ A~ F2A~ T
A2 F2 A~r
)
and where we use (9.4.35) for ZAI, thus ZAl (AT SA1)-I AT zT = /
0Il / ((ZA1)Tz-T SZ-1 (ZA1))-1 (11,0)
338
Material and Energy Balancing in the Process Industries
where Z T SZ 1 = (ZS 1 Z r )-1 is the inverse of matrix (9.4.40). We use the above lemma. Denoting the matrix by D (9.4.25) we have
ZAIASAIIATZT: / I1 / 0
-
/ / 11 0
U -1 (I 1
((I1, O)DI
(I1 / 0
)-1(I1 , O)
0)
0
0
with (9.4.29), thus with U m = F~ + A~ F 2 A~T- A~ F2 A2T (A~ F 2 A~T )-1 A~ F 2 A~T . Consequently
Q2 + ~5 = r ' r s Z ~ (
= r 'T SZ-1
U10 / Z-T 0 0 + P) Sr' ( FI+A2F2A~T A2 T A 2 F2
AEF2A2T )Z_TSr , , A2 F2 A2v
and using again (9.4.40), with (9.4.39) we have Q2 + 5 = r 'T SA'FA 'T Sr'= r 'T Sr' = Qmin according to (9.3.10). We thus have proved the formula (9.4.33).
The reduced criterion Q2 = amin - ~
(9.4.41)
with (9.4.33a and b) would be obtained if the H~ variables were regarded as unmeasured. In particular if H~ = 1, thus if one, say the i-th variable is deleted, we have A 1 = a'i (one column vector) and ~i =
(a'i I r')s 2 IIa'i IIs2
(9.4.42)
with the same notation as in (9.4.18) etc. The formulae are due to Crowe (1988). Although conceptually different in its way of derivation, the method published by Romagnoli and Stephanopoulos (1981) leads to the same result. The proof given above makes it possible to generalize the method for the nonlinear case (see Chapter 10, Section 10.5). Of particular interest is the formula (9.4.42). Recall now the formula (9.4.7) thus
Chapter
~2
vi = f i
9 - Balancing Based on Measured Data - Reconciliation I
.2
, 2 Ilai II s
339 (9.4.43)
and the formula (9.3.2) instead of (9.4.19). Thus, with (9.4.8), Vi "- ~ i V =
- f i r ,iT
Sr' = -fi (a'i I r')s
(9.4.44)
according to (9.4.4). Consequently, by (9.4.9)
2
(a'i I r')s2
Zi =
(9.4.45)
IIa'i IIs = which is (9.4.42). Using the equality in (9.4.41), for one deleted variable we thus have the result (9.4.24). In this case, the square of the standardized adjustment just equals the reduction of the criterion if the variable is deleted as measured. Deleting more than one variable, ~5(9.4.41) generally does not equal the 2 Recall that we have assumed linearly independent columns sum of squares zi. a'i in submatrix A~ (9.4.32). Let us now suppose that we have added some other variable, say xj, to the unmeasured ones, and let
aj =
i=1
kia i
be a linear combination of the former columns. But according to (9.4.35), ZzA1 = 0 thus Z2 a] = 0 for i = 1, ... , H i , hence also Z2 aj = 0. Having transformed the matrix A' and restricted to the last /42 = H-Hi rows as corresponds to the deletion of measurements xi (i = 1, ..., H~ ), the j-th variable becomes nonredundant. Its additional deletion thus brings no change in the criterion, although we can have found zj r 0 in the original system of measured variables. Thus the squares zi2 are not simply additive, and when deleting the variables, we restrict ourselves to the assumption (9.4.32a) of linear independence of the (deleted) columns a ' i . Let us specify the result for the case of mass balance equations. As stated in Remark (i) to Section 7.2, the matrix projection (elimination) is equivalent to the graph reduction according to Chapter 3. As already mentioned in the text after formula (9.4.23), the (special form of) matrix A' after elimination of nonredundant variables (zero columns of A') is the matrix A* (3.2.3), reduced incidence matrix of graph G*. The latter graph arises after merging the connected components of subgraph G O(graph G restricted to unmeasured streams). Now any deletion of a (redundant) variable means further graph reduction, viz. by merging the two endpoints of the deleted arc, which are connected by the (now unmeasured) stream; clearly, not only the given deleted arc (stream), but also all other arcs connecting the two nodes (parallel arcs of G*) are thus deleted and the
340
Material and Energy Balancing in the Process Industries
corresponding variables become nonredundant. Recall that also all the named variables (mass flowrates of the parallel streams) are found as equally suspect of causing a gross error (the same value of ] zi ] ). Now having deleted these arcs by merging, we have a new connected graph, say G**, in which some (originally nonparallel) arcs can become parallel. Imagine
deleted as suspect in G*:
giving in G**:
Fig. 9-6. Successive graph reduction
And so on, deleting successively suspected streams. So in the case of mass balances, the deletion of suspect variables can be effectively performed along with graph analysis. In practice, the (on-line) gross error identification procedures have to be combined with on-site checking of measuring instruments. See Madron (1992), Chapter 4 in particular.
Remark Another method of searching for the source of a gross error is the
analysis of residuals. The analysis is straightforward when all the variables are being measured. If (generally) gl (9.4.46)
g(x) = 0 where g =
L
Chapter 9
341
- B a l a n c i n g B a s e d on M e a s u r e d D a t a - Reconciliation I
is the model (with state variable z = x, measured) then F1
= r = g(x §
(9.4.47)
rM is the residual, most likely r r 0. Here, we suppose that the individual components gm are, each, 'physically meaningful' in the manner that the equation gm (X) = 0 represents, for instance, some well-defined balance. Then an elevated value of rm signals possible presence of a gross error in some variable occurring in the equation. So far, we have admitted only measurement errors. Another source of discrepancy (imbalance) can be a fault in the model itself. We do not consider the cases when some well-defined item (say, mass flowrate of some stream) has been omitted. Still, some unforeseen material or heat (energy) loss can occur; perhaps also a significant change of accumulation in some node can have been neglected by the steady-state hypothesis, and the like. Then the m-th equation (balance) reads correctly gm (X) - d m
(9.4.48)
where dm is the model error. Then, as gm ( xt ) -- dm for the true value x t of x, with X+ - Xt + e (9.2.4) we have Fm ---- gm ( xt +
e)
- gm ( xt ) + d m .
(9.4.49)
If the model is linear thus g(x) = Ax + c, we thus have r - Ae + d where d = ( d l , "", du)T
(9.4.50)
is the vector of model errors. Thus in particular a gross model error dm will affect the m-th residual r m . If some variables are unmeasured, matrix A is replaced by the above A'. Due to the arbitrariness in the matrix projection (ZA' is equivalent to A', with arbitrary regular Z[H, H]), the components of the residual vector r' = A'e + d'
~
(9.4.51)
admit generally of no physical interpretation. Only in the set of mass balance equations, the transformation (elimination) can be carried out in a 'canonical' manner, viz. by graph reduction. Then the h-th component r~ (h = 1 , - . . , H) represents the imbalance of the h-th node of reduced graph G*. [In particular a
342
Material and Energy Balancing in the Process Industries
single gross model error dh is thus uniquely detected; observe only that the node balances of G* do not contain the reference node balance.] We can also introduce standardized residuals. By (9.3.6), the h-th residual variance equals 0.2~ = 8 h A'FA 'T 8~
(9.4.52)
where 8h is the h-th unit row H-vector; thus 8 h A' = t~h is h-th row vector of matrix A', of i-th component equal to __1 if (in the reduced graph) arc i is incident to node h, else zero. Let us again assume diagonal F. Then, as the reader easily verifies, we have 0.2~ = Z fi where fi = (Yi2 i~(h)
(9.4.52a)
is the i-th diagonal element of F, and (h) is the set of arcs i incident to node h of the reduced graph G*. Then the h-th standardized residual equals
(say) Wh-
%
9
(9.4.53)
We then regard as most suspect the balance with greatest I Whl. Again, a simultaneous graph analysis can prove helpful.
9.5
SYSTEMATIC ERRORS
Let us recall the zero-mean hypothesis (9.2.4a). More generally, if the mean E(ei ) = ei0 r 0 for some measured variable xi then this ei0 is called the bias of the random variable (measurement error) ei. It is a theoretical definition relative to the assumed probability space. In practice, the presence of a bias is regarded as a systematic error of the measurement. It can be due to an imperfectly adjusted instrument, its inadequate placing, or also be a property of the measuring method itself; see again Madron (1992). The present book is not concerned with problems of measurement proper. Let us only show how the presence of biases affects the reconciliation. Let us designate eo = E(e)
(9.5.1)
the/-vector of biases, where we admit e0 r 0. Then, in lieu of (9.2.4b), the covariance matrix of measurement errors equals, by definition (E.1.8) F = E((e-eo )(e-eo )T ) .
(9.5.2)
Chapter 9
-
B a l a n c i n g B a s e d on M e a s u r e d Data - Reconciliation I
343
I f we know the vector e 0 , it is natural to subtract this e 0 from the measured vector x + and reconcile the vector x+-e0. This procedure (subtraction of systematic errors) is called compensation. The compensation is widely used in practice. A typical example is compensation of flowrates measured by orifices for the deviation of actual density from that supposed in the instrument design. The na'fve approach (see Section 9.1) leads to replacing the condition (9.1.9c) by (~, _ x + + eo )T F-1 (~ _ X + + eo ) = m i n i m u m .
(9.5.3)
The maximum likelihood principle is generally formulated again in the form (9.1.12). If the error vector is Gaussian, with (9.5.1) used in (E.2.5-9) where a = e 0 we have, in lieu of (9.1.13)
fx(X +- ~,) = k exp - 2
1
(~ - x+ + eo
)T
1 ) F- (:~ -x + + eo)
(9.5.4)
and the same consideration then leads again to the condition (9.5.3). Thus x + is replaced by x+-e0 and the correct reconciliation formula reads, in place of (9.2.15) ~c = x + - e0 + v c
(9.5.5a)
where v r = _FA,T (A,FA,T)-1 (A,x + + c' - A'eo ) ;
(9.5.5b)
~c means the correctly reconciled value. If we don't know %, we reconcile again according to (9.2.15) getting the estimate ~,, with adjustment v of x +. Observe that by (9.3.1 and 3) we have again r' - A ' x + + c' = A ' e
(9.5.6)
and A ' v = -r' = -A'e
(9.5.7)
while E ( r ' ) = A'e0
(9.5.8)
E(v) = -FA '+ ( A ' F A '+ )-1 A ' e o .
(9.5.9)
344
Material and Energy Balancing in the Process Industries
W e thus have v c - v - E(v) thus E(v c ) - 0 and, as i c ~c
=
x t +
(9.5.10)
e - eo + v~
e - e0 + v c thus E ( i ~ -
_ Xt =
x t) =
0
(9.5.11)
while the random variables v and ]~ - X t -
e
+
v
giving E ( i
- x t ) -
Pe 0
(9.5.12)
are biased. Here, P is the projector (9.3.21); see Remark (iii) to Section 9.3. Given matrix A', also the random variable (H-vector) r' is biased by (9.5.8); denoting r o = A ' e 0 (= E(r'))
(9.5.13)
the variable has a noncentral distribution with H x H symmetric positive definite covariance matrix Fc = E((r'- r o )(r'
_
r o~ ) T ) = A ' F A 'T
(9.5.14)
according to (9.5.2) and (9.5.6). The matrix is the same as in the unbiased case (9.3.6); if e is Gaussian then also r' is (noncentral) Gaussian. Algebraically, the adjustment v and the estimate i obey all the relations derived above; in particular ~: obeys the solvability condition (9.2.7) (thus ~, ~ 914+ ) and v = :~ - x § obeys the condition (9.2.5b), hence also the conditions (9.2.18 and 19) are fulfilled. Only the statistical characteristics differ, and the maximum likelihood condition (9.5.3) is not satisfied if e 0 ,: 0. If systematic errors are present but not known, the computed statistical characteristics provide an incorrect information on confidence intervals such as (9.3.56). Observe that for example with (9.5.12), the corresponding covariance matrix equals by definition F~ = E ( ( i - x t- Pe o )(i - x t-
Peo)*) =
PFP T
(9.5.15)
according to (9.5.2) and because ~ - x t = Pe; hence it is the same matrix as (9.3.43), giving also the same variances (diagonal elements) t~~i" 2 But we now have, for the i-th component
E(xi- xl)
-
~i
Pe0
Chapter 9
- B a l a n c i n g B a s e d on M e a s u r e d D a t a - Reconciliation I
345
with i-th unit r o w / - v e c t o r ~ i ; with the notation (9.5.14) and denoting again (9.4.17) S = F~!
(9.5.16)
we have, in the case of uncorrelated errors (say) wi
= E(.~i
_
t
xi)
-
ei0
_
2 (Yi
(a'i I r0 )s
(9.5.17)
where ~ is again the i-th diagonal element of F and a'i the i-th column vector of A'. Thus in place of (9.3.56), if the distribution is Gaussian we now have P{ I&i- xl- Wi [ < ~ i UI-(L/2 }
--
1- a
(9.5.18)
which is the probability of t Xi - 0'~ i/'/1-or/2 - Wi < Xi < "~i q" 0"~ i/'/1-~2 - Wi "
(9.5.18a)
Hence having estimated Xi the true value x itwill lie, with probability 1-tx, in the above interval nonsymmetrically distributed around ~i, with unknown wi. Observe that in (9.5.17) we have by (9.5.13) I
(a] [ ro )s = j=s ej~ (a'i [ a])s
(9.5.19)
hence generally, a systematic error in measured variable xj (j r i) affects also the probability distribution for the estimate ~i. The detection or even identification of systematic errors is even more tricky than for gross errors. Of course a systematic gross error is a gross error that occurs repeatedly in a series of measurements. Smaller systematic errors can be detected as a systematic occurrence of positive or negative values of adjustments. Also the residuals r' can give some information. If the same matrix A' is used in a series of reconciliations then the average value of r', at least in absence of gross errors and with a great number of measurements, will approximate E ( r ' ) = A'e 0 .
9.6
MAIN RESULTS OF CHAPTER 9
The linear reconciliation problem is a problem of minimum under linear constraints; see Section 9.1. The vector x § of measured values has to be adjusted by some vector v in the manner that the vector :~ = x § + v
(9.6.1)
346
Material and Energy Balancing in the Process Industries
obeys the solvability condition e M +.,
(9.6.2)
see Chapter 7. Thus if certain variables (subvector y) are not measured, the constraint equation is solvable in y when x = z~ obeys the condition; if all variables are measured, M + is simply the set M of solutions. The minimum condition can be based on intuitive considerations ('smallest distance' between x + and i), or on the maximum likelihood principle (9.1.12). If in particular the distribution of measurement errors is considered Gaussian with zero mean, the former and the latter criteria coincide and we have the minimum condition (9.1.14) ( ~ _ X + )T F-1 ( i _
X+ ) = minimum (~ ~ M + ) ;
(9.6.3)
here, F is the covariance matrix of measurement errors. The vector ~ is the sought estimate and v (9.6.1) is the adjustment. In practice, the ('smallest distance') condition (9.6.3) is commonly adopted if the distribution is Gaussian or not (frequently unknown except for the covariance matrix F). When the constraints are linear, the reconciliation problem is uniquely solvable whatever be x+; see Section 9.2. The solution ~ is uniquely determined by the theoretical conditions (9.2.18 and 19) where By + Ax + c = 0 is the linear model, and ~ ~ M + means that the equation By + A:~ + c - 0 is solvable in y .
(9.6.4)
Explicitly, the solution can be found when using the matrix projection (elimination) according to Chapter 7. We suppose again that the matrix (B,A) is of full row rank M, and we designate L = rankB. Using in particular the canonical format (7.4.4) with (7.4.5 and 6), we can rearrange and partition the unmeasured variables
y =
( y ~ / } L~
y
observable
(9.6.5)
} J-L o unobservable
according to the partition of columns in (7.4.5), and the matrix (A", c") in (7.4.4) according to the partition of rows in (7.4.5)
I A o c~ I } L~ (A",c")= A'~ c'~ } L-L o
(9.6.6)
Chapter 9 - Balancing Based on Measured Data - Reconciliation I
347
Then the equivalent set of equations reads I!
Yo
+ Ao x + c o = 0
(IL_Lo , B* )y* + A'~ x + c~" = 0
A'x + c '
(9.6.7)
=0
where the last equation represents the solvability condition x ~ M § Then R = x + + v where v = -FA 'T ( A ' F A 'T )-1 r'
(9.6.8)
with the residual r' = A ' x § + c' ;
(9.6.8a)
see (9.2.15). If L 0 > 0 and setting x = ~,, by (9.6.7)~ we can compute the observable subvector Y0 of y. If J - 0 (all variables measured) we compute only by (9.6.8) where A' = A and c' = c (no elimination). If L = J (full column rank of B) then also L 0 = J and the whole subvector y is observable; it is computed by (9.6.7)~ where Y0 = Y, A0 = A , c 0 = c", with x - ~. In this case, we can use also other formulae, which do not require a special elimination (matrix projection) program; see (9.2.24) with (9.2.21 and 23) thus (9.2.24a), or (9.2.30) with (9.2.26-29). In (9.6.7 and 8), we can partition the matrix A' by (7.4.6), thus the vector x It
x =
I x * ) } I-I o redundant xo
} Io
t!
l!
(9.6.9)
nonredundant
with subvector x 0 of nonredundant variables. If the matrix F is diagonal (measurement errors uncorrelated), the subvector x o remains unadjusted; see Remark (iii) to Section 9.2. If it happens that the degree of redundancy H (= M-L) equals zero then the solvability condition (9.6.7)3 is absent and all the measured variables are nonredundant and nonadjustable (no reconciliation). The /-vector e of random measurement errors, by hypothesis of zero mean and with covariance matrix F (9.2.4a and b), generates the assumed probability space. According to Appendix E, functions of e are then also random variables and we can compute their statistical characteristics; see Section 9.3. The adjustment v depends linearly on e by (9.3.2) with (9.3.4). Its mean equals zero (9.3.7) and its covariance matrix F v (see (9.3.8) with (9.3.6)) is singular. The minimum value of the criterion (9.6.3) Qn~. = vT F-1 v
(9.6.10)
348
Material and Energy Balancing in the Process Industries
is a random variable whose mean equals the degree of redundancy (9.3.11). If e is (assumed to be) Gaussian then Qn~n has the chi-square distribution with H degrees of freedom. We further introduce the I x I matrices (called later 'projectors') p. = FA,T (A,FA,T)-1A'
(9.6.11)
P = I - P*
(9.6.12)
where I is unit I x I matrix; see (9.3.46) and (9.3.21). Whereas A' depends on the way of elimination, the above two matrices are determined by (B,A) only. Whatever be the true value x t of x (9.2.4), the difference ~,-xt (error committed by estimate ~,) depends (linearly) on e only (9.3.41) and is again a random variable, of zero mean. Its covariance matrix F~ (9.3.43) is, however, singular. If the observable subvector Y0 (9.6.5) is computed by (9.6.7) where x = ~, we have the estimate 5'o for the true value y~. The difference S'0 - Yo is again a random variable with zero mean and covariance matrix F% (9.3.22). If (and only if) the condition (9.3.23) is fulfilled, the covariance matrix F% is regular (positive definite) and ~'0 has a probability density as introduced in Appendix E. In particular if L = J (full column rank of B) thus if the whole unmeasured subvector is observable, the condition (9.3.23) is the condition (9.3.26) of full row rank of submatrix A; in a system of mass balance equations, the condition is interpreted structurally by (9.3.32). The condition satisfied, if in addition e is Gaussian then the scalar random variable Q~ (9.3.27) has the chi-square distribution with J degrees of freedom. If L = J (~' = S'0 ), the matrix F~ can also be computed by other formulae; see (9.3.29) with (9.2.21 and 23), or (9.3.30). Generally, the propagation of errors among variables u computed using the estimate :i can be characterized as shown in Remark (ii) to Section 9.3. If again u t is the true value and ~ the (computed) estimate, we obtain the covariance matrix FQ of random variable ~-u t . If F~ is positive definite and e Gaussian, we can compute the probabilities (9.3.57); see the illustrative example (with Fig. 9-5) following after the formula. In particular the confidence intervals such as in (9.3.56) can be computed. The variances G~2 (9.3.51) resp. (y2~ (9.3.52) are computed as diagonal elements of matrix F~ resp. F~; see (9.3.62 and 63) with (9.3.60). According to (9.3.65), the reconciliation improves the precision of the estimates. The error committed by the estimate :i thus ~,-xt is the projection Pe (9.3.41) of the error vector, while v = -P'e, with (9.6.11 and 12). The two projections are, in a certain sense, orthogonal as illustrated by Fig. 9-4 with the text following after (9.3.50). The idea of orthogonality is generalized in the fine-printed paragraphs following after (9.4.9), and used later in Chapter 10. Theoretical possibilities for the detection and identification of gross errors are analyzed in Section 9.4. Assuming the measurement error vector
Chapter 9
- B a l a n c i n g B a s e d on M e a s u r e d Data - Reconciliation I
349
Gaussian, a gross error is detected when the value of Qn~, (9.6.10) exceeds a critical value (9.4.3). Searching for the source of a gross error, the first candidate is the variable xi with greatest absolute value of the standardized adjustment zi. Here, we assume diagonal covariance matrix F with elements (variances) I:Y2i (i = 1, . . . , / ) . Then zi - vi/(Yv~ where vi is the i-th adjustment (component of v), and cy2Vi the i-th diagonal element of matrix F v The latter values can be computed using the matrix A' with columns a'i (i - 1, . . . , / ) ; then 2 T O'vi --" CYi ( a ' i ( A ' F A
1
~ )1/2
'T )- a i
.
(9.6.13)
For a nonredundant variable, we have Gv, = 0 as well as vi - 0; at the same time, the value of Qmin is not affected by any error in the variable. Hence such gross error is not detected (but it can still affect the estimates of the unmeasured variables). For a system of mass balance equations, A' can be considered as reduced incidence matrix of the graph G* (see Chapter 3); the graph is obtained by merging the nodes connected by unmeasured streams. If two arcs (i and i') of G* are parallel then the corresponding squares of the standardized adjustments (z2 and z2.) are equal; the method makes no distinction between the two variables. Considering again a general linear model, for a redundant variable the square zi2 equals the reduction of the criterion Qn~n When the variable is deleted as measured (9.4.24). More generally, using the formulae (9.4.33) we can compute the reduction of the criterion when more measured variables are deleted simultaneously, with the condition (9.4.32a). But at least for a set of mass balance equations, rather a successive deletion of variables, along with graph analysis can be recommended; the endpoints of the deleted arcs are successively merged and the graph sucessively reduced. In a system of mass balance equations, the equation (9.6.7) 3 can be formulated as the mass balance of the reduced graph G*, hence the residual r' (9.6.8a) represents a vector of node imbalances. Then also an analysis of residuals makes sense; see Remark to Section 9.4. Suppressing the zero-mean hypothesis for the error vector e, we admit a nonnull bias E(e); see Section 9.5. Of course if the bias e 0 is known, it is subtracted from the measured value x + before the reconciliation. If unknown, we cannot but compute the adjustment and estimates as above. The estimate i will again obey the solvability condition; only it will not conform to the maximum likelihood priciple, and will be biased (9.5.12). Having computed some estimate :~, the true values will lie with a nonsymmetrically distributed probability around the estimated values (9.5.17 and 18 with 18a). If a nonlinear model is linearized, the reconciliation problem can be solved by linear methods. More generally, nonlinear reconciliation problems can be solved using successive linearisation, as will be shown in Chapter 10.
350 9.7
Material and Energy Balancing in the Process Industries
R E C O M M E N D E D LITERATURE
The analysis of problems associated with reconciliation as presented in this chapter is largely self-contained. It does not mean, of course, that the basic ideas are new. Many of them occurred already at the beginning of the nineteenth century as the least-squares principle. Motivated empirically, the idea was first published by A.M. Legendre in 1806, at the end of his treatise 'Nouvelles mrthodes pour la drtermination des orbites des com~tes' in an astronomical context. But the priority belongs most likely to K.F. Gauss who would not make haste with publication of his results. The method was published in his 'Theoria motus corporum coelestium' (1809), and supported by mathematical arguments. Further development is due to K.F. Gauss and P.S. Laplace, and to a number of further authors up to nowadays. Despite of the mathematical arguments, in the end the method (as well as its further development along with the concepts of probability) is based on intuition. It is not our goal to follow the history, disputations, and controversies among theorists (mathematicians and physicists) concerning the principles. In practice, the statistical methods are well-established, thus also in the frame of measured data processing. The practical aspects of measurement and reconciliation are dealt with for instance in Madron (1992). Explicitly, we refer in this chapter also to Kub~i~ek (1969 and 1976), Knepper and Gorman (1980), Romagnoli and Stephanopoulos (1981), and Crowe (1988). The topic of linear reconciliation is a classical one and possible further modifications of the methods are only formal. Let us perhaps mention an algebraically different approach to reconciliation with partially unmeasured data, as presented by Darouach et al. (1986). Recently, more attention has been paid to the detection and identification of gross errors (Romagnoli and Stephanopoulos 1981, Ioridache et al. 1985, Tamhane and Mah 1985, Narasimhan and Mah 1987, Narasimhan 1990, Serth and Heenan 1986, Serth et al. 1987, Crowe 1988, Crowe 1989, Crowe 1992); see also a theoretical paper by Alm~isy and Uhrin (1993). Biased data processing was dealt with by Romagnoli (1983), and in combination with gross errors by Rollins and Davis (1992). Alm~isy, G.A. and B. Uhrin (1983), Principles of gross measurement error identification by maximum likelihood estimation, Hungarian Journal of Industrial Chemistry 21, 309-317 Crowe, C.M. (1988), Recursive identification of gross errors in linear data reconciliation, AIChE J. 34, 541-550 Crowe, C.M. (1989), Test of maximum power for detection of gross errors in process constraints, AIChE J. 35, 869-872
Chapter 9 - Balancing Based on Measured Data - Reconciliation I
351
Crowe, C.M. (1992), The maximum-power test for gross errors in the original constraints in data reconciliation, The Canadian Journal of Chemical Engineering 70, 1030-1036 Darouach, M., J. Ragot, J. Fayolle, and D. Maquin (1986), Validation des mesures par 6quilibre de bilans-mati~re, International Journal of Mineral Processing 17, 273-285 Ioridache, C., R.S.H. Mah, and A.C. Tamhane (1985), Performance studies of the measurement test for detection of gross errors in process data, AIChE J. 31, 1187-1201 Knepper, J.C. and J.W. Gorman (1980), Statistical analysis of constrained data sets, AIChE J. 26, 260-264 Kub~i~ek, L. (1969), On the general problem of adjustment of measured values, Matematic~ (asopis (Czechoslovakia, also in English) 19, 270-275 Kub~i~ek, L. (1976), Universal model for adjusting observed values, Studia geophysica et geodaetica 20, 103-113 Madron, F. (1992), Process Plant Performance, Measurement and Data Processing for Optimization and Retrofits, Ellis Horwood, New York Narasimhan, S. (1990), Maximum power test for gross error detection using likelihood ratios, AIChE J. 36, 1589-1591 Narasimhan, S. and R.S.H. Mah (1987), Generalized likelihood ratio method for gross error identification, AIChE J. 33, 1514-1521 Rollins, D.K. and J.F. Davis (1992), Unbiased estimation of gross errors in process measurements, AIChE J. 38, 563-572 Romagnoli, J.A. (1983), On data reconciliation: constraints processing and treatment of bias, Chem. Eng. Sci 38, 1107-1117 Romagnoli, J.A. and G.S. Stephanopoulos (1981), Rectification of process measurement data in the presence of gross errors, Chem. Eng. Sci. 36, 1849-1863
332
Material and Energy Balancing in the Process Industries
Serth, R.W. and W.E. Heenan (1986), Gross error detection and data reconciliation in steam-metering systems, AIChE J. 32, 733-742 Serth, R.W., C.M. Valero, and W.E. Heenan, (1987), Detection of gross errors in nonlinearly constrained data: a case study, Chem. Eng. Commun. 51, 89-104 Tamhane, A.C. and R.S.H. Mah (1985), Data reconciliation and gross error detection in chemical process networks, Technometrics 27, 409-422
353
Chapter
10
BALANCING BASED ON MEASURED DATA - RECONCILIATION II NONLINEAR RECONCILIATION
With the exception of single-component (mass) balance, the balance models are generally nonlinear, even in the simplest case of simultaneous massand heat balances. While the theory and methods of linear reconciliation are well-developed, for a nonlinear model the difficulties arise at the problem statement itself. They are closely related to the solvability problems analyzed in Chapter 8. The reader will also need the results of Chapters 7 and 9, and Appendices B and E. Let us begin with several simple illustrative examples.
10.1
SIMPLE EXAMPLES AND PROBLEM STATEMENT
As is common in illustrative textbook examples, also the following are not just from industrial practice. Generally, the reconciliation problem is multidimensional and if nonlinear, such detailed analysis as follows is hard or impossible.
Example 1 Recall the example 3 (heating furnace) in Chapter 6, Section 6.3. Having simplified the scheme according to Fig. 6-12 we have
T 4
.q T5 Fig. 10-1. Heating furnace
354
Material and Energy Balancing in the Process Industries
where F is the heating furnace and E is heat exchanger. Methane C H 4 (stream 1) is burnt with air (2), and in the exchanger, the heat of combustion gas (3 and 4) is transferred to crude oil (5 and 6). Measured are the flowrates and temperatures of streams 1 and 2, further the temperatures of streams 4 and 6, and in addition, also the CO2-concentration in stream 4 is measured. The latter measurement is added in order to have a simple example. We make abstraction from how the named quantities are actually measured. Formally, we consider as measured the mass flowrates ( m i ) m 1 --
m~ and m2 - m~ (10.1.1)
mass fraction of CO 2 y 4 _ y4+ = y +
for brevity
and the temperatures T1, T2, i0, 76. Due to the reaction scheme CH 4 +
2 02 = CO2 + 2 H20
and to the assumption that methane is completely burnt, we have the condition y4m 4
mI
Mco2 MH4 thus y4m 4 - k m 1
where k =
Mco
MCH4
(10.1.2)
is ratio of mole masses. In addition the mass balance implies (10.1.3)
m I + m 2 = m 3 = m 4 .
Hence the measured quantities have to obey y ( m 1 + m2 ) = k m 1
(y _ y 4 ) .
(10.1.4)
We shall not write the other equations explicitly. Taking the standard composition of air, as the reader readily verifies also the whole composition of streams 3 and 4 can be computed using the assumed reaction scheme (neglecting the oxidation of nitrogen and estimating the humidity of inlet air), and with the knowledge of standard enthalpies and specific heats, we can compute also temperature T3 from the energy balance. Knowing also T ~, thus the enthalpies of
355
C h a p t e r 10 - B a l a n c i n g B a s e d on M e a s u r e d Data - Reconciliation II
streams 3 and 4, we can compute the transferred heat in exchanger E. The named variables are thus observable, while T5 and m5 (= m6) a r e unmeasured and unobservable. The condition (10.1.4) concerns the measured variables y4, m l ' m2 ; it is the solvability condition, while the measured temperatures T l, T2, T ~, Z6 are not affected by the condition, thus nonredundant. It is thus the solvability condition (10.1.4) that has to be obeyed by adjusted measured values (10.1.1). Then, the observable variables are uniquely determined. Denoting m + 1 +
th I -
(10.1.5)
V1, /,h2 -- m +2 + 122, y -- y+ q" W
where v~, v2 , and w are the adjustments, the solvability condition reads (10.1.6)
Y(/'~/l + /'~/2 ) -- k t h l .
Physically, the set is limited in addition by the inequalities /~1 > O, /'~/2 > O' O < y
2m 1/McH4 where no2 is the mole flowrate of 02 in stream 1. Using the standard air composition, the condition is obtained in the form /'~2 ~ arhl
(10.1.6b)
where a is a constant (-- 17). We suppose that the measurement errors in m 1 , m 2 , y are uncorrelated, with standard deviations Ol, o2, o respectively. With the same motivation as in Section 9.1, the adjustments will be subjected to the condition
v_2_l
v(__~i w~
+
+ ~
(y
Ol
= minimum.
(10.1.7)
Introducing the substitutions mi=--
Y
and
mi
Xi------
(Y
for i -
(10.1.8)
Oi
1 and 2, with x~ and x § for the measured values, denoting
=p
and
~(Y2 O1
= q
(10.1.8a)
356
Material and Energy Balancing in the Process Industries
we have the problem a PXl
- ( X 1 q-
qx2 )x = 0 where x2 >-
q
Xl > 0
(10.1.9a)
and (x 1_ x +1) 2 + ( x 2 _ x 2
+(x-
x
(lO.1.9b)
=minimum.
Eq.(10.1.9a) can be rewritten x~ = f ( x ) x 2 where f(x) = q
x p-x
,0 < x
0.5 (and if 0 is sufficiently small), with the exception of a gross error we'll have also Xl * x~, * and X*l < x3* < x2+ for x3. § Then we can put x i - " X+i and for instance Xl9 < x2, n 3 = n ~ , giving the unique solution (10.1.15) and Q - 0 in (10.1.14b). Let us now admit also yl = y2 and let us have measured n 3 =
+ and
n 3
+
X 1 "-
(10.1.17)
+ - x + (say) but x3+ > x + 9
X 2
Let us try to find some values xi = ~i obeying the solvability conditions (10.1.16) and minimizing the criterion (10.1.14b); as we have seen, n 3 is arbitrary hence we can set directly n 3 - n~ in (10.1.14b). W e thus have to minimize
Q = (x_x +)2 + (x2_x+ )2 + (x3_x.~ )2
(10.1.18)
under one of the conditions (10.1.16). U n d e r the condition (10.1.16a) we have, with x~ = x2 = x3 = x Q = 2(x_x+ )2 + ( x - x ~ ) 2 and one finds the m i n i m u m
Q1 =
2 --
d2 w h e r e
d = x~-x +
(
10.1.19)
3 with x = x § + d/3 . U n d e r the condition (10.1.16b) we have Xl = x § + Vl, x2 = x + + v2 w h e r e v~ ~ v2,
and x3 = kx~ + (1-k)x2 where0 0) is the g(z), we can normalize the components as gm ( Z ) / u m where t m = 1/U m m-th diagonal element of the normalizing matrix, and in particular, according to the required precision I gm (Z) I / U m < < 1 (m = 1, . . . , M) is interpreted as gm ( Z ) = 0. Let thus generally T be the (positive definite) normalizing matrix; then ]lwllT = (w T Tw) 1/2
(10.4.2)
is the T-norm of M-vector w. Our goal is to decrease the square norm Ildll2 . We have again the partition (10.2.4) of the Jacobi matrix Dg. Considering the residual as function g§ (y), thus at fixed x§ the minimum condition for IIg+llg reads 2g§ TB = 0 thus B T Tg+ =
0
375
C h a p t e r 10 - Balancing Based on Measured Data - Reconciliation II at some y. Approximating g§ u = y-y§ the condition reads
as g§247 + B(y-y § where B is evaluated at z § denoting
BTTBu + BTTd = 0 .
(10.4.3)
If B is of full column rank J (y observable), B r TB is invertible and the solution u is unique. Else we subject u to an additional condition. First, if rankB = L < J then some J-L rows of B r are linearly dependent on the remaining ones. By elimination B r ~ E[L, M]
(rankE= L)
(10.4.4)
the L x M matrix E is of full row rank and condition (10.4.3) is equivalent to M u + e = 0 where M = E T B and e = E T d .
(10.4.5)
Then u will be subjected to a condition requiring that y = y§ + u is 'not too distant' from the initial guess y§ to avoid y escaping from the admissible region. Formally, let us minimize the square norm u x Su = minimum _
(10.4.5a)
_
where S is some J • J symmetric positive definite matrix normalizing the components of the unmeasured vector y. Then formally, we have the same problem as in linear reconciliation; matrix S stands for R = F~. Hence u = -S l M r ( M S 1 M r )-1 e .
(10.4.5b)
But due to the linear approximation, we need not obtain IIgr (Y)llT < Ildllr. In any case, the derivative of ltg§ 2 in the direction u equals, at y = y§ D(g § Tg § )u = 2d T T B u = 2u r B r Td = -2u r B T T B u according to (10.4.3) equivalent to (10.4.5). Because B r TB is (at least) positive semidefinite, the derivative is nonpositive. I f equal to zero then necessarily Bu = 0 thus M u = E T B u = 0 thus e = E T d = 0 by (10.4.5). In such case, we have also B r T d = 0 thus d r TB = 0 thus the partial derivatives of g§ Tg§ equal zero at y§ and d = g+ (y§ represents an extremum (more precisely, a critical point). With the exception of such coincidence, we have e ~ 0 thus D(g § Tg § )u < 0
(10.4.6a)
hence the T-norm decreases in the direction u; consequently, at least if replacing u by some "m, setting y = y§ + xu
(0 < x < 1)
(10.4.6b)
we shall have IIg + (Y)liT < IIg + (Y+)liT
and we have improved the initial guess y+.
(10.4.6c)
376
Material and Energy Balancing in the Process Industries
The improved value y of the initial guess can thus be obtained as follows. Given x + and having chosen y+, we compute the residual d (10.4.1). We evaluate matrix B (10.2.4) at z = z +. Having chosen the normalizing matrix T (10.4.2), if (rankB =) rankB T = J then we find J-vector u directly as the unique solution of Eq.(10.4.3). More generally, if rankB T = L < J then, by elimination (10.4.4), we find (full row-rank) L • M matrix E and compute L x J matrix M and L-vector e according to (10.4.5). In an analogous manner as in (10.4.2), we choose a symmetric positive definite J • J matrix S normalizing the components of J-vector u; taking diagonal S of elements s~, ... , s~, the greater is sj the smaller correction of the j-th component of y+ is admitted. Taking different sj makes sense in particular if the expected components yj are numerically of different orders of magnitude; else we can take S = Ij (J • J unit matrix). We introduce the S-norm of J-vector u Ilulls = (u T Su) ~/2 9
(10.4.7)
Here and in the sequel, the choice of S (as well as that of T above) modifies only the strategy, but (according to the uniqueness hypothesis) not the final reconciled value i of the measured vector. We then compute vector u by (10.4.5b). Observe that if rankB = J then M is invertible and u is independent of the choice of S; in fact it equals the unique solution of (10.4.3) (to within possible numerical errors, of course). Having computed vector u, we begin with "c = 1 in (10.4.6b). If it happens that condition (10.4.6c) is not fulfilled we take x = 1/2, then perhaps = 1/4, and so on. If e ~ 0 then u ~ 0 and with some x = 1/2 n, condition (10.4.6c) is finally satisfied. Then, with this y~O) = y+ + xu
(10.4.8)
is the improved initial guess. By the way, the procedure can be iterated" replace y§ by y(O), compute y(1), and so on.
10.4.2
Suboptimal reconciliation
The sequential strategy involves linearisation of the model at any point z Cn)of a sequence of approximations. Let thus z = z (n) and compute the M-vector (residual)
c = g(z (n)) where
y(n))
} j
X(n)
} I.
Z (n) --
(10.4.9)
Chapter
1 0 - B a l a n c i n g B a s e d on M e a s u r e d D a t a - Reconciliation H
3'/'/
Let again (B, A) be the Jacobi matrix Dg according to (10.2.4). The matrix is evaluated at z (n) and by matrix projection (elimination), according tO the general scheme (9.2.7c), the extended matrix of the linearized system is transformed
(B,A, c ) ~
B" A" c" / A' c'
o J
I
} L = rankB
/ H=M-L.
(10.4.10)
1
Observe that the RHS equals L(B, A, c) where
L -
L" L'
} }
L n
(10.4.11)
is some regular M x M matrix, not necessarily computed explicitly in the elimination. The linearized model (8.4.4) B(y
- y(n)) +
A(x
(10.4.12)
- x (n)) + c = 0
is thus equivalent to B"(y
- y(n) ) +
A"(x
- X (n)) + C" -- 0
(10.4.13a)
A' (x
- x (n)) -t- c '
(10.4.13b)
= 0 ;
if it happens that J = 0 (all variables measured) then matrix B is absent, A - A', and Eq.(10.4.13a) is also absent (no elimination). Let us compute/-vector v(n) = _FA,T (A,FA,T)-I C'
(10.4.14)
where F is the covariance matrix of measurement errors; compare with (9.3.2) where the residual r' is now denoted by c'. If x = x (n) + v (n) then Eq.(10.4.13b) is satisfied and with this x, it remains to solve Eq.(10.4.13a) thus B"u (n) + A"v (n) + c " = 0
(10.4.15)
and put y = y(n) + u(n). If in particular L = rankB - J then B" is J x J regular and the solution u (n) is unique. Else u (n) is subjected to an additional condition. We again require that the new y shall not differ too much from y(n), thus that the correction u (n) is 'as small as possible'; else it could happen that the corrected vector z would escape from the admissible region. With the same motivation as above, we thus introduce the S-norm (10.4.7). Then the condition
378
Material and Energy Balancing in the Process Industries
u ~ Su = minimum
(10.4.16)
for u = u ~n) obeying (10.4.15) represents formally a linear reconciliation problem. The condition is fulfilled with the unique J-vector .
u ~n~ =
.
-S -~ B ''T (B"S -~ B ''T )-~ (A"v ~n) + c") .
(10.4.17)
Observe that if rankB = J then this U (n) is independent of the choice of S and equals the unique solution of (10.4.15). If we set x = x 1; one of the eigenvalues of Y = BTU ~ B (9.2.28) evaluated at z' equals zero. It can be shown that also at the neighbouring points z, some eigenvalue ~. of Y is arbitrarily small if z approaches z'. In (10.4.71), if thus ~ is close to z' then u ~ F~u >> I
(10.4.72)
391
Chapter 10 - Balancing Based on Measured Data - Reconciliation II
for some eigenvector u of Y, with uTu = 1. According to (B. 10.34), the trace of Fy equals the sum of its diagonal elements (variances)
(10.4.73)
trF, = Z~j
and it equals also the sum of the (nonnegative) eigenvalues of Fy. This sum is clearly greater than the greatest eigenvalue (say It) and, as also shown in Appendix B (Section B.10), this kt represents the maximum of u v F~ u where IluU2 - uTu - 1. Hence according to (10.4.72) afortiori
~ j >> 1
(10.4.74)
for the 'normalized' vector y (with unit matrix Fy above).
If thus the problem is not well-posed in the admissible region it can happen that, even if we have found some ~ where B(~) is of full column rank and ~" uniquely determined, at least one of the (psudo)standard deviations G^ assessed by linear approximation is great and the estimated ~j is 'uncertain': the measurement is inappropriate for estimating this ~ j , which is an intuitive interpretation of the 'not-well-posedness'. It can then also happen that in the course of successive approximations, some approximation ),~n) escapes from the amissible region and the solution gets lost. 9
(iv)
.
YJ
,
,
,
The reader has perhaps noticed that although dealing with balancing, we have in fact considered a general model g(z) = 0 without using the special structure of the model equations. In the partition (10.1.29), x is the vector of variables whose measurement errors have covariance matrix F. It is this matrix that is used in reconciliation. It can, however, happen that some variables are not measured directly. For example if m i is mass flowrate of a gaseous stream, the measured variable can be the volume flowrate (say) Vi; then 1 Vi =
yi pi(T,
,
pi mi )
(10.4.75)
depends generally not only on m i but also on temperature T, composition y~, and pressure pi o f the stream i via its density 9~. Considering P~ as a priori known and assessing perhaps y~ by a standard composition of the stream, at least the temperature dependence remains in (10.4.75). As another example, the concentrations of chemical components in a mixture need not be directly measured as mass fractions. The problems associated
392
Material and Energy Balancing in the Process Industries
with measurement in practice are dealt with for instance in Madron (1992) and will not be analyzed here in detail. Let us only show how generally, the functional relations among balance model variables and directly measured variables can be taken into account. Generally, let the balance model read go (Zo) = 0
(10.4.76)
where z o is the vector of variables occurring in the balances. As analyzed in Chapter 8, we can expect that
gl has rankDgo (z o ) = M 0
go
(10.4.77)
gMo thus the Jacobi matrix is of full row rank everywhere in the admissible region. Such set of balance equations has been called minimal (cf. Subsection 8.2.5, Remark (i) and (8.6.2)) or, more precisely, regular (8.4.6). By the way, certain pressure variables pi can also be formally included as components of z 0 without changing the number of equations, nor the row rank (10.4.77). Let us now partition the vector z 0
z0 =
y "] } J unmeasured (not directly measured) ) xo } I o directly measured
(10.4.78)
thus in the subvector x o, only directly measured variables are included (for instance directly measured mass flowrates of liquid streams). In addition, certain other quantities in number I' are also measured; let x' be the vector of the latter variables. Generally, one assumes that the components of x' are known functions of the vector variable z 0. Thus x' = g' (z0)
(10.4.79)
where function g' (/'-vector) is known (and composed of elementary or, in mathematical language, analytic functions); cf. (10.4.75). Then the whole vector of measured variables is
x -
Xo/ }Io } I = Io+I' . x' }r
The (vector) variable
(10.4.80)
Chapter
393
10 - B a l a n c i n g B a s e d o n M e a s u r e d D a t a - R e c o n c i l i a t i o n H
Z -"
(,/, x
:
(10.4.81)
}I
x'
}I'
is the extended model variable and the extended model reads 9 g(z)-0thus
{ go (Zo) g'(Zo)-
=0 X'
(10.4.82)
--0
where g is an M-vector of functions, with M=Mo+I'
(10.4.83)
.
The Jacobi matrix equals Dg o 0 Dg' -I'
Dg =
operating on: z o
}M~
}M
} r
(10.4.84)
x'
where I' is unit l'x I' matrix. Thus Dg is clearly of full row rank rankDg = M
(10.4.85)
according to (10.4.77). The covariance matrix F is that of measurement errors e 0 in x0 and e' in x' thus
e -
l
eo e'
Io } I'
(10.4.86)
is the random variable in the model of measurement X + = X t -I- e
(10.4.87)
w h e r e x t is again the true value and x + the measured value of vector x. We thus can apply the whole previous analysis to this general nonlinear model, and use the covariance matrix F in reconciliation.
(v)
Rather academic is the problem of reconciliation when applying rigorously the maximum likelihood principle to a general (not Gaussian) probability distribution. One then assumes a given (twice continuously differentiable) probability density fx for the random (vector) variable e of measurement errors and solves the problem (9.1.12)
394
Material and Energy Balancing in the Process Industries
(10.4.88)
fx ( x+- x) = maximum
under the constraint (10.4.82) with (10.4.81), possibly by a method of successive quadratic programming.
10.5
GROSS ERRORS
Let us recall the introducing paragraph to Section 9.4. From the statistical point of view, the detection and identification of gross errors based on nonlinear constraint equations is a delicate matter, even more than in the linear case. Some possibility is given when using the (pseudo)statistical characteristics of the solution (10.3.31) a. ft. In the same manner as in Section 9.4, having reconciled the measured vector x + to i we know the value of the criterion (10.3.30) Qmin "- vT F-1 v
(10.5.1)
where v = ~, - x +
(10.5.2)
is the adjustment. Admitting that the hypothetical random variable Q~in (10.3.32) approximates the variable Q~n, we can compare the value (10.5.1) with a critical value corresponding to the assumed z2-distribution of Qun. As in (9.4.3), if the critical value is exceeded then we conclude that some gross error is present. We can also compute the (pseudo) standardized adjustments. First, as in Section 9.4, we compute the diagonal elements of matrix F v (10.3.31). Let us assume again that the covariance matrix F is diagonal. We then have again ~T CY2 v i = ~ ai ( A'FA'T
)-1
ai
(fii = o'~)
as in (9.4.7); here, fi = oi2 is the i-th error variance, (10.3.2) thus (10.3.13) with i-th column vector a] solution). We have again (y2 = 0 if a h' = 0 thus if classified as nonadjustable. Recall that we then have vh = 0 according to (10.3.15). If a'i ~: 0 then (9.4.9)
(10.5.3) A' is the H x I matrix in computed at point ~ (our the h-th variable has been also (h-th component of v)
Vi Zi _
(10.5.4) Ov i
can be called the (pseudo)standardized adjustment of the i-th measured variable. In analogy to linear systems, we can again hypothesize that the variable with
Chapter 10
395
- B a l a n c i n g B a s e d on M e a s u r e d D a t a - Reconciliation H
greatest [Zi[ is the first candidate in the identification of a gross error. Let us support the hypothesis by a more detailed reasoning. Let us designate (H • H matrix) H = (A'FA 'T )-1 .
(10.5.5)
It is the same matrix as S - F~! introduced in (9.4.17); we are using another notation to avoid confusion with the normalizing matrix introduced in (10.4.7). We then can introduce the scalar H-product and H-norm (9.4.10). Thus ~
= fi Ila'~[IH
(10.5.6)
and using the property (10.3.10) with (10.3.7), with i-th unit row vector ~5~ Vi -- ~i V -- ~i P*v = fi a 'iT H A '
assuming again Vi "- fi ( a ] [ A ' V ) H
diagonal F;
v
hence
.
(10.5.7)
Consequently (a'i I A'v)H Zi -"
Ila'i IIn
(10.5.8)
if a'i ~ 0. Recall that the matrix H depends on the transformation L (10.4.11) whereas Ila] II~I= ai'T Hal does not, as follows from (7.3.1)', if L' is replaced by Z L ' then A' is replaced by ZA' and a] by Za'i. In an analogous manner as in Section 9.4, let us reduce the list of measured variables on deleting certain H~ variables regarded now formally as unmeasured. We can start from the reduced measured vector (say) x~ (subvector of x + ), reconcile and obtain vector ~* obeying again g(~*) = 0, with (reduced) measured and reconciled subvector ^*
+
*
x2 = x 2 + v2
(10.5.9)
where v2 is the new adjustment, and the new criterion Q2* - v2*T F21 v2*
(10.5.10)
is minimum. F: is the covariance matrix of errors in x~. The degree of redundancy is now (under a hypothesis specified below)
396
Material and Energy Balancing in the Process Industries
H 2 - H - H1
(10.5.11)
and as above, we can compare Q2 with a critical value corresponding to the ~2-distribution with H2 degrees of freedom. If the original Qminhas not passed the test but Q2 does, we have supported the hypothesis that some of the deleted variables was source of a gross error. Computing the new Q2 requires new reconciliation. With appropriate reordering of the variables we now have
x (xl) H1 x~
(10.5.12)
)H~
thus
z -
(y) (y2) =
x
where Y2 =
x2
(10.5.13) x1
} H1
is now regarded as the unmeasured subvector. In particular our
^
Z
~
( )' ) ]K
( Y2 ) (different partitions) X2
(10.5.14)
obeys g(~) = 0, hence the value x,2 makes the model solvable. Because Q2 with (10.5.9) is minimum, we shall obtain Q2 < (X'z-X~)TF21 (~2_X~) .
(~o.5.15)
+ but we can use Because g(~) = 0 we need not start from an initial guess with x2, directly the final reconciliation according to Subsection 10.4.3 where ~(0) equals our ~. Only x is replaced by x2 and y by Y2, which also leads to a new partition of matrix Dg(z). We suppose in addition that the newly formulated adjustment problem is well-posed. In the initial step (~(0)= 9.), we can also start directly from the transformed matrix (10.4.10) where c' = 0 and c" = 0; with the new partition the matrix reads B"-~l I -~2 1 A~ I A2 I-H 1
where we have partitioned
(10.5.16)
C h a p t e r 10 - B a l a n c i n g B a s e d on M e a s u r e d D a t a - R e c o n c i l i a t i o n I I
A"= ( , ~ , , A2 ) } J
39'/
(10.5.16a)
H 1 1-H 1
and A' = ( A 1 , A 2 )
} H = H~+H 2 .
(10.5.16b)
H l I-H1
Compare with (9.4.32). What remains is to transform matrix A' by elimination of linearly dependent rows of submatrix A~. Let us a s s u m e again rankA, = H,
(10.5.17)
thus the H~ columns of matrix A~ (corresponding to the H~ deleted measurements) are linearly independent. We then use again the transformation (9.4.35); hence in particular Z 2 A' = (0, A~) where A 2 = Z 2 A2.
(10.5.18)
The final reconciliation step calculates first the 'linearized re-adjustment' (10.4.29) where we replace A' by A~ and F by F 2 assuming again the partition (9.3.48); with these substitutions, we obtain projector P2 in place of P (10.4.29a). Denoting by v 2 the linearized re-adjustment, we have
~2 = -P2 (i2- x~)
(10.5.19)
as corresponds to (10.4.27). Let us now set
~2 = ~2 + u
(10.5.20)
It is the 'linearized estimate' of the measured vector x 2 when the equation g(z) = 0 has been linearized at p o i n t ~. It is different from the final i~ (10.5.9), hence also Q2 computed as
Q2
+ T F~ 1 (~2-x~) = (x2-x2)
(10.5.21)
is different from the final Q; (10.5.10). Our goal is now only to obtain a preliminary information on what can be expected if we carry out the whole final reconciliation; the difference (9.4.33) = Qmin- Q2
(10.5.22)
appreciates the expected effect of deleting the H~ measured variables. On the one hand we have, as v = P*v at point i by (10.3.10) with (10.3.7), Qmin = (P'v) + F l (P'v) = (A'v) v H(A'v)
(10.5.23)
where H is the matrix (10.5.5); hence substituting A'v for r' we have the same expression for Qmin as in (9.4.33). On the other hand we have
398
Material and Energy Balancing in the Process Industries
x2 - x2§ = ~2 + ( x 2
- x~) = (I 2 - P2)C~ 2 - x ~ )
with unit matrix 12, hence s
x~ = F 2 A~ T (A~ F2 A2T) 1 A~(:~2-x~)
and consequently
Q2 = (A~ (x2-x2)) " + T(A~ F2 A~T)-1(A~
(:~2-x~)) "
we have v = ~-x + thus Z2 A'v = Z 2 (A~ (~,-x;) + A2 (i2-x~)) = A~ (~2-x~) by (10.5.18), hence Q2 = (z2 A'v) T (A~ F 2 A~T)" (Z 2 A'v)
(10.5.24)
which is (9.3.37) where again, r' is replaced by A'v. The whole proof (9.4.37)-(9.4.41) thus remains valid when substituting A'v for r' in (9.4.33). The result reads.
Having deleted H1 measured variables, after possible reordering let matrix A' obtained by matrix projection (elimination) at f~be (10.5.16b) with H~ linearly independent columns of A 1 . Then linearizing the equation g(z) = 0 at "2 and computing the new adjustment of the remaining subvector x~ of measured values, we obtain criterion Q2 (10.5.21). It equals Q2 = Omin - ~
(10.5.25)
where = ( A ' v ) T N(A'v)
(10.5.26)
with N -
HA1 (A T1 HA1 )-I A T1 H .
(10.5.26a)
Here, A 1 is the H x HI submatrix of (10.5.16b) and H the H x H matrix (10.5.5). Having found a considerable reduction of Qmin by (10.5.25), we finally reconcile the measured subvector x~ according to Subsection 10.4.3 (starting from ~0) _ $) * * + and compute criterion Q2 (10.5.10) using the final adjustment v2 of x2. Let now in particular Hi = 1 (one measured variable deleted). Then A1 is column vector (say) a'i (~ 0) corresponding to the deleted i-th variable. Thus, with 5 = ~(i) ~(i)
~
-1
( A ' v ) T Ha'i(a'i I ai )H ai T H(A'v)
Chapter 1 0
-
B a l a n c i n g B a s e d on M e a s u r e d D a t a - Reconciliation II
399
hence
~(i)
(a'i I A'v)~ _
2 _
(10.5.27)
Zi
Ila'iI1~ according to (10.5.8). This is the same result as (9.4.45) with (9.4.42). The square of the standardized adjustment (10.5.4) approximates the expected reduction of the criterion when one variable is deleted as measured. Thus starting from the variable x i with greatest [Zi] we can delete xi, reconcile and find the reduced criterion, then possibly compute the new standardized adjustments, and SO
on.
Remark If a variable Xh is classified as nonadjustable (at point 9~) we have (h-th column of A') a;, = 0 thus Vh = 0 as well as o~, = 0 by (10.5.6 and 7); then a possible gross error in Xh is not detected. Difficulties can arise also when some a'i is 'small', thus the norm Ila'i IIH is small. Then Ov~ is small and according to (10.5.7) with (9.4.15) and (10.5.23) _.
(')1/2
I vi I < fi Ila] IIHIIA'VIIH fi Ila'iIIH~c.,min
(10.5.28)
thus also I vi I is small; hence I zi I (10.5.4) isratio of small numbers thus uncertain. As was remarked at the end of Subsection 8.5.4, such variable can be called 'almost nonadjustable'. Deleting variable xi as measured, the adjustment problem may become not well- posed and the new reconciliation can fail.
10.6
EXAMPLE
As a simple example, let us consider two-component distillation (imagine the mixture of ethanol and water) in two columns ranged in series.
400
Material and Energy Balancing in the Process Industries
2
4
Fig. 10-5. T w o - s t a g e distillation unit
All the streams are liquid mixtures (A, B); for example A is ethanol, B is water. The component balances read yl
ml -
=0
Yl mE- Y~ m3
ylml_Y~mE_
=0
Y~m3 Y~ m3 _ y4 m4
-
yA5 m5 = 0
y3 m3 _ y4 m4
-
yB5 m5 = 0
(10.6.1a)
where mj is mass flowrate, y 89is mass fraction of component X in stream j. The possibly measured quantities are mj and the concentrations of component A. In addition we have the conditions j - 1, ..., 5:
YJ, + YJB- 1 = 0 .
(10.6.1b)
The concentrations can be measured indirectly via the densities, say Pi in stream i. For an accurate measurement, the temperature dependency of Pi has to be taken into account; hence along with Pi, also temperature T is measured. Measuring density p is equivalent to measuring the specific volume v = 1/p. We suppose that the function V - (Z(y, T)
(Y = YA)
(10.6.2)
is known, for instance as a polynomial interpolation formula. For an ideal mixture, we have the linear dependence fz = YA leA + YB I3'B -- frB + (I~'A - feb )Y ;
Chapter 10 -
401
B a l a n c i n g B a s e d on M e a s u r e d D a t a - Reconciliation II
for the system ethanol-water, the dependence is slightly nonlinear. Then, according to the general scheme (10.4.82), for each stream i whose density (and temperature) is m e a s u r e d we add the equation Q(y~, T i ) - v i - 0
(10.6.3)
to the model equations (10.6.1). Here, the temperature 7~ can be regarded as a model parameter (specified by the measurement), not subject to adjustment. Then the extended model (10.6.1 and 3) involves the variables mj, YJA, YJB, and the measured v~. The model o f measurement will specify in addition which variables mj are measured, and (assuming uncorrelatedness and absence of systematic errors) the standard deviations c~j of measurement errors in mj and r of errors in vi will be given. The covariance matrix F is diagonal of elements r 2 and ~vi Given the measured values, one can start the nonlinear reconciliation. Here, any 7~ is a fixed parameter for each measurement. The nonlinear reconciliation makes use of the Jacobi matrix of the system of equations. In the given case, the matrix can be easily generated a priori. For example if v3 is measured, in the column yA3 we'll have 9
c)V 3 T 3 )T (-m3, 0, m 3 , 0; 0, 0, 1, 0, 0; ..., ~yy (YA' )' "'"
and in the column v3 (0, ..., O; O, ..., O; . . . , - 1 , ...)T where (OQ/~y)(y3, T 3 ) means the partial derivative of the function l~' in (10.6.2) evaluated at (yA3, T 3 ). It is also possible that the input information is directly given as the mass fraction. We suppose of course that the equation (10.6.2) is uniquely solvable in y, given T and v (for the system ethanol-water, f' increases with y), hence the inverse, say y = h(v, T)
(10.6.4)
can be found numerically. From the identity r162
T)) - v = 0
we find
-
3y
3v
1= 0
thus
3v
402
M a t e r i a l a n d E n e r g y B a l a n c i n g in the P r o c e s s Industries
and we can approximate ~h/Ov by a constant in the assumed range of temperatures and concentrations. Thus in the stream 3, under standard operation conditions let us have y3 _ 0.8 and the temperature 79 deg C. By linearisation, the error ey3 in y3 is approximated as ey 3 = k 3 ev3
where ev3 is the measurement error in v3 and k 3 the derivative Oh/Ovevaluated at the standard technological conditions. We then approximate the variance O'y23
2
= ~ (~v3
(10.6.5)
given the standard deviation (~v3. Introducing the (computed) value of y3 into the model, we have the 'directly measured' variable y3 with the variance (10.6.5), and the equation (10.6.3) for i = 3 is deleted. In what follows, for the sake of simplicity let us suppose that the 2 measured values are given directly as mass fractions, with known variances ~y. The component balances (10.6.1) are of the general form examined in Chapter 8 and can be used as such for the reconciliation. So as to further simplify our example, let us transform the equations into another, equivalent form. By summation and using (10.6.1b) we obtain, with YA = Y m l yl_ m I
mE y 2 _ - m 2
m323
--0
- m 3
= 0
m 3 y3 _ m 4 y4 _ m 5 m 3 -
m 4 -
m 5
y5
= 0 = 0
(10.6.6)
in variables mj and yJ, while the variables y~ - 1 - y~
(y~ - 33)
(10.6.6a)
(always unmeasured) have been eliminated. [Observe that with a multicomponent reacting system, such elimination need not be convenient.] The simple system makes possible a complete algebraic discussion (see below) but for the moment, let us consider the model (10.6.6) and give some numerical examples. Let ml be the input mass flowrate under standard operation conditions. Dividing the equations (10.6.6) by m l , all mj are expressed as numbers independent of the choice of physical units. Also the standard deviations ~j (for mass flowrates) can be recalculated in this manner. Let then the standard operation conditions be m
403
C h a p t e r 10 - Balancing Based on Measured Data - Reconciliation H
m 1 -- 1
yl = 0.2
m2 = 0.8
y2 =
m3 -
0.2
0.05
y3 = 0 . 8
m 4 = 1/30
y4 = 0 . 0 5
m 5 = 1/6
y5 = 0.95
(10.6.7)
obeying the balances (10.6.6). In the following examples, we leave m 3 u n m e a s u r e d and consider the standard deviations c~2 - 0.05
(Yl
(Y4 -" 0.002 and
(Y5 = 0.008
6yj = 0.01
(10.6.8)
for any measured mass fraction 3/. In the first example, let yl, y2, and y3 be measured, y4 and y5 unmeasured. We can examine the Jacobi matrix of the system (10.6.6) at the point (10.6.7) that lies on the solution manifold M. Whatever be the way of row elimination, the canonical format of the matrix according to Fig. 7-3 is (the columns are denoted by the corresponding variables) unmeasured 9
m3 y4 y5 submatrix
measured A
9
9
ml m2 m4 m5 yl y2 y3
1 h
B" 1
~!
*
(10.6.9) A'
} 2 rows
where no column of submatrix A' is null. For example we can obtain
B
I!
m
(1
/A:(1 1 5
1
-24
A
~
24
/ 1 11 -0.6
0.75
/ 1.5 28.5
0
0
-6
1
/ 1 -0.8 -0.2 (10.6.9a)
404
Material and Energy Balancing in the Process Industries
At least if the problem is linearized in a neighbourhood of the point, we conclude that variable m 3 is observable, y4 and y5 unobservable, and no measured value is nonadjustable (all are redundant). Let us have measured the values +
m 1 = 1.1
yl+ = 0.21
m2+ - 0.85
y2+ = 0.06 y~ = 0.81
m4+ - 0.03 m+ 5 - 0.2
In order to start the reconciliation, we take the initial guesses for m3, y4, y5 from the data (10.6.7); thus m~~ = 0.2 y4(O) _ 0.05 yS(O)_ 0.95 . If g is the vector of the LH-sides (functions) in (10.6.6) and z the vector of variables the condition
IIg(z) II ~ 10 -4 will be sufficient to consider g(z) as null; IIg(z)ll is the canonical Euclidean norm (square root of sum of squares). See (10.4.22) where T is unit matrix. The condition means that point z lies on the solution manifold M. Because the problem involves unobservable variables, we have to specify some matrix S in (10.4.7). We take again unit matrix hence in each reconciliation step, we minimize the re-adjustments of the unmeasured variables by minimizing their sum of squares, We know that by this artifice, the unmeasured variables' values will not escape from a neighbourhood of the initial guess, at least so long as the reconciliation has a chance to converge. We can use one of the methods suggested in Section 10.4, for instance according to Subsection 10.4.3. With this method, the reconciliation was stopped at
II~llg ~
10-3;
see (10.4.39). Here, ~ is the vector (10.4.29) computed by the procedure, R - F -l (inverse of the covariance matrix), thus IIu 2 is the sum of squares (~x/Ox )2
Chapter 10-
B a l a n c i n g B a s e d on M e a s u r e d D a t a - Reconciliation H
405
E
where Vx are the components of v and Ox the standard deviations (10.6.8). If IIVlIR = 0 then the vector v of adjustments Vx is, with respect to matrix R, orthogonal to the solution manifold M (its projection being ~) and the criterion Q is minimum as required. Q is the generalized sum of squares (vx /Ox )2, its minimum is Omin. The (r0unded-off) reconciled measured values are m
AtI - 1.0962
~I = 0.2139
rh2 = 0.8676
~2 _ 0.0570 ~3 _ 0.8092
/~4 -- 0.0299 and Qmin = 0.4045 ,
rh5 - 0.1988
in addition was obtained the estimate and also certain values y4 _ 0.0461
rh3 = 0.2287
y5 _ 0.9241 . As the reader can notice, the latter values do not differ considerably from the initially guessed ones. The Jacobi matrix evaluated at this point and transformed to canonical format is again (10.6.9), with no zero column in submatrix A'. In a series of such measurements, the canonical format (with different numerical values) will remain the same. We thus conclude in addition that variable m 3 is observable variables y4 and y5 are unobservable no measured variable is nonadjustable. In the given simple example, the conclusion can be proved quite generally (see below). The estimate rh3 is thus uniquely determined by the adjusted measured values and independent of the initially guessed unmeasured values. The values of y4 and y5 as obtained have no precise interpretation. Another initial guess can lead to Other values. They are only compatible with the constraints and 'not too far' from the standard technological values. As the second example, let in addition the variable y5 be measured. The Jacobi matrix evaluated again at the standard operation conditions and transformed to canonical format can be found immediately. In (10.6.9), we only shift the yS-column and place it after the column y3. Then for instance in (10.6.9a) we have
!
1/
: /
406
Material and Energy Balancing in the Process Industries m3 y4
B.
=
/11/
and in A', the last (yS) column is zero. As above, we conclude that at least in the linear approximation, the variables m 3 and y4 are observable, while the measured y5 is nonadjustable. For simplicity and to make a comparison, let us assume the measured values as above, and in addition let yS+ = 0.925 . With the initial guesses m~~ and y4(0) as above, the nonlinear reconciliation procedure yields the reconciled values rh 1 = 1.0962
~1 = 0.2139
rh2 = 0.8676
~2 = 0.0570 ~3 = 0.8092
/~4 = 0.0299 rh 5 = 0.1988
~5 = 0.925
and amin = 0.4045 ;
in addition we have the estimates rh3 = 0.2287 and ~4 .._ 0.0399 . The canonical format of the Jacobi matrix evaluated at this point is the same as with the standard values (only numerically different) and will remain such also in a series of measurements. We conclude that the variables m 3 and y4 are observable the measured variable y5 is nonadjustable; indeed, we have found numerically ~5 = ~5+. Observe also that having added the measurement of an unobservable variable, it becomes nonadjustable. But conversely, deleting anew the latter measurement also the observable variable y4 (not only yS) becomes unobservable. We can also compare the value Qm~, (the same in both examples) with a critical value according to Sections 10.5 and 9.4; see (9.4.3). A gross error is detected if the value Qn~, exceeds the critical value 2~_~(H) where H is the degree of freedom (here: of redundancy) thus the rank of matrix A'; the event occurs
Chapter 10
407
- Balancing Based on Measured Data - Reconciliation II
with probability ct. Regarding t~ = 0.05 as small (the event unlikely), with H = 2 (10.6.9) we have the critical value 2
Z095 (2) - 5.99; see for instance Madron (1992), Tab.A.2 (p. 283). With gross error is detected.
o u r Qmin =
0.4045, no
Imagine a hypothetical case when all the standard deviations of measurement errors are 4-times smaller. From the theory it follows that the adjustments, thus the final estimates remain unaltered; but Qmin increases 16-times and its value 6.47 exceeds now the critical value. Searching for a possible source of a gross error, the (pseudo)standardized adjustments zi can be computed by (10.5.4) with (10.5.3). Here, a'i is i-th column of matrix A' obtained in the final step by elimination. The greatest z~ are found for the variables m 4 and y~; in both cases approximately 2 z42 --" Zyl-5.3
giving a chance to decrease the criterion considerably. Having deleted one of the measurements, we have H = 1 and 7~.95(1) = 3.84. To be precise, one should now reconcile anew with variable m4 resp. y~ regarded as unmeasured and compute the n e w Qmin ; but approximately, as shown in Sections 10.5 with 9.4 the criterion will decrease to a subcritical value 6.47 - 5.3 - 1.2. We have to check the instruments (measuring m4 resp. y~) in order to decide where a gross error can have occurred.
We can also examine the confidence intervals for the estimates; see Section 10.3, last paragraph. Consider for example the observable unmeasured variable m 3 . The (pseudo)variance o~can be computed by (9.3.63) with (9.3.60) thus by 2 = (Xm3 ,, FQF(Zm~ where Q = F-1 - A ,T (A,FA,T)-I (~rh3
A'
(10.6.10)
where the matrix A' is known and also the rows o~' of submatrix A" are known as obtained by the transformation to canonical format of the Jacobi matrix in the last step of the reconciliation. See the general format (10.6.9) where in the second example, the yS-column is placed as last. Because m3 is observable in both examples, the variance can be computed in both cases. Because, in the first resp. second example, B" is arranged as m3 y4
(1
y5
m3 y4
1 * )resp" ( 1 1 )
the row o ~ is the first row of matrix A". In both cases, we find the (pseudo)standard deviation
408
Material and Energy Balancing in the Process Industries
(Yrh3 "" 0 . 0 0 8 3
which is a measure of how precise is our estimate rh3 . As the third example, let us consider the case when yS+ = 0.94 while the other measured values are the same as in the preceding example. The reconcilation fails, not perhaps algebraically, but physically. The reconciled measured values remain the same, but we obtain for the (formally) observable unmeasured variable y4 the absurd estimate ~4 :
_
0.06
.
A gross error is not detected by the value of Qmin. Suppose we do not know the above results, but only the result of this last reconciliation. We can try to delete the measured variable y5 because by the analysis of the Jacobi matrix, it has been found nonadjustable thus not affecting the criterion (being of null adjustment). We find the results of the first example (where Qn~nis also lower than the critical value), along with certain basically possible values of y4 and y5 compatible with the balance. We can conclude that a gross error is present in the measured yS+. Observe that generally, an error in the measured nonadjustable variable does not affect the other reconciled measured values, but it can affect the estimates of the unmeasured observable variables. Of course so long as the values are not obviously absurd, a gross error is not detected.
Remark
The simple set of balance equations (10.6.1) allows us to compare the results with direct analysis of the equations in general form. We have already transformed the equations to the form (10.6.6), with trivial equations (10.6.6a) in addition. As the reader easily verifies, with measured and reconciled values rh~, rh2 , rh4, rhs, ~l, ~z, ~3, ~5 (the second example) have to be obeyed the equivalent equations m 3 = rh 1 - rh2
(a)
rh I - rh2 - rh4 - rh 5 = 0
(b)
(rhlr~/4Y 4 = (trtl
= 0
- /~/2 )~3 _ /,~/5~5 .
(c) (d) (10.6.11)
Chapter 10 - Balancing
Based on Measured Data - Reconciliation H
409
The equations (b) and (c) involve only the measured variables. They represent the solvability conditions; notice that variable y5 is not involved. The reconciled values obey the equations with minimized adjustments (criterion Qmin ). If so, the observable variables m 3 and y4 are uniquely determined by (a) and (d). In the first example, also y5 is unmeasured. The equations (a), (b), (c) remain as above, and in (d) we have the condition /~4 y4 + r~t5y5 = (/~1 - /'~/2 )Y3 "
(10.6.12)
The observable variable m3 is again uniquely determined by (a). The variables y4 and y5 occur only in (10.6.12) and are not uniquely determined by the condition; they are unobservable.
10.7
MAIN RESULTS OF CHAPTER 10
Formally, the nonlinear reconciliation problem can be stated in the same manner as in the linear case; see Section 10.1. As the examples in the section show the problem can be, however, not well-posed. It can happen that the solution does not exist, or an effective way of finding a solution would require an algebraic pre-treatment of a complex system, not feasible in practice. The formal statement of the problem is given at the end of Section 10.2. In what follows, we suppose that the admissible region U in (10.1.28) is open, thus the boundaries of U are not included in U ; most simply, we can imagine U as an N-dimensional open interval, a product of onedimensional intervals where the individual variables' values can lie due to the particular technology. Then the necessary conditions o f minimum can be formulated according to Section 10.2. The methods of computation are, in fact, directed towards attaining some point where the latter conditions are fulfilled, while deciding that this is actually the solution is rather a matter of our expectation only. Rigorous mathematical arguments can support this expectation only when the admissible region is 'sufficiently small' and the components of the measured vector x § 'not too distant' from the true values. The minimum conditions are recast into different equivalent forms in Section 10.3. Pragmatically and disregarding the theoretical existence and uniqueness problems, the reconciliation problem is reduced to finding some obeying the conditions (10.3.11). We then expect that this ~, making the constraint equation solvable by (10.3.11 a), provides also the minimum (10.1.31) thus Qmin = vVF-1 v
(10.7.1)
410
Material and Energy Balancing in the Process Industries
with the adjustment (10.1.32). The conditions are expressed as a local property of point i=
( ) 'J) } i
We require that the (a)
g
There
}N.=J+I.
}I
estimate i
exists some
obeys the
(10.7.2)
solvability condition
~ (unmeasured vector) such that
(Y)=0.
(10.7.3)
:i
Now, at point z (10.7.2), we evaluate and partition the (by hypothesis)full row-rank Jacobi matrix Dg(i) = ( B , A ) } M J
(rankDg(i) - M)
(10.7.4)
I
according to the partition of the vector z into subvector y of unmeasured and subvector x of measured variables. The partitioned matrix (B, A) determines uniquely the projector (10.3.8) P = I - FA 'T (A'FA 'T )-1 A'
(10.7.5)
where I is I x I unit matrix. The matrix A' is an arbitrary H x I matrix resulting from elimination (10.3.2) of H linearly dependent rows of submatrix B in (B, A), according to Chapter 7. While A' depends on the way of elimination (matrix projection), the projector P does not. The second condition then reads (b)
P ( i - x§ = 0 .
(10.7.6)
Numeric methods are directed towards attaining point i obeying the two conditions. If a point ~, obeying the conditions (a) and (b) is found, it is considered as the solution of the reconciliation problem, and v = ~ - x+
(10.7.7)
is the adjustment, giving the minimum Q,~n (10.7.1). The subvector $, in (10.7.3) is generally not unique, unless rankB = J (full column rank) at point i. Else only, possibly, certain components thus a subvector S'0 of S' is observable, thus uniquely
Chapter 10 - Balancing Based on Measured Data - Reconciliation II
411
determined by ~. If J = 0 (all variables measured), we put A' = A in (10.7.5). If it happens that H (= M - rankB) = 0 then the reconciliation problem is not formulated. Having found the vector ~ and some ~, obeying the conditions, we can examine the properties of the solution. One conclusion is immediate. If the covariance matrix F is diagonal and if some (say, h-th) column of matrix A' is null (10.3.14) then the h-th adjustment Vh (component of v) is also null; also this property is independent of the particular choice of A' at f~. The 'statistical characteristics' of the solution are, for a nonlinear problem, not rigorously defined; see the commentary that follows in the paragraph after (10.3.15). So as to have an approximate idea of the reliability of our estimates, we can linearize the problem in a neighbourhood of the point $. Using the canonical f o r m a t of the transformed Jacobi matrix, we arrive in particular at the (pseudo)covariance matrices (10.3.33 and 34), which are the same as in the linear case. Then the (pseudo)variances ~2~ and cr~j 2 can be computed according to (9.3.62 and 63). Introducing again, at point ~, the symmetric matrix (9.3.60) Q = F -1P
(10.7.8)
we thus have
(y2~i "where
q)i
Qq~]
q)i
(t0.7.9)
is the i-th row vector of F, and for any observable variable yj
~2yj= o~j"FQFo~ T
(10.7.10)
where ~j is the j-th row vector of submatrix A" in the canonical f o r m a t . Here, denoting by x t resp. yt the (unknown) true values of x resp. y, 6~2 is the i-th (pseudo)variance of the error ~-x t and ao2 the j-th (pseudo)variance of the error ~_yt, for the uniquely determined (observa'~le) component yj of y. Concerning the (possibilities of) observability/unobservability classification, see Subsection 8.5.4 of Chapter 8. A necessary condition of observability is that variable yj is qualified as observable in the linearized system at point $, as follows from the canonical format of the transformed Jacobi matrix. By the same classification, for a nonadjustable variable Xh and with diagonal matrix F, along with zero adjustment we obtain ~ ,2 = ~2 (h-th measurement error variance) as is readily verified using (10.7.9) with (9.3.60). The above characteristics make sense only if the minimum is found in an open admissible region U , not perhaps somewhere on its boundary. Indeed, in the linearized model we assume that the condition (10.7.6) is fulfilled; the condition represents just the minimum in an open region. In addition, computing the confidence intervals such as in (9.3.56) we admit that the true value z t of z
412
Material and Energy Balancing in the Process Industries
can lie somewhere in an open neighbourhood of ~ (both-side neighbourhood for any component Zn ), thus for example xit < "Xi or also xit > xi for the i-th components of x t and ~,. Numeric methods of solution are outlined in Section 10.4. One starts from some initial guess z + (10.4.1) where subvector x + is the vector of actually measured values, and y+ some initial guess of the unmeasured subvector, in the manner that z + lies in the admissible region. So as to improve the initial guess y+, one can proceed as outlined in Subsection 10.4.1, after formula (10.4.6c). One variant of the reconciliation procedure is then outlined in Subsections 10.4.2 and 10.4.3, as summarized in the paragraphs at the end of the latter subsection, beginning before formula (10.4.43). The procedure consists of 'suboptimal reconciliation', thus finding some solution ~0~ of the model equation g(z) = 0 such that the subvector ~0~ is 'as close as possible' to the initial x § and of 'sliding down' along the solution manifold M to the moment when the minimum (10.1.31) is attained. At the same time, the y-subvector is successively adjusted, giving a final value ~. Here, we admit that this .9 is not uniquely determined by the estimate ~,; the procedure is then controlled in the manner that the successive estimates of y remain 'as close as possible' to the initial guess, so as to avoid the z-estimates escaping from the admissible region. The approximation steps can be made shorter, so as to avoid 'overshooting' in the first (suboptimal) stage (a conveniently chosen norm of the g(z)-values must decrease in any step), and in the manner that the criterion (x-x + )I" F -~ (x-x + ) decreases in any step of the second (sliding-down) stage, towards the final minimum. The method is supported by theoretical analysis. The analysis also shows that the method can fail if the problem is not well-posed. The theoretical condition of well-posedness is constant rank of submatrix B at any point z of the admissible region; see again the solvability analysis in Section 8.5, summarized in Subsection 8.5.4. If, in a series of measurements, the method fails only incidentally then another cause of the failure can be a bad initial guess, in particular a gross error in the measured X +"
Another ('short-cut') variant is outlined in Subsection 10.4.4. In each step (at points z ~k~) one linearizes the equation g(z) = 0 and solves the reconciliation problem for the linearized equation. It is, in fact, a simple version of successive quadratic programming (SQP, see Subsection 10.4.5, Remark (i)), tailored for the special case where the 'objective function' depends on subvector x only, and is quadratic in the vector variable. If the method converges, it can be shown that the solution obeys the above necessary conditions of minimum. A failure is again possible, perhaps because the problem is not well-posed, or because the initial guess has been bad. The method does not allow the steps to be controlled as in the former variant by making them shorter. But having tested both methods so far, the authors have found them working equally well, with single failures. It should be noted that without tailoring an SQP method for the
Chapter 10 - Balancing
Based on Measured Data - Reconciliation II
413
special case of reconciliation, difficulties can arise when the y-variable thus the whole vector z is not uniquely determined. More general SQP methods can find the minimum also at the boundary of an admissible region; in fact they have been developed with special attention to this possibility, for example when looking for economic optima. As solution of a reconciliation problem, such result is of minor value; see the above statistical (probabilistic) interpretation of the solution. The nonlinear methods with admissible boundaries are likely to give some solution even if certain unmeasured variables are not observable (not uniquely determined). In particular the corresponding unobservable values will then depend not only on the boundaries admitted, but also on the solution strategy and cannot be regarded as statistically meaningful. In Remark (iii) to Section 10.4 we illustrate the importance of well-posedness. If the problem is not well-posed, even if finding some solution it can happen that the (pseudo)variance o yj 3 (10.7.10) of some unmeasured computed variable is great thus the estimate ~j uncertain" the measurement placement is inadequate for the determination of the variable. In Remark (iv) to Section 10.4, we generalize the reconciliation problem for the case that some variables are identified via other measured data, not occurring as variables of the balance model proper (10.4.76). The extended model (10.4.82) is then again of the form analyzed generally in Section 8.5 and admitting the general reconciliation procedures as suggested. The covariance matrix F is that of errors (10.4.86) in the directly measured variables; then also the special assumption that F is diagonal is, most frequently, quite plausible. A strategy of detecting and identifying gross errors can be based on the (pseudo)statistical characteristics of the solutions; see Section 10.5. We compute the criterion amin (10.7.1). Assuming formally that the fictitious variable Qlin associated with the linearized system (at point ~.) has the chi-square distribution, a gross error is detected if (the computed) Qmin exceeds a critical value (9.4.3). We suppose again diagonal matrix F. We then compute the (pseudo)standardized adjustments zi = vi/Ovi where vi is i-th component of adjustment v and Ov~ is computed by (9.6.13) where ~ is again the i-th measurement error variance and a'i the i-th column vector of matrix A' evaluated at point ~, as in (10.7.5). If a'i = 0 then vi = 0 and Ov~= 0, thus a (possible) gross error in xi is not identified. The most suspect variable is again the variable xi with greatest I zil. We have shown that zi2 approximates the reduction of the criterion Qmin when the (sole) variable xi has been deleted as measured; see (10.5.27). Having deleted the suspect measured variable, it remains to carry out the final reconciliation (possibly by the 'sliding-down' stage of the above reconciliation procedure, starting thus from point ~ on the solution manifold), and compare the new value of the criterion with the new critical value (for H-1 degrees of freedom). If the critical value is still exceeded, we repeat the procedure. Also possible is finding an estimate of Qmin when several suspect measured variables are deleted simulta-
414
Material and Energy Balancing in the Process Industries
neously; see (10.5.25 and 26), with the condition (10.5.17). Difficulties can arise when some measured variable is 'almost nonadjustable' at point ~ (the standardized adjustment zi is ratio of small numbers); see Remark to Section 10.5.
10.8
RECOMMENDED LITERATURE
As well as in the previous chapter, in the more general frame of measured data processing the topic is dealt with in the recent book by Madron (1992, Chapter 4), with literature survey and references. A rigorous statistical theory of nonlinear reconciliation is difficult and its application to problems of industrial practice is rather lacking. From the viewpoint of methodology, the topic belongs to that of nonlinear parameter estimation dealt with comprehensively in Bard (1974). Up-to-date methods of computation are based largely on nonlinear, in particular successive quadratic programming (SQP). For the application of SQP methods to large-scale problems, see a survey by Lucia and Xu (1990). In this chapter, we refer also to Knepper and Gorman (1980), Crowe (1986), and to a paper by Veverka (1992) where the convergence of a successive reconciliation method is examined theoretically. Although a rigorous theory including statistics is rather lacking, the papers dealing with nonlinear reconciliation techniques are numerous. They do not pay much attention to theory, but rather present the implementation of routine methods of computation (Swartz 1989, Swartz et al. 1989, Ramamurthi and Bequette 1990, Leung and Pang 1990, Nair and Iordache 1990, Stephenson and Schindler 1990, Charpentier et al. 1991, Tjoa and Biegler 1991, Biegler and Tjoa 1993, Islam et al. 1994, Pages et al. 1994, Pierucci et al. 1994; the list is of course incomplete). The routine methods are largely SQP and the implementation was successful, as stated in the papers. Swartz (1989), Swartz et al. (1989), Ramamurthi and Bequette (1990), and Leung and Pang (1990) with reference to Swartz (1989) report on the implementation of (basically) Crowe's method (Crowe 1986); Swartz (1989) mentions explicitly the classification of unmeasured variables into observable and unobservable. Islam et al. (1994) have compared the 'successive linear' (basically again Crowe's) method with SQP; they find differences if the initial estimates were bad, which is in accord with the 'suboptimal' character of the former (compare with Subsections 10.4.2 - 10.4.4). Bard, Y. (1974), Nonlinear Parameter Estimation, Academic Press, New York B iegler, L.T. and I.B. Tjoa (1993), A parallel implementation for parameter estimation with implicit models, Annals of Operation Research 42, 1-23
Chapter
10 - B a l a n c i n g B a s e d on M e a s u r e d Data - Reconciliation II
415
Charpentier, V., L.J. Chang, G.M. Schwenzer, M.C. Bardin (1991), On-line data reconciliation system for crude and vacuum units, NPRA Computer Conference, Houston, TX Crowe, C.M.(1986), Reconciliation of process flow rates by matrix projection, Part II: The nonlinear case, AIChE J. 32, 616-623 Islam, K.A, G.H. Weiss, and J.A.Romagnoli (1994), Non-linear data reconciliation for an industrial pyrolysis reactor, Computers Chem. Engng. 18, Suppl., S 217 - S 221 Knepper, J.C. and J.W. Gorman (1980), Statistical analysis of constrained data sets, AIChE J. 26, 260-264 Leung, G. and K.H. Pang (1990), A data reconciliation strategy: From on-line implementation to off-line applications, AIChE 1990 Spring National Meeting, Orlando, FL Lucia, A. and J. Xu (1990), Chemical process optimization using Newton-like methods, Computers Chem. Engng. 14, 119-138 Madron, F. (1992), Process Plant Performance, Measurement and Data Processing for Optimization and Retrofits, Ellis Horwood, New York Nair, P.K. and C.D. Iordache (1990), On-line reconciliation of steady state process plants (Applying rigorous model-based reconciliation), AIChE 1990 Spring National Meeting, Orlando, FL Pages, A., H. Pingaud, M. Meyer, and X. Joulia (1994), A strategy for simultaneous data reconciliation and parameter estimation on process flowsheets, Computers Chem. Engng. 18, Suppl., S 223 - S 227 Pierucci, S., T. Faravelli, and P. Brandani (1994), A project for on-line reconciliation and optimization of an olefin plant, Computers Chem. Engng. 18, Suppl., S 241 - S 246 Ramamurthi, Y. and B.W. Bequette (1990), Data reconciliation of systems with unmeasured variables using nonlinear programming techniques, AIChE 1990 Spring National Meeting, Orlando, FL Stephenson, G.R. and H.E. Schindler (1990), On-line data reconciliation of a utilities plant, AIChE 1990 Spring National Meeting, Orlando, FL
416
Material and Energy Balancing in the Process Industries
Swartz, C.L.E. (1989), Data reconciliation for generalized flowsheet applications, American Chemical Society National Meeting (April), Dallas, TX Swartz, C.L.E., K.H. Pang, V.S. Vemeuil, and D.A. Eastham (1989), Refinery implementation of a data reconciliation scheme, ISA National Conference (October), Philadelphia, PA Tjoa, I.B. and L.T. Biegler (1991), Simultaneous strategies for data reconciliation and gross error detection of nonlinear systems, Computers Chem. Engng. 15, 679-690 Veverka, V. (1992), A method of reconciliation of measured data with nonlinear constraints, Appl. Math. Computation 49, 141-176
417
Chapter 11 DYNAMIC BALANCING
Generally, a 'dynamical system' is a system developing in time according to some evolution law. The law can be formulated as a set of differential equations with time as a variable. For example in a stirred homogeneous chemical reactor with known reaction kinetics, we can set up the 'dynamic balances' (4.7.1) and (5.6.15) where the reaction rates are given functions of the state variables. We shall not, however, consider such systems in general and we shall limit our attention to the simplest case of d y n a m i c m a s s b a l a n c i n g . Then the evolution law is simple mass conservation law with accumulation of mass admitted in certain nodes.
11.1
MASS B A L A N C E M O D E L W I T H A C C U M U L A T I O N
Recall Chapter 3, Fig. 3-1 in Section 3.1. If N u is again the set of units (without the environment node), let us consider the subset NaCN u
(ll.l.1)
of nodes where the (change in) accumulation is admitted. The nodes n ~ be inventories as separate units, or also, according to how detailed description of the system, certain larger units comprising an inventory. case, each n ~ N a represents just one inventory whose state s n (t) measured in the manner that
N a can is our In any can be
ds n an -
(n E N a )
(11.1.2)
dt represents the increase in accumulation of mass in node n, per unit time. Thus a n is a fictitious mass flowrate (output stream from node n), which can be positive or negative. Let a be the vector of components a n , n
e
N a .
We then partition the vector of mass flowrates
(11.1.3)
418
Material and Energy Balancing in the Process Industries
mf/
}Jf
a
}
m =
(11.1.4)
Ja
w h e r e m f is vector of components mi, i ~ Jf; Jf is the set of material streams. The set Ja is in one-to-one correspondence with the set N a and
J - Jf k.) Ja
(Jf ~ Ja = Q~)
(11.1.5)
is the whole set of arcs (streams) of the graph G[N, J], with (3.1.4). We then have the mass balance (3.1.6) thus C m = 0 where C is reduced incidence matrix of graph G, with environment as the reference node. According to (11.1.4), we partition C=(
Cf, Ca) Jf
} Nu .
(11.1.6)
Ja
The matrix C can be also row-partitioned by Nu = (Nu-Na) u N a . In the subset of rows n ~ Nu-N a , we have zeros in the columns j ~ Ja (no change in accumulation admitted); in the subset of rows n ~ Na , in each column j ~ Ja we have just one nonnull element (-1) corresponding to the fictitious stream: node n ---) environment. The mass balancing is carried out at discrete times tk (k = 1, 2, ... ). We shall now suppose that instead of instantaneous flowrates, certain integrated mass flowrates tk mik "- f m i (t)dt (i E J~ c Jf ) tk.1
(11.1.7)
are measured by integral flowmeters, and in addition the states of all the inventories thus Sn (tk) for each n ~ N a are measured. The initial states Sn (to) are considered as given constants. [The convention that all Sn (tk) are measured simplifies the terminology and notation. An unmeasured fictitious mass flowrate can be formally included in the list of the unmeasured variables irrespective of the interpretation; it is then observable or unobservable, in the end thus possibly estimated or unknown.] Let us further introduce the integrals tk n E N a 9ank = ~ an (t)dt - s n (t k ) - s n (tk_1 ) tk_l
(l 1.1.8)
Chapter 11 - Dynamic Balancing
419
according to (11.1.2). Then the time-integrated balance (3.1.6) reads Cf mfk
+ C a ak
= 0
for k = 1, 2, ...
(11.1.9)
where reek is the vector of components mik (i ~ Jf ), having extended the definition (11.1.7) also for streams i ~ Jf that are not measured; ak is the vector of components (11.1.8) where we have ordered the set Ja of accumulation streams according to a given order in the set N a . Formally, we have thus identified the latter streams with the inventories Ja = Na
(11.1.10)
by the one-to-one correspondence. If Sk is the vector of components s n (t k ) (n E N a ), Eqs.(11.1.9) read k = 1, 2, .--:
Cfmfk + CaS k - CaSk_ 1 = 0 .
(11.1.11)
Possibly unmeasured are only certain components of the subvectors mfk, say mik for i ~ j0 _ jf_j~. Then the subgraph G O of G restricted to unmeasured streams is of reduced incidence matrix (say) B. We thus partition Cf-- ( B
(11.1.12)
, C~ ) } N u .
jof Observe that Cf is reduced incidence matrix of the graph (say) Gf [N, Jf ] representing the system of given nodes and of material streams, disregarding the accumulation. It is quite natural to assume that also (11.1.13)
Gf [N, Jf ] is connected.
Then in particular the graph reduction according to Chapter 3 (or any other equivalent elimination method according to Chapter 7) is governed by the operations on submatrix B, and corresponds to the matrix transformation ww
C = (Cf, Ca)-
(B, C~, Ca)~.+
B" A f , 0 Af
I
Aa/
i I I A'a
}H
(11.1.14)
where the submatrix A'f is of f u l l row rank rankA~ = H .
(11.1.15)
Here, we have eliminated H = K-1 linearly dependent rows of submatrix B as corresponds to the K connected components of subgraph G ~
420
Material and Energy Balancing in the Process Industries
Let us consider the graph reduction 9 The corresponding matrix operation is summation of rows of the full incidence matrix over each subset of nodes constituting a connected component of G O. The connected component containing the reference (environment) node is further not considered and the H (= K-1) rows of the submatrix (Af', A'a ) are thus sums of rows of (C~, Ca ) over the respective nodes of the remaining connected components. Now according to the convention (11.1.10), the submatrix Ca can be partitioned 0
) } Nu-N a
c~ =
(11.1.16) -I~
} Na=J a
Ja = Na
where I a is unit I N a [ x [Na [ matrix 9 Let us partition and re-order the nodes n e N a according to the K (= H + I ) connected components (node sets N O, N~, .--, N H ) thus N a = (N a ~ N 0) u (N a ~ N~) u "- u (N a (h NH)
(11.1.17)
where No contains the environment node; it can happen that some N a ~ N h = ~ . The matrix Ca is thus partitioned :
C a "-
0
"~ } N u - N a
9.. N. n N h
-l~h
Na r Nh where only such h that N a (h N h ~: O occur; lab is IN a n Nhl • I Na n Nhl unit matrix. If now N a n N O ~ O then by the merging (elimination) the rows n ~ N a ~ N O are absent in (A'f, A'a ) and the columns n ~ N a ~ N O in A'a equal zero: the fictitious accumulation streams n are nonredundant. If N a n N h = ~ with h ~: 0 then the summation over rows n ~ Nh concerns only zero rows of Ca, hence the corresponding h-th row of A', equals zero. Finally if h , 0 and N, & Nh ~: O then the summation over Nh yields the h-th row or = ( . . . ,
(-1,-.-,-1),---0
... )
N a fh N h of A'a. Writing the nonnull rows of A'a as first, we thus have
(11.1.18)
Chapter 11 - Dynamic Balancing
421
IJ I=INal ^
9
[ Na ~ No ["
A'a- ( oaO
':" ~)) 0")}el e
(11.1.19)
where (D a , 0) is matrix of rows {xh such that N a n N, # O, h # 0, say in n u m b e r H~, while the r e m a i n i n g H-H1 zero rows correspond to connected components N n, such that h' # 0, N a ~ N n, = O: no inventory in subset Nh,. The last I Na c~ No[ c o l u m n s (absent if N a n N O = 0 ) represent nonredundant fictitious accumulation streams. B y (11.1.18) we have rankD a = H 1
(11.1.20)
hence the submatrix is of full row rank (linearly independent rows).
The result (11.1.15-19) will be needed in the theoretical part of the next section. For the moment, let us only observe that the nonredundant accumulations are just those a n where node (inventory) n is connected by a sequence of unmeasured streams with the environment, say enviroment
,
r a,
-. "
t'k,
- 1, thus at least two nodes with accumulation (inventories) have been merged; for example
A~ a~
enviroment
a n
.,I
" unmeasured
Fig. 11-2. M e r g i n g of two nodes with accumulation
422
Material and Energy Balancing in the Process Industries
The nodes n ~ Nu-N a can be for instance splitters, or other nodes where the change in accumulation has been neglected. In the set of equations (11.1.11), we further partition m0k) m~
-
+
mfk
} j0 (unmeasured) +
(11.1.21)
} Jf (measured).
If in particular jo = O then submatrix B is absent, no elimination (graph reduction) takes place, and m~k = reek, A~ = Cf, A'a = C a (11.1.16). In (11.1.19), the subset of zero columns is then absent, and the submatrix D a corresponds to - I a in (11.1.16), written as first. + The components of mfk are measured at time tk , as well as those of Sk, while the components of Sk-1 (for k > 1) are measured at tk_l. Given time tr, we can regard the measurement errors in mfk + and Sk for k = 1, ... , K as realisation of a composed random vector variable, and reconcile the totality of the measured values up to time time tK, under the constraints (11.1.11) where k = 1, ..., K, with given constant s o (initial states of the inventories). At the next tK+l, we add the values measured at tK+l and the constraint (11.1.11) for k = K+I, reconcile the extended system, and so on. The whole measured vector up to a given time is thus successively re-adjusted. More sophisticated methods were proposed (Darouach and Zasadzinski 1991). In any case, one has to work with a huge model and the procedure is rather cumbersome. In the next section, we will give a simpler method.
11.2
DAILY BALANCING
Let, for any k > 1, tk- tk_ 1 be constant; daily balancing means that the constant equals 24 hours. At any tk, our goal is to adjust (reconcile) the measured integrated mass flowrates m+k (i ~ J~ ) and the measured states of the inventories Sn + (tk) (n s N a ), SO as t o satisfy the mass balance. Let Ff be the covariance matrix of measurement errors in the m +ik , and F a that of measurement errors in the primary measured variables Sn + (tk), both by hypothesis independent of tk (since the time interval in (11.1.7) is of constant length tk- tk_~), and let
F =
(11.2.1) Fa
be diagonal (uncorrelated measurement errors). Thus F f is of diagonal elements (variances) (Yi2 (i ~ J +) e and F a is matrix of variances (say) '1;2n (n E N a ), with the convention (11.1.10). The random error vectors at different times are assumed
Chapter 11 - Dynamic Balancing
423
(statistically) independent. If there are systematic errors present, they are assumed constant (independent of tk ). Apparently, the simplest way is using the variables ank (11.1.8) and the + balance (11.1.9). Because ank+ = S +n (t k )-Sn+ (tk_ 1 ), the m e a s u r e m e n t error in ank equals the corresponding difference e n (t k ) - e n (tk_ 1 ) of measurement errors at tk and tk_~ . By the assumed uncorrelatedness between the two errors, the corresponding variance equals 2
E((e'n (tk)-en (tk-1))2 ) = E(~,n (t k )2 ) + E(~,n (tk_1 ) _ 2XZn;
(11.2.2)
en is the random (nonsystematic) part of the error. Formally, we can regard also
the initial Sn (to) as measured value S+n(t o ) subject to error e n ( t o ); then (11.2.2) holds for k = 1, 2, .... Because Sn (to) does not occur in the constraints (11.1.9), it is formally a nonredundant (nonadjustable) variable; thus the estimate Sn (to) = S: (t o )
(1 1.2.3)
stands for the initial value S n (t o ). Given time tk (k > 1), we can apply an arbitrary linear reconciliation method (see Chapter 9) to the constraint equation
By+Ax=0where y = m ~ X--
(11.2.4) mfk ak
according to (11.1.21) and (11.1.12), and where A -- ( C ~ , C a ) .
(11.2.5)
The covariance matrix is, in lieu of F (11.2.6)
( s a y ) ~ ' = ( Ff ) 2 Fa
according to (11.2.2). Generally, admitting also unobservable components of the unmeasured y = re~ an elimination (in particular graph reduction) leads to (11.1.14). The solvability condition then reads A'x = 0 where A' = (A'f,
A a)
(11.2.7)
and we reconcile the measured value x § of x (11.2.4). We obtain the estimate ~,
424
Material and Energy Balancing in the Process Industries
thus in particular the subvector fik representing our estimate of ak. Since k
Sn (tk) -- Sn (to) +I~1 anl
(11.2.8)
by (11.1.8), we then estimate the vector Sk as k Sk = go +/__E1fil 9
(11.2.9)
Experience has shown, however, that after some time tk absurd values of some ~n (tk ) (estimated state of inventory n) can be obtained; for instance Sn (tk) is greater than the maximum capacity of the inventory. This fact can be attributed to a cumulation of (even small) systematic errors of the measurement. Another method has proved successful. It is based on the constraint (11.1.11) where only Sk is regarded as (primary) measured variable at given tk, while Sk_l is a constant. In fact, Sk_~ should be taken as the true value of S(tk_1 ); the true value being unknown, it is replaced by the previous estimate Sk-~. Our constraint equation at time tk thus reads (11.2.10)
Cf mfk + C a Sk - C a Sk-1 = 0
thus By + Ax + c = 0 where y = m~ X=
(11.2.11) mfk Sk
according to (11.1.21) and (11.1.12), and where A is again the matrix (11.2.5); in addition the constant C = - C a Sk-1 "
(1 1.2.12)
We can use again an arbitrary reconciliation method according to Chapter 9; the covariance matrix is now F (11.2.1). Observe that +
Ax + c - C~ mfk 4- C a (s k Sk-1 ) hence the elimination (11.1.14) yields the solvability condition A'x + c' = 0
where
A' - (A'f, A'a)
and
c' = - A a SR-I 9
(11.2.13)
425
Dynamic Balancing
Chapter
11 -
Having
reconciled
t h u s in p a r t i c u l a r
the measured the subvector
v a l u e x + o f x ( 1 1 . 2 . 1 1 ) , w e h a v e t h e e s t i m a t e ~, Sk r e p r e s e n t i n g
our estimate
o f S(tk ).
The preference given to the latter method can be supported by theoretical arguments. We shall compute the expected systematic error in vector variable (estimate) r,k as (say) dk = E(~,k - s~:)
(1 1 . 2 . 1 4 )
where s kt is the true (unknown) value, as function of the systematic errors % (in m~k) and es0 (in Sk ), by hypothesis independent of tk. When reconciling according to (11.2.4-9), we first obtain the estimate ak as subvector of :L We can use directly the formula (9.5.12) where the projector P (9.3.21) is written as P, as corresponds to the covariance matrix F'. The systematic error vector e 0 equals
eo =
/ /
=
%-%
0
9
(11.2.15)
+ § is of zero mean. We thus have the error in ak§ = Sk-Sk_l ~,eo = eo - ~,A,T (A,~,A,T)-1 A ' e o hence the subvector E($k-ak t) of E(~-x t ) equals (for any k > 1) E(~k_a k ) = _2Fa Aa,T (A,~,A,T)-1Af' % = a0 (say)
(11.2.16)
t t according to (11.2.6 and 7). Here, akt = Sk-Sk.1 hence by (11.2.8 and 9)
k Sk - S k t - - S o
- S~ 4"
(a I -
t al).
By virtue of (11.2.3) we have E(~,0-s~ ) = es0, hence d k = eso + ka o .
(11.2.17)
If % r 0 we have generally a0 r 0. The n-th component of dk (systematic error in 's (tk)), according to the algebraic sign of the n-th component of a 0 (if nonnull) decreases or increases proportionally to k and for great k, the estimate Sn (/k) can become negative or exceed the capacity of the inventory as was actually observed in practice. Let us now consider the second case (11.2.10-13). By (9.2.15), we have in particular sk = s~- FaA'a T ( A ' F A 'T )~ (A'x +- A'a Sk-1 ) where Sk is the measured value of s k . Because the true values obey E q . ( l l . l . l l ) thus t 1 =0 B y t + A x t _ C a Sk.
426
Material and Energy Balancing in the Process Industries
according to (11.1.12) with (11.2.5), by elimination we have A' a x t
-
A ' a s kt- 1 = 0
"
Hence by subtraction S'k- Skt _. Sk" + Skt FaA'aT (A'FA 'T)I (A'e
' ~ t )) . Aa(Sk.l_Sk_l
( 11. 2. 18)
where e = x+-xt. The systematic error vector equals
eso
/
( 11. 2. 19)
We thus have, with (11.2.14) dk = e~o - Fa A'.T (A 'FA'T )-1 A'eo + Fa A'.T (A 'FA'T )-I A'. dk_1
(11.2.20)
for k > 1. In the construction of matrix A', let us now apply the graph reduction and the partitions (11.1.16-19). Let us designate
A~= [ D0a
]
(11.2.21)
thus A'a = (A], 0). The set N a ~ N o represents nonredundant variables, the remaining subset (say) J: ( c Ja = Na ) that of redundant ones" thus A~ is H x I J]l. The corresponding partition of F, is Fa =
(F: )
(11.2.22)
FaO
and we thus have A' = (A'f, A:, 0)
(11.2.23)
and A'FA 'r = Af Ff A'fT + A: F~ A~T
(11.2.24)
by (11.2.1). In (11.2.19), let e~0 be the subvector of systematic errors in the redundant variables' subset, and let d k be the corresponding subvector of dk. We thus have, by (11.2.20) d~ = e:o
F: A~T (A'FA 'T )-1 (Af efo + A: e:o) + F: A: T (A'FA 'T )~ A~ dk~
-
(11.2.25)
while for the nonredundant (nonadjustable) variables the systematic error in Sn (tk) (estimated state of n-th inventory) equals the systematic measurement error in S+n(tk ), as can have been expected.
427
Chapter 11 - Dynamic Balancing Let us further designate
(11.2.26)
M a = F: A~T ( A ' F A 'T )-1 A; and
Maf = F: A~T (A'FA 'T )-IA'f.
(11.2.27)
We then have the recursion formula
(11.2.28)
dk = (I:- M a)e:o- Mafefo + Ma dk.1
with unit I J:l x I J~l matrix I:. Here, d o is introduced formally as the systematic error in the initial estimate So; then the formula holds true for any k > 1. By induction, we can easily prove that for any k > 1
d: = eso + Mka (d o - e~o ) -
j=O
M
(11.2.29)
Maf efo
where M ~ = I : ; M~ = M a M a ... M R (j-times). It can be shown that under the hypotheses adopted, we have oo
lira Mka = 0
and
k---)"~
(11.2.30)
Z M~ = (I a - M . ) I .
j=O
The proof is based on the theory of normed spaces. An M x N matrix M represents a linear map from vector space (say) E into vector space F. If the spaces are normed, we can introduce the norm ]]MIIEF as the supremum of IIMXllF on the 'unit sphere' IlXllE -- 1; II'IIE resp. II'IIF are the norms introduced on E resp. F. Omitting the subscripts, for the composition of two maps we have
IIM1Mzll -
(11.2.31)
IIM1 II IIM211
and in particular
IIMxll- IIMIIIlxll.
(11.2.32)
Let in particular M be arbitrary M x M, let I M be unit M x M matrix. Then
if IIMII
0
11E Mill < Z IIMJll < Z lIMP 1 j=0 j=0 j=0 1-11MII
.
(11.2.34)
Material and Energy Balancing in the Process Industries
428
The proof of (11.2.33) can be based on the above definitions and inequalities. Going back to (11.2.29 and 30), we have to prove that IlMall < 1. So as to simplify the notation, let us omit the asterisks in (11.2.21) a.ff. and write A'a in place of A: (we have thus deleted the nonredundant variables); recall also (11.2.24). Let us introduce the positive definite IN a I • I Na [ matrix Ra = Fa I .
(11.2.35)
We then introduce the scalar product (x[ Y)R = XTRa Y and norm IlXllRa= (x] X)Ra, -"//2. we omit again the subscripts. If x is a general IN a ] -avector, the hypothesis [[Mall < 1 reads IIM a x ll2 < Ilxlle for any x ~: 0
because the inequality then holds a fortiori for I l x l l - 1 and as the sphere Ilxll = 1 is compact, the supremum is attained at some point of the sphere and is IIMall < 1. The inequality reads x T M T R a M a x < x r R a x for any x r 0 (to be proved).
(11.2.36)
Let us introduce the matrix Fla/2 (of diagonal elements ~/fn where fn are the elements of F a ) thus Rla/2 = (F a1/2) -1, and the substitutions
y
= IK.a
X and B a = A'a F 1/2 = --a
(E/
where E = D a F~/2
(11.2.37)
0
according to (11.2.21); recall that D a thus E is of full row rank rankE = H,
(11.2.38)
by (11.1.20) with (11.1.19). Then XT R a x =
yTy
and
(11.2.39)
x T MVaR a M a x = yT BVa(A,FA,T)-1 na
U T (A,FA,T)-1Ua
y.
Now by (11.2.24) where (having deleted the nonredundant variables) A: stands for A'a A ' F A 'T = A'f Ff A'fT + B a BVa thus
A'FA'T = Z +
/ x~ ) 0
(11.2.40)
0
where Z = A'f Ff A'f"r is H x H positive definite
(11.2.41)
429
Chapter 11 - Dynamic Balancing by (11.1.15), and where X = E E T is H~
x H 1
(11.2.42)
positive definite.
We have
Br (A,FA,T)-1Ba = (E T, 0)(A,FA,T )-1
/El
= E T VE
0
(11.2.43)
where V is defined by the partition
Hi
~/'~
~A~A~ :/v~ w
If we partition the positive definite matrix
Zll Zl2 ]
Z
zT2 z22
we can use the lemma (9.4.25-29) to obtain the partition
z l=
(Xll xl2/ xTz x22
(11.2.44)
giving
(Zll - Z12 Z2~ ZT2 )Xll = 111 (unit matrix) while if the same lemma is applied to the matrix (11.2.40) we have
(Zll + X - Z12 Z21 zT2 )V -- Ill from where
V "1-- Xil + X ;
(11.2.45)
all the three latter matrices are positive definite. Now E being of full row rank H 1 , by (B. 10.31) there exists an matrix S such that
orthogonal
ES = (E*, 0)
(11.2.46)
where E* is
H 1•
H1 regular. Hence
X = E E T = ESS T E T = E* E *T thus
(11.2.47)
430
Material and Energy Balancing in the Process Industries
ET VE = S(ES)T V(ES)ST = S ( E*r 0 VE*
0 ] ST
where E *TVE* = (E *'l V 1 E *'T )-l = (E,-1 xill E*-T + 111 )-1 with unit H 1 • H~ matrix I ~ . Using (11.2.39) with (11.2.43), we finally have the difference
XT R a x - XT M r R a M a x = yTy _ yT E r VEE T VEy = (STy)T(STy) - (STy)T
E*TVE 0
_. ( S T y)T
0 ]2 STy 0
Ill - (E*'I Xill E *'T + Ill) -2 0
122
STy
with unit matrices Ill and 122. Since the matrix E*lXil E *T (say, Q) is positive definite, the difference is positive whatever be x r 0, which is the assertion (11.2.36). [Indeed, as the reader knows or easily verifies the eigenvalues of the above partitioned matrix are 1 and 1-1/(1+q)2 where q is an eigenvalue of Q.] Consequently, by (11.2.29 and 30) we have the limit (say) d* = eso* (I a- M a )-i Mafefo and generally, with Ra-norm
(11.2.48)
II"liRadenoted simply as I1"II
k-1 IId~:ll-< lie:oil + IIMallk IIdo-e:oll + j~o IIMallj IlMafl[ Ilefoll
(11.2.49)
where IlMall < 1.
(11.2.49a)
For great k, or when putting d o = %0 as the systematic error in the initial estimate (equal to that of direct measurement), we obtain
Ildkll-< Ilesoll +
IIMalP IIMafll I1%11
hence by summation 1
Ildkll ~ lie:oil + ~
1-]lMa]l
IIMafll Ilefoll 9
(11.2.50)
Chapter
11 -
Dynamic Balancing
431
What we have proved is, in terms less precise. When reconciling the measured mass flowrates and states of the inventories according to the linear model (constraint) (11.2.11) with constant c (11.2.12), the cumulative effect of the systematic errors remains bounded and will not exceed significantly the range of single systematic errors. The theoretical result is in agreement with what has been found empirically. The method has been successfully tested in practice, while the previously mentioned method failed.
Remarks (i)
It is now easy to compute also the systematic error in the estimated mass flowrates. At given time tk, let xf be the measured subvector in (11.1.21), thus xf --" m~k ; let xf+ be the actually measured value, xft the true value, Xf the estimate. With the partitions A' = (A'f, A'a) and (11.2.1), instead of (11.2.18) we have (11.2.51)
:~f- X~ = X~- X~- Ff A'f T ( A ' F A 'T ) l ( A ' e - A ' a (Sk_l-Sl~_l)) hence with (11.2.19)
E(xf- x~ ) --~ e ~ - Ff A'fT ( A ' F A 'T )-1 A ' e o + Ff A'fT ( A ' F A 'T )~ A 'adk_ 1 .
(11.2.52)
We know already dk_ I " a n analogous upper estimate as in (11.2.50) will show that also the systematic error (11.2.52) will remain bounded.
The reconciliation with constant c in (11.2.11) thus avoids as well a significant cumulative effect of small systematic errors as concerns the estimated mass flowrates. By the way, the effects can be estimated better and the conclusions confirmed by a more detailed calculation. (ii)
Also theoretically.
the
variances
of
the
error
X-Xt can
be
computed
Let us start from the equation (11.2.18). The variances can be computed as diagonal elements of the matrix Gk = E ( ( r k _ dk)(rk_ dk )T) where r k = Sk- Sl~ 9
(11.2.53)
Subtracting (11.2.20) from (11.2.18) we have rk - dk
= es- Fa A~ T ( A ' F A 'T )-1 A ' ~ + F a A~ T ( A ' F A 'T )~ A'~ (rk_~ - dk_~ ) 9
(11.2.54)
432
Material and Energy Balancing in the Process Industries
Here, as in (11.2.19), we have partitioned the error vector e into ef and e~, and ~. is the r a n d o m part of e thus e-e o . Again, for a nonredundant variable s n (t k ) the variance equals 2 (the variance of the m e a s u r e m e n t error), so we can limit ourselves to the redundant q~n variables. By the same consideration as that following after (11.2.21), we can directly restrict the variables to the redundant ones, thus delete formally the columns n e N a (~ N O, set A~ = A 'a , and so on. With (11.2.26 and 27), Eq.(11.2.54) reads
rk- dk = Uk + W~_I
(11.2.55)
where
(11.2.55a)
Uk = e s - M a (~s- Maf(~f
(11.2.55b)
M a (rk.1 - dk_ 1 ) 9
W k _ l -"
N o w Uk is a r a n d o m vector which is a linear combination of the r a n d o m m e a s u r e m e n t errors at time tk. Recursively, Wk.1 is linear combination of error vectors up to time tk_l, hence by hypothesis u k and Wk_1 are (statistically) independent. Consequently T T G k = E(Uk U k ) + E(Wk. 1 Wk_ 1 ) 9
(11.2.56)
Here, by (11.2.1)
(say) Ho = E(uk UkT ) = (la- Ma )Fa (la-
Ma)T + MafFfMTaf
(11.2.57)
is independent of t k . W e thus have the recursion formula G k = H o + M a Gk.l M T .
(11.2.58)
W e have r o = go-S~" for simplicity, let us put So = s~ (initial measured value), thus do = es0 (systematic error), ro-d 0 = eso, and G O=
(11.2.59)
Fa .
By induction, we thus prove k-1
for k >_ 1" Gk = j=Zo M~ Ho (Mr Y + MakFa ( M T )k.
(11.2.60)
F r o m (11.2.26 and 27) follow the identities M T = F a' M a F a thus ( M T Y = F a' M~ F a (j" = 0, 1, ... )
(11.2.60a)
I a - M T = Fa 1 (I~- i a ) F a
(11.2.60b)
FfMTf = Mfa Fa and Fa 1 Maf = MTa Ff 1
(11.2.60c)
where Mfa = Ff Af T ( A ' F A 'T )-1 A,a .
(11.2.61)
C h a p t e r 11 -
DynamicBalancing
433
We thus have k-1 k-1 Gk = j~0 M~ (Ia-Ma)2M~Fa +j~0 M~MafMfaM~Fa + MkaMkaFa k-1
= ~] Fa (M T y (ia_ Ma )T Fa~(ia_ Ma )M~ F j=0
a
k-1
+ E F a (MTay MTfaFf 1Mfa M~ F a j=0 + Fa (MTa)k Fa 1Mak Fa . The n-th variance equals S n G k S T where S n is n-th unit row vector. Let us introduce the column vectors
(11.2.62)
pj = M~ F a S T q = 0, 1, ... ) and the norms [l'llRa and [l'[[Rf where R a = Fa 1 and Rf = Ff 1. Then k-1
k-1
(11.2.63)
SnGk ST =jE=OII(la-Ma)Pjl[~+j__E0 [[MfaPjl[R2f+ [[Pkll~a 9 We have IIpjIRa ~ IMal[j IlFa STIIR~ where [IFa Snv112.= Sn Fa Fa 1Fa San = Sn Fa SnT = '~2n
is the n-th measurement error variance for Sn (tk), independent of t k by hypothesis. Consequently k-1 (0 ~) Sn G k S T ~_ Illa-Mall/j__Z0 IlMall2h;2 n+
k-1
IIMfall2 j__Z~ IIMall2Jx2 + IIMall2k'c2
.
For great k, the last term tends to zero as IIMall < 1. Then, by summation Illa-Mall2 + IIMeall2 Sn Gk ST ~-
1 -IIMall 2
2 'In"
(11.2.64)
IIMfall is the norm of the matrix Men (11.2.61) considered as linear map from Ra-normed space into Rf-normed space. It is seen that the variance remains again bounded and of the 2 order %. Using the formula (11.2.51) and the independence of measurement errors at tk and at times up to tk_~, the terms due to rk.l'dk-1, thus tO Gk-1 (11.2.53) will occur additively in the covariance matrix of if-xf t at tk. An assiduous reader can compute them explicitly. Clearly, also the variances computed for the estimated (integrals of the) mass flowrates will remain bounded and will not increase dramatically.
434
Material and Energy Balancing in the Process Industries
We have thus shown that the variances of errors in the estimates will remain in the range of those obtained hypothetically if at any tk, the preceding states (at tk_l) of the inventories were known precisely (with null variance).
11.3
CONCLUSION
The (apparently simplest) method using the accumulation differences (11.1.8) as measured variables in the balance constraint (11.2.4) fails in practice. It has been shown also theoretically that even small systematic errors in the measured (integrated) mass flowrates cumulate and in the end, can lead to absurd values of the holdups (states of the inventories) computed (estimated) by (11.2.9). Also simple is the method where the (precisely unknown) state Sn (tk_~) of inventory n at time tk_~preceding time tk is replaced by its estimate ~n (tk_~), and only the measured value Sn+(tk) is reconciled at time tk in the daily balancing. Disregarding the error in Sn (tk_~) (and the corresponding probabilistic considerations), the constraint equation (11.2.11) at time tk can be written in the form By + Ax' = 0
(11.3.1)
where X' "-
/ )/ ) mfk
^
Sk-Sk_ 1
X'f
(ll.3.1a)
" ~
X~s
.
Here, m~k (subvector of mn,) represents the measured (integrated) mass flowrates, y = m0k the unmeasured ones, and Sk the states of the inventories at time tk. The vector Sk-1 is formally constant and the measured value of x' thus x '+ is + (say, xf'+ = (mfk)), + + and of composed of the actually measured value of mek x'~+ - S~-~,k_~ where s~ is the actually measured value of Sk; the constant r'k-~ represents the preceding estimate of Sk_l. The covariance matrix of measurement errors in x' used in the reconciliation is F (11.2.1). The matrix (B, A) is the reduced incidence matrix C of the graph G[N, J] as introduced in Chapter 3, with fictitious accumulation streams included, and partitioned according to (11.3.1) as corresponds to unmeasured (y) and measured (x') variables. According to (11.3.1 a), A is further partitioned (11.2.5) A = (C~,
C a)
thus Ax' = C~ x'f
+ C a X~s .
(11.3.2)
We can use an arbitrary reconciliation method. If ~' is the adjusted value
Chapter 11 - Dynamic Balancing
xs A / then
435
(11.3.3)
9 ^~
+
is the estimate of Sk, and xf that of mfk. For example when using the elimination (11.1.14) we have ~' = x '§ F(A'f, A'a )T (A,FA,T)-~ (A'f x'f§ + A'a (s~.- SK-~)) "
(11.3.4)
the reader can check immediately that with (11.3.1a) and (11.3.3), the result is the same as when considering the constraint (11.2.11) with constant c (11.2.12).
The simple reconciliation method has been tested in practice. As also supported by the above theoretical arguments (Section 11.2), a possible cumulative effect of small systematic errors in the measurements up to time tk remains small. The variances of the estimates' (adjusted values') errors have been found theoretically increasing with tk (11.2.63), but not dramatically and tending to a limit for great k.
11.4
RECOMMENDED LITERATURE
More generally, the term 'dynamic balancing' means considering a set of differential equations with continuous time variable and random fluctuations ('process noise') around a deterministic state evolving in time, along with measurement errors. This vast topic exceeds the frame of the book. If the problem is linearized and (by integration over successive intervals of time) reduced to a set of difference equations, the presence of process noise leads to the application of (so-called) Kalman filter technique; see for example Alm~isy (1990). Even if, as above, a series of time-integrated measurements (say, daily balancing) without process noise is considered, the errors in the previous measurements affect the up-to-date results. For a more sophisticated (but less straightforward) method, see then Darouach and Zasadzinski (1991). Alm~isy, G.A. (1990), Principles of dynamic balancing, AIChE J. 36, 1321-1330, with Supplement Darouacti, M. and M. Zasadzinski (1991), Data reconciliation in generalized linear dynamic systems, AIChE J. 37, 193-201
This Page Intentionally Left Blank
437
Chapter 12 MEASUREMENT PLANNING AND OPTIMISATION The analysis of data measured in operating plants is strongly dependent on the measurement planning (measurement design). Measurement design is a multilevel problem, ranging from details of measurement to global measurement strategy. Of these levels, the selection of directly measured quantities is probably the most important. This activity, denoted sometimes also as measurement placement (Stanley and Mah, 1981) plays an important role in the design of instrumentation in new plants as well as in the rationalisation of existing plants, making use of the data obtained from the balancing. It is, however, not easy to decide what is 'optimal' in selecting the measurement placement. In addition, finding the extremum of a (generally nonlinear) objective function is, due to the multidimensionality, a hard task from the standpoint of computation. The methods presented in this chapter can be regarded as 'suboptimal'. They can be applied to industrial-size problems without enormous (or even unrealistic) requirements for the computer time. In Section 12.1, we are dealing with the simpler case of single-component (mass) balancing ; we then refer to Chapter 3 and Appendix A, in particular Section A.5. The general case is dealt with in Section 12.2; see then Chapters 7-10.
12.1
S I N G L E - C O M P O N E N T BALANCING
In this section, we shall confine ourselves to selecting directly measured quantities (thus measuring points) in such a way that a system of uniquely solvable equations for unmeasured quantities is formed (redundant measurements are not present). It has been shown in Section 3.5 of Chapter 3 that unmeasured (i.e. calculated) streams in a one-component balance have to create a spanning tree of the balance flowsheet graph. An exact method of finding an optimum would require comparing all possible variants of such selection. There is, however, generally a great number of such variants (spanning trees); see (3.5.3). Even for medium-size problems, the number can reach billions; see examples in Madron (1992), 5.4.2. The solution can be found in a simple way, if we formulate the objective function as the sum of certain 'costs' associated with individual streams (arcs of the graph). The method is described in more detail in the cited book (Madron 1992), Section 6.3. Here, we shall outline the main ideas.
438
Material and Energy Balancing in the Process Industries
12.1.1 Finding the first solution An arc of a graph is also called edge. An edge-costed graph is a graph having a certain real number (cost) assigned to each of its edges. The graph of a balance scheme can be costed in a number of ways; it is possible to assign to each of the edges the presumed flow rate, standard deviation of measurement or investment needed for executing the measurement. The latter two types of costing are of particular importance for us from the standpoint of optimizing the measurement points selection. Next, we shall introduce the terms minimum and maximum spanning trees. The minimum (maximum) spanning tree of a costed graph is a spanning tree, for which the sum of costs of its edges is the minimum (maximum) one of all the spanning trees of a given graph. Now it is possible to conjecture the connection between the optimisation of selecting the measurement points and the task of finding out the maximum or minimum spanning tree of a graph. When selecting measured quantities so as to ensure the minimum investment needed for the measurement, we shall try to include the quantities with high costs of measurement among the unmeasured ones (by including a quantity among the calculated ones we actually save money needed for carrying out its direct measurement). Obviously the total saving will be maximal if a spanning tree formed by unmeasured streams is maximal (on the assumption that the graph edges are costed by costs of measuring the respective streams). The algorithm for finding the maximum (or minimum) spanning tree is described in Section A.5 of Appendix A; see steps (i)-(iii) in the paragraphs before (A.21), and the simple example at the end of the section. If we arrange the edges in the order of decreasing costs, we have clearly the maximum spanning tree. In the cases of larger graphs with tens or even hundreds of edges, it is necessary to code the above algorithm for a computer. Thus we have covered the selection of measuring points by the method of maximum spanning tree. Individual variants of selecting the unmeasured streams differ according to the costing of the graph. In the following three methods of costing will be presented. Let us denote the costing of the i-th edge 1.
(h~), = li
as
hi : (12.1.1)
where li is the investment cost of measurement of i-th stream, in MU (money unit),
Chapter 12 - Measurement Planning and Optimisation 2.
(hi)2 = Ci
439 (12.1.2)
where Ci are the operating costs of the i-th measurement, in MU per year 3.
(hi)3 = 0.08(hi )l + (hi)2
(12.1.3)
in MU per year. The first method costs the stream by the investment needed for the installation of measurement, the second by operating costs of the measurement, and the third by the total cost of one year of measurement (at eight percent depreciation rate). The maximum spanning tree found by the j-th method of graph costing minimizes the objective function Hj defined by Hj = .~ (h i )j l
j = 1, 2, 3
(12.1.4)
where in the course of summation the index i passes over the number of all the
measured streams. Obviously the objective functions for j = 1, 2, 3 represent the investment, operating and total costs, resp., needed for implementing the measurement system. The information can be completed by mentioning the precision of the measurement system as a whole, expressed as the mean relative standard deviation 8M, defined as n
~iM = (El 52 / n)~/2
(12.1.5)
where ~i is the relative standard deviation of measuring the flow in the i-th stream (in the cases of unmeasured flows, ~i is calculated by the method of propagation of random errors, see Section 9.3), and n is the total number of streams. An example of using the method for single-component balancing is given in Madron (1992), Subsection 6.3.3. For a system containing 16 units and 49 streams, the calculation performed on a WANG 2200 computer took 30 seconds. The optimal selection of measuring points in the case of a single-component balance by the method of finding the maximum spanning tree is applicable even when we are not able to assign costs to streams exactly. Sometimes it is possible to arrange the streams in accordance with our wish to measure them directly. The order in such a series (number one is ascribed to the stream that can be measured in the easiest way) is so-called priority of
440
Material and Energy Balancing in the Process Industries
measuring. If the graph edges are costed by the priorities of the respective streams measuring, the maximum spanning tree represents the selection of unmeasured streams for which the sum of priorities is maximal (those streams we do not want to measure directly are preferentially ranked among the unmeasured ones).
12.1.2
Optimal measurement placement from the standpoint of measurement precision
The hithert0 mentioned variants of measurement are optimal from the point of view of measurement costs (investment or operating costs). An important factor that has been omitted until now is the measurement accuracy. The mean relative standard deviation as defined by (12.1.5) can be rather unfavourable. As illustrated in the cited example, certain relative standard deviations can attain extremely high values, basically due to the propagation of errors. Next we shall try to optimize the selection of measurement points from the viewpoint of minimizing the function (12.1.5). Contrary to the previous cases where the optimized function was a simple linear function of streams costs, it will not be possible to find the optimum by simply finding the maximum spanning tree of the graph. It will be possible to apply this method to find only the first, suboptimum solution which will have to be further improved. A method, based on looking for a better solution in the neighbourhood of the initial spanning tree, has been developed for solving the problem of optimizing the selection of measuring points in a general case. In textbooks on the theory of graphs, the distance between spanning trees is defined. At this point we shall only mention that spanning trees of distance 1 differ from one another by a single edge, the other edges being identical. All the spanning trees of distance 1 from a given spanning tree are found so that we go successively through all the edges of the initial spanning graph, and try to substitute for them those graph edges which are not parts of the spanning tree. Demonstrated in Fig. 12-1 is the initial spanning tree and all the spanning trees of distance 1 from it. In practice, the number of spanning trees of the distance 1 from a given spanning tree may vary from several tens to several thousands.
I::',I I o~ a)
b)
e)
d)
Ion~ I e)
-
0
Fig. 12-1. Spanning trees b) - f) of distance 1 from tree a) .... remaining arcs (absent in tree a))
Chapter 12- Measurement Planning and Optimisation
441
The optimisation method based on spanning trees of distance 1 is as follows. The first step consists in finding out the initial spanning tree, for which the value of the objective function is calculated. Spanning trees of distance 1 are then generated and the values of their objective functions are calculated. When a spanning tree so formed is better than the initial spanning tree, such a spanning tree is now considered the initial spanning tree and the whole procedure is repeated. The search is ended when there is no better solution in distance 1 from a given spanning tree (the spanning tree represents the local optimum). An example is given again in Madron (1992), Subsection 6.3.4. It was possible to improve the measurement precision expressed by the mean relative standard deviation by two orders of magnitude.
12.2
THE GENERAL CASE
The selection of measured variables (measuring points) according to Section 12.1 did not include the possibility of redundant measurements. As shown in Chapter 9, the adjustments due to reconciliation of redundant measured variables can significantly improve the resulting precision. The more general problem is then closely connected with the classification of variables. An unambiguous classification is possible if the model equations are linear; see Chapter 7. Difficulties can arise with nonlinear models; see Chapter 8. Then, precluding so-called 'not well-posed' problems, a pragmatically plausible classification is still possible when the model is linearized; see Subsection 8.5.4. In what follows, we shall confine ourselves to linear (or linearized) models (balance constraints).
12.2.1
Problem statement
Let us consider the set P of quantities (variables) occurring in a given problem. The set consists of two subsets P1 9..
P2 9..
measured quantities (for example by an existing instrumentation in a given plant. If we design completely new instrumentation, P1 is an empty set). as yet unmeasured quantities.
The sets P1 and P2 are disjoint and their union is the set P. Let us limit ourselves to the case when the quantities P are subject to M linear equations (constraints) constituting what is called a general linear model By + Ax + c = 0.
(12.2.1)
442
Material and Energy Balancing in the Process Industries
Here, x is vector of directly measured quantities y is vector of directly unmeasured quantities A, B, c are constant matrices and column vector, respectively. Letus further define two other subsets of the set P P3 "'" quantities whose values have to be known (required quantities) P4 "'" quantities whose values are not required. The latter two subsets are again disjoint and their union is P. We now put the following questions. Are the equations independent and if not, what is the maximal set of independent equations ? 2. Does the system (12.2.1) contain contradictory equations? 3. Are all of the required unmeasured quantities determinable (observable)? If not, which quantities are indeterminable (unobservable)? Which so far unmeasured quantities have to be measured in addition so as to determine all required unmeasured quantities? Which directly measured quantities are just determined and which are redundant and thus adjustable? How can the choice of the additional measurements be optimized? 5. Are there measured quantities and equations present that do not contribute to the determination of the required quantities? How can one find the minimal set of equations that comprises all information concerning the required quantities? 6. How can the overall complex of data processing (reconciliation of redundant data, detection and identification of gross errors, etc.) be organized in an optimum way? This problem statement is an extension of the problem statement due to V~iclavek et al. (1972). Before answering these questions, let us formulate objective functions that will be further used in optimisation of measurement design. 1.
,
12.2.2 Objective functions The simplest is the case of linear objective function. Let us consider the case when we intend to minimize the overall cost of measurement. The objective function F is of the form
Chapter 12 - MeasurementPlanningand Optimisation F= ~ Ci i=1
443
(12.2.2)
where I~ is number of measured quantities and q are costs belonging to i-th measurement. The costs may represent, for example, the investment needed to install new instrumentation, the cost of regular maintenance or the average expenses connected with performance of instrumentation in some time interval. Let us realize that the cost may be zero if the instrument is already installed. Let us note that the objective function is a simple linear function of measurement costs, the coefficients being 0 or 1. In some cases, we try to avoid measurement of some quantities that are not easy to measure. Usually, it is difficult to express measurability quantitatively. Nevertheless, we are often able to order quantities in the sense of increasing measurability. If we now select, using a method described below, certain quantities as unmeasured (therefore computed from the constraints), our goal is to make the selection such that we minimize the objective function (12.2.2) where c i are the ordinals of the not-to-be measured quantities (in number I m ). Indeed, the lower is the sum of these ordinals, the more preferred are the hard-to-measure quantities if qualified as unmeasured. Another point to be respected in measurement design is the precision of results. As an example, consider the objective function representing mean square error of the result F = E~ O"2i / I r i=1
(12.2.3)
w h e r e (Yi is the standard deviation of i-th required quantity (measured directly or calculated) and I~ is the number of required quantities. The squares ~ of standard deviations can be weighted according to their relative importance (for example (~ can be divided by a characteristic value of the corresponding variable xi ). It is important to realize here that the standard deviations ~ themselves are (due to possible reconciliation) complex functions of the selection of directly measured quantities and of their precision (standard deviations). The objective function (12.2.3) is thus strongly nonlinear.
12.2.3 Theory The variables classification of a linear model is expounded in detail in Chapter 7. Here, we shall make use in particular of the method according to Section 7.2, with certain modifications due to the assumed priority of measuring,
444
Material and Energy Balancing in the Process Industries
and to the presence of variables whose values need not be known (nonrequired variables). Concerning the latter points, the additional theory and mathematical proofs are given in Madron and Veverka (1992). Let us add a comment concerning the redundancy. The observability/redundancy classification is (at least for linear models) purely algebraic and has nothing to do with statistics. In practice, the formally nonredundant variables are frequently considered nonadjustable (which means that they are not adjusted during data reconciliation). In other words, changing their values does not improve the statistical criterion used for reconciliation and the measured values remain thus nonadjusted. This often accepted assumption, however, holds true only in the (frequent) case of a diagonal covariance matrix (uncorrelated measurement errors). In that case, the notions of nonredundancy and nonadjustability coincide; but this is not the case when the covariance matrix is not diagonal; see Chapter 9, Remark (iii) to Section 9.2. In this Section, the conclusions concerning observability will be of general character, whereas comments concerning adjustment of measured values (reconciliation) are limited to the most common case of a diagonal covariance matrix of measurement errors.
12.2.4 Solution of the problem Let us now solve the problem stated above systematically. We shall focus our attention on the linear model (12.2.1). First, we set up the extended matrix from the matrices B, A, and vector c occurring in the model (12.2.1), see Fig. 12-2. We assume that the variables (columns of matrices B and A) have been arranged into groups forming submatrices according to whether the values are or are not required. Further, we have separately ordered the columns of both submatrices of B (unmeasured variables) according to their measurability; the relatively easily measurable variables are on the respective right-hand sides. measured
unmeasured required
I nonrequired
required
nonrequired
I I I I
B I I
measurability
Fig. 12-2. Macromatrix formed by matrices B, A, and vector c
constants
Chapter
445
12 - Measurement Planning and Optimisation
To the initial macromatrix arranged in this manner we shall now apply Gauss-Jordan elimination. The procedure is shown in Fig. 12-3.
quantities measured unmeasured required nonrequired nonrequired required
constants
8
4 1 1
2
1
1 1
3
1
1
4
1 1 1
~
~
5
Fig. 12-3. Macromatrix from Fig. 12-2 after Gauss-Jordan elimination (the void fields are zeros, the hatched fields represent arbitrary elements)
The elimination makes first use of the pivots from the submatrix corresponding to unmeasured required values. When possible, in any successive step we use a pivot in the column just following according to the prescribed order (if using an arbitrary one in the submatrix, the columns could be mixed and some easy-to-measure variables would get among the hard-to-measure ones). A permutation of columns of the submatrix is admitted only if there are only zero elements in the subsequent column under the row of the last pivot. Such column is then placed at the end of the submatrix of unmeasured required variables and is replaced by its next fight neighbour. After such elimination, one obtains a unit submatrix in the left upper comer and a general submatrix on its fight-hand side. The submatrices will further be denoted as Z~,~ and Z1,2 as is shown in Fig. 12-3. Below these submatrices are zeros only. The submatrix Z1,2 may also not be present. The elimination succeeds using the pivots from the submatrix of unmeasured nonrequired variables in an analogous way. One thus obtains unit submatrix Z2,3, zero submatrix Zl,3, and general submatrices Zl, 4 and Z2, 4 .
446
Material and Energy Balancing in the Process Industries
Further elimination steps can be followed similarly with pivots from the submatrices corresponding to measured required and measured nonrequired quantities, respectively. Here, we are free in using pivots from the whole respective submatrices because the effect of mixing is irrelevant. The pivoting can be oriented towards improving numerics of elimination algorithm (selecting a pivot with the greatest absolute value) or toward minimizing filling-in of matrices that are generaly sparse. The general format of the macromatrix after all elimination steps is shown in Fig. 12-3. In addition, we try to find certain submatrices (when they exist) as is shown in the following Fig. 12-4. quantities
constants measured
unmeasured
! a b 1 I
a
4
a
-
a b8de
b
I I
B . . . . .
'
V
1/
~
J4f/
/ 1
I
m a .
.
.
.
.
m m ~ .
b
I I
I
1. .
.
.
.
.
.
.
.
I I
--g
I i
. . . . . . 5
9
1
2
4
nonrequired
required
nonrequired
required
I i I
b not easily
easily
i not i easily
1
/
I 1
I
r
iI
//
1 1
1
i i
I
I I I
1
I I I I
easily
measurable
Fig. 12-4. Macromatrix from Fig. 12-3 after formation of zero submatrices
1)
If, in submatrices Zl, 2 and Zl,4, there exist some zero rows simultaneously, the rows are re-ordered to obtain zero submatrices Zla,2 and Z~a,4. We thus modify the initially unit submatrix ZI,1 9We then can re-order the columns in the vertical band 1 to regenerate the unit submatrix.
Chapter 12- Measurement Planning and Optimisation
447
2)
In the submatrix Zlb,4 , we try to find zero columns and form thus submatrix Zlb,4 a .
3)
If there are zero columns in the matrix 23,6, they will form zero submatrix 23,6b.
4)
If there exist simultaneously zero columns in the matrices Z3,8 and 24,8, they will form submatrices Z3,8d~ and Z4,8de (the double index de will be explained below).
5)
If there are zero columns in the submatrix Z1,8d~, they will form submatrix Z1,8d 9
6)
If there exist zero columns simultaneously in the matrices Z1,8 and Z3,8 in addition to vertical band 8d, they will form zero submatrices Z~,8bc and Z3,8bc (see below for the subdivision into b and c).
7)
Finally, by permutations of rows and of columns we try to rearrange the matrix Z4,8abc into the form shown in Fig. 12-4. Here, one has to obey the rule that the right upper zero submatrix can arise only from the columns of the submatrices Z4,8bc ; otherwise, the zero submatrices formed according to point 6) would be destroyed. [A procedure leading to such arrangement (if it exists) is described in Madron and Veverka (1992).]
12.2.5 Results We can now answer the questions posed in the Problem statement subsection 12.2.1.
1)
The equations are dependent if and only if in the macromatrix after elimination (Fig. 12-3), there are zero rows. We have thus eliminated equations that are linear combinations of the others.
2)
The system contains contradictory equations (that cannot be satisfied even if the measured values have been reconciled) just when the subvector 25,9 contains at least one nonzero component. We then have a contradiction of the type 0 = nonzero constant. Such discrepancy has to be made clear and removed.
3)
All required unmeasured quantities are determinable (observable) if and only if after the elimination, the submatrices Zlb,2 and Z~D,4b are absent. In the opposite case, indeterminable (unobservable) required quantities
448
Material and Energy Balancing in the Process Industries
are present; they are just those corresponding to the vertical bands l b and 2. To make all required quantities determinable, certain quantities have to be measured in addition; we choose those corresponding to columns 2 and 4b. This choice is warranted by the fact that we have ordered the quantities according to their measurability; we have thus preferred the more easily measurable ones. Just determined (nonredundant) quantities correspond to columns with zero elements in all rows 3 and 4. They are thus represented by columns 6b and 8de; other measured quantities are redundant (adjustable).
,
The suggested procedure has automatically eliminated all dependent equations. In addition, one can disregard the equations corresponding to the horizontal band 2, which concern only nonrequired unmeasured quantities. Further, the horizontal band 4b contains equations in certain nonrequired measured variables only (columns 7 and 8c); the reconciliation of the corresponding measured values is not necessary, because it does not interfere with the reconciliation of the required measured values and because they are needed only for the computation of nonrequired unmeasured quantities via submatrix Z2.8c. (Observe that this conclusion is based on the assumption that the covariance matrix is diagonal.) Also the equations 4b can thus be eliminated. This done, we can discard the variables corresponding to vertical bands 3, 4a (see point 3) above) and 7b, 8cd. The linear system of constraints reduced in this manner contains all of the information contained in the initial system, regarding the required quantities. The reduced system is in Fig. 12-5. Here, we assume that the necessary additional measurements have been carried out as suggested.
.
1 1
5
7a
6a
8a
8b
6b
8e
2
4b
9
// F
1
/ S" //
1 1
//
/ S" //
1 1
4a unmeasured
//
I
i
redundant
Fig. 12-5. Reduced macromatrix from Fig. 12-4
measured
nonredundant
i
Chapter 12- Measurement Planning and Optimisation
6)
449
The procedure enables one to set up a new system that can be solved in a simple way. Without problems, one can eliminate the dependent equations; it is further necessary to measure certain additional, so far unmeasured quantities. Then, the requirements for the independence of equations and parameters determinability are fulfilled. Further reduction is basically not necessary. If, however, the above described elimination process has been realized completely, further solution is considerably facilitated as shown below.
First, one has to carry out the additional measurements. The quantities will correspond to the vertical bands 2 and 4b. These quantities are then measured nonadjustable; in Fig. 12-5, they are placed at the end of the matrix. The system has been decomposed into two subsystems. The equations corresponding to horizontal bands 3 and 4a contain only measured quantities and are used for the reconciliation of adjustable quantities. It is a reconciliation of directly measured quantities with a set of constraints; see Chapter 9. After the reconcilation is effected, adjusted values are substituted into equations of the horizontal band 1, and the unmeasured values (vertical band 1) are simply computed. In a similar way, also a complex processing of the measured data (propagation of random errors, detection of gross errors, etc.) can be realized; see again Chapter 9, or for example Madron (1992). Measured data inconsistency is analyzed using the equations from bands 3 and 4a only. The remaining equations contain no information in this respect. Let us finally remark that if the covariance matrix of measured values happens to be nondiagonal, the detailed rearrangements of columns 5-8 in Fig. 12-3 to the form in Fig. 12-4 are needless. We then have to use the whole non-reduced submatrix of horizontal bands 3 and 4 for reconciliation.
12.2.6 Example The procedure will be demonstrated by an example of mass balance. In this case, the matrices A and B are reduced incidence matrices of measured and unmeasured streams, respectively; see Chapter 3. Let us consider a system of units according to Fig. 12-6.
450
Material and Energy Balancing in the Process Industries
2 !,- B
m
m
I I
I I m
4
[ 5 non
8
I I I
I ' I
I
i
I
non
i
i i i
I
I
3
7
Fig. 12-6. Example measured,
unmeasured, 'non' means 'nonrequired'
The unmeasured quantities (mass flowrates) are ordered in the sense of increasing measurability, separately as 4, 2, 3 (required) and 8, 5 (nonrequired). Because c - 0 in (12.2.1), it is sufficient to consider the matrix (B, A); see Fig. 12-7.
4
2
3
8
5
6
1
-1
7
11 12
-1 -1 -1
9
1
-1
-1 -1
-1
-1
1
1 1
required
10
1
1
1
1
nonrequired
unmeasured
-1 1
1
required
nonrequired
measured
Fig. 12-7. Matrix of the model
In the elimination, according to the prescribed rule we begin with column 4, followed by 2 (required unmeasured streams); in the subset of nonrequired unmeasured streams, we eliminate in column 8. In the submatrix of measured streams, we eliminate separately for example in columns 6 and 12, and then in 9 (nonrequired); observe that the choice is not unique. After rearrangements, we obtain the matrix in the format of Fig. 12-4; see Fig. 12-8.
Chapter
12 - Measurement Planning and Optimisation 4
2
3
1
8
5
6
451
12
11
9
1
10
-1
1
lb 1 I
2
i
1
I I I
I I
I
1
I I
I
I
+--t--+
4b
I I
I I
I I
I I I
I
I
I
I
!
I
I
I 6a I
Fig. 12-8. Matrix of the model after elimination
In the given case, the rows la, 4a, and columns la, 4a, 6b, 7a, 8bde are absent. We can further delete the rows 2 (equations concerning nonrequired unmeasured quantities only), and the column 8 (vertical band 3) that is zero in the rows lb. Let us further suppose that the covariance matrix of measurement errors is diagonal. Then also the row 4b and the columns 9 and 10 (representing the bands 7b and 8c) can be deleted. In order to determine all the required unmeasured quantities, it is necessary to measure in addition the quantities (mass flowrates) m 3 and m 5 , while the variables m 9 and ml0 need no more be measured. The reduced model (matrices A* and B*) according to Fig. 12-5 is shown in Fig. 12-9. 4
2
6
12
1
7
11
1
',
-1
-11
1
1 1
1
-1
1
-1
9
Y
B*
Fig. 12-9. Reduced model
1
-1
1
I
I
I
~nonredundant I
unmeasured
5
I
I.
redundant
3
measured J
A*
452
Material and Energy Balancing in the Process Industries
The lower submatrix of A* is used for the reconciliation of measured values, and the remaining required quantities (mass flowrates) m4 and m2 are then computed aecording to Chapter 9.
12.2.7 Optimality of the solution Let us limit ourselves, at the beginning, to the linear objective function (12.2.2). The detailed discussion of this case is presented in Madron and Veverka (1992). It is shown there that the solution is the optimum one (i.e. with the minimum value of function (12.2.2)), with the exception that there are some unobservable nonrequired quantities present. In the latter case the optimality of the solution is not warranted, even if the method looks like good heuristics. The solution then does not represent a global optimum, but only a good, feasible solution applicable to solution of practical problems. Much more difficult is the situation in the case of a nonlinear objective function of the type (12.2.3). Numerous case studies have shown that the optimum solution according to the objective function (12.2.2), i.e. optimisation as the cost of the measurement concerns, yields a solution that is unacceptable from the point of view of the precision of results. It means that the solution with minimum costs is, at the same time, the solution with some unmeasured quantities that are theoretically observable, but with unacceptably low precision (for example, the confidence interval wider than the value of the quantity). In this case, the following optimisation method can be recommended. The method is analogous to the direct search in graphs that proved efficient for optimisation of measurement designs in single-component mass balancing; see Subsection 12.1.2. Let us have two measurement designs with the same number of measured quantities. Let us define the distance of these two measurement designs as the number of distinct measured quantities between these two designs. The designs of distance one differ only in one measured quantity (one measured quantity in one design is replaced by one unmeasured quantity in the other design). Optimizing the measurement design with Fig. 12-5 is straightforward. We are supposed to start from a suboptimal base design, found for example by the method described in the preceding paragraphs. All measurement designs of distance one from the base design can be found easily by exchanging quantities (columns) of macromatrix in Fig. 12-5. The quantities from the vertical band lb (see Fig. 12-4) are exchanged with quantities in vertical bands 2 and 4b. The number of all designs of distance one equals the number of nonzero entries in matrices Z~,z and Zl,4b . The objective function is evaluated for all designs of distance one, and the design with the minimum value of the Objective function is exchanged with the base design. The optimisation is continued until a local optimum is found (there is no better design in the distance one of the last design).
Chapter 12- Measurement Planning and Optimisation
453
The proposed optimisation algorithm enables one to find local optimum of a general objective function. The evaluation of objective functions requires only a modest amount of computation (in the essence the multiplication of matrices Z1,2 and Z1,4bby vectors of variances of measured quantities). Even problems of realistic dimensionality can be solved efficiently on personal computers. The algorithm does not guarantee finding of global optimum (at least we have not been successful in proving that). It should be noted that there exists a method of finding the global optimum that is based on enumeration of all possible measurement designs. Let us form a matrix Z c composed of submatrices ZI,~, Z1,2, and Zl,nb 9The number of all possible designs equals the number of all regular matrices that can be formed by selection of columns of the matrix Z c . This task has been already solved during an analysis of electrical networks. The solution (enumeration of all regular submatrices of a matrix) is explained by, for example, Chen (1971, p.365). However, the number of all possible measurement designs (number of all regular submatrices of a matrix) is prohibitive in real problems as this number can reach billions even in modest industrial problems; see the remark in the introducing paragraph to Section 12.1 and recall that finding a spanning tree is equivalent to finding a regular submatrix of the reduced incidence matrix.
12.3
MAIN RESULTS OF CHAPTER 12
The selection of measuring points according to some criterion of optimality requires generally analyzing a great number of variants subject to the only condition that the remaining unmeasured variables are observable. Even for medium-size industrial problems, this number can become prohibitive. The methods suggested in this chapter are more or less based on the intuitive concept of 'priority'. The selection of the measured variables consists in elimination of variables that are 'difficult to measure', with different possible interpretations of the wording 'difficult'. For example most difficult is the measurement when its installment and/or operation costs are greatest. One then eliminates successively the candidates for measuring in the order of decreasing difficulty. In the case of single-component balancing, the selection of unmeasured variables is equivalent to finding a spanning tree of the flowsheet graph; see Section 12.1. The graph is edge-costed and by the algorithm given in Section A.5 of Appendix A, we find the maximum spanning tree: the sum of costs associated with the unmeasured streams is maximum, hence the remaining sum of costs associated with measured streams is minimum. The 'cost' can be replaced by an arbitrary number decreasing with decreasing 'difficulty'. The same idea is applied to more general cases of balance constraints. The (generally) nonlinear model is linearized. We then admit that certain variables are already measured in a given plant, and some other measuring points
454
Material and Energy Balancing in the Process Industries
have to be selected in order to determine the remaing variables; certain values may not be required, hence we confine ourselves to the required ones. See then Section 12.2. By Gauss-Jordan elimination, the linear constraint equations are transformed to a (special version of) the canonical format introduced in Section 7.2 of Chapter 7. Having a priori arranged the unmeasured variables in the order of increasing 'measurability' (decreasing 'difficulty'), a special strategy leads to Figs. 12-4 and finally 12-5. The figures show in particular which variables have to be measured in addition. It can also be shown formally that in the special case analyzed in Section 12.1, the elimination strategy is equivalent to the maximum spanning tree method. More generally, the elimination method gives an optimal selection of the (additional) measuring points if all values are required. With nonrequired values, the method can be regarded at least as a feasible suboptimal heuristics. Generally, the methods remain still suboptimal, being based on an intuitive idea of'measurability', though perhaps quantified by the measurement costs. Another important factor is the precision of the results. Then, an improvement is proposed based on solutions of 'distance one' from the originally found solution, with the aim to decrease the value of the mean square error (12.2.3). See Subsections 12.1.2 and 12.2.7.
12.4
RECOMMENDED LITERATURE
The problem of design of measuring points in chemical engineering literature is not new, though in many previous works the optimisation aspect is not explicitly stated. Measurement placement is closely connected with the problem of quantities classification (redundancy or observability). The classification was developed mainly for use in balancing complex plants in process industries. The methods developed are based on the solvability analysis of sets of balance equations (V~iclavek et al. 1972, Crowe 1989) and on the analysis of structure of balanced system (V~iclavek and Lou~ka 1976, V~iclavek and Vosolsob~ 1981). Systematic research by Mah and his coworkers in this area, poblished in a number of papers, is summarized by Mah in his monograph (Mah 1990), where also a comprehensive survey of the state of the art of classification can be found. Recently, Meyer et al. (1994) published a method of optimizing the measurement of mass flowrates. The method is based on graph analysis and appears as a modification of the costed graph method given in Section 12.1, with the criterion (12.1.4).
Chapter 12- MeasurementPlanningand Optimisation
455
Chen, W.K. (1971), Applied Graph Theory, North Holland, Amsterdam Crowe, C.M. (1989), Observability and redundancy of process data for steady-state reconciliation, Chem. Eng. Sci. 44, 2909-2917 Kretsovalis, A. and R.S.H. Mah (1988), Observability and redundancy classification in generalized process networks: I, Computers Chem. Eng. 12, 671-687 Madron, F. (1992), Process Plant Performance, Measurement and Data Processing for Optimization and Retrofits, Ellis Horwood, Chichester Madron, F. and V. Veverka (1992), Optimal selection of measuring points in complex plants by linear models, AIChE J. 38, 227-236 Mah, R.S.H. (1990), Chemical Process Structures and Information Flows, Butterworths, Boston Mah, R.S.H., G.M. Stanley, and D.M. Downing (1976), Reconciliation and rectification of process flow and inventory data, Ind. Eng. Chem. Process Des. Dev. 15, 175-183 Meyer, M., J.H. Le Lann, B. Koehret, and M. Enjalbert (1994), Optimal selection of sensor location on a complex plant, using a graph oriented approach, Computers Chem. Eng. 18, Suppl., $535-$540 Stanley, G.M. and R.S.H. Mah (1981), Observability and redundancy in process data estimation, Chem. Eng. Sci. 36, 259-272 V~iclavek, V., Z. Bflek, and J. Karasiewicz (1972), Verteilung gemessener und nichtgemessener Strrme in einem komplizierten Bilanzschema, Verfahrenstechnik 6, 415-418 V~iclavek, V. and M. Lourka (1976), Selection of measurements necessary to achieve multicomponent mass balances in chemical plant, Chem. Eng. Sci. 31, 1199-1205 V~iclavek, V. and J. Vosolsob6 (1981), Choice of measured parameters and testing correctness of problem formulation in balancing industrial chemical processes, Computers in Industry 2, 179-188
This Page Intentionally Left Blank
457
Chapter 13 MASS AND UTILITIES BALANCING WITH RECONCILIATION IN LARGE
SYSTEMS
A CASE STUDY
One of the most important areas of balancing is the single-component balancing as a basis for mass and utilities accounting. Results of this kind of balancing are invaluable in good housekeeping in process plants. Typical applications are reporting of flows and inventories monitoring of yields monitoring of specific energy consumption. Important is the connection of the balancing system to the financial accounting system of the company to create a unified information system ranging from raw plant data to balancing in money units. Even if the single-component balancing is the most simple of all balancing tasks (see Chapter 3), the use of this kind of balancing in a harsh industrial environment on a regular basis is not without problems. The purpose of this Chapter is to present the experience with creation and implementation of such a balancing system in process complexes (the system is further on denoted as IBS - Information Balancing System). Besides the discussion about some theoretical aspects, attention will be focused on balancing practice. There are dozens of small practical problems which must be solved to make advanced data processing methods viable in the real life (as the reader probably knows, small problems are always trying to grow to big ones and finally to destroy the whole project). Further on it is supposed that the reader already read Chapters 3, 7 and 9.
13.1
THE PROBLEM STATEMENT
Production complexes in process industries consist usually of several plants which cooperate by exchange of mass streams and utilities. Example of such a system is shown in Fig. 13-1 which represents a typical production complex. Even if the system is significantly simplified to make possible to treat
458
Material and Energy Balancing in the Process Industries
it in this book, it can serve for the illustration of characteristic features of the real situation. T h e "pocket" company (see Fig. 13-1) consists of three plants (subsystems): Crude oil distillation Partial oxidation of atmospheric residuum Power station There is the crude distillation column (node No. 101) with further redistillation of naphtha 102. The tank 103 serves as the storage of light fuel oil LFO which is used also as the fuel in the furnace (included here in the distillation system 101) heating the crude oil. The crude oil is imported from the crude terminal 01, all fractions are shipped to the tank farm 03. There is also further processing of the refinery gas 02. Note that codes of all external nodes not belonging to the balanced system start with zero. The atmospheric residuum serves as a feed for partial oxidation 201 to produce the raw gas which is further processed in the node 202 (the shift reaction of CO to CO2 by reaction with the water). The raw hydrogen is further purified by so-called methanation reaction 203 (reaction of the rest of CO with hydrogen to methane) producing pure hydrogen further used in ammonia synthesis 06. The hydrogen sulphide created in the node 201 is washed out and exported to the Claus plant 07 to be converted to sulphur. Node 200 is the fictitious node with one incoming and one outgoing streams. The need of such a node stems from the fact that there are two instruments measuring the atmospheric residuum, one in the crude distillation plant and the second in the partial oxidation pla~t. This node serves for reconciliation of both measured values. Two of the nodes in this subsystem (201 and 202) represent complex subsystems with some other unmeasured streams connected with the environment which are neglected in the flowsheet. It is the reason why it is not required to write the balance equations around these two nodes. From the balancing point of view, nodes 201 and 202 can be viewed as environment nodes. There is also a "pocket" power station TO which supplies steam and electric energy. In the transformer of electric energy T1 is lost 0.7% of electric energy yielding the heat. The steam header T2 provides steam to nodes 102 and 202, there is also the export of steam from the node 202 back to the steam header. To summarise, besides mass streams, there are two utilities, electric energy and steam. The System is connected to the environment which consists of several environment nodes. The introduction of several environment nodes may look confusing. The reason for that is the need for keeping information about detailed source or destination of streams connecting the system with the
r
aaphtha
~-~ :~1
6
d _..o
!
1
5
~~ I~
q KERO 03 I
I-~1
i!
JGAS I O 7ore 03 I
5
!
(
r~
//Oe
,,~
t.,,~ ~ q~,,,J. r~
/
?
/ / /
J LFO "[ 03
r / / / t
5
o atm.resid. (AR)
[ACCUM.095 ~~ ~~
6
~ ~ "]~:[l_ ~ . ~
~a~ia, I
oxi ~datio.201 n ~'
O
T ~.
CO shift
202
,1~0991
~
methanation
203
~--IAmmonia H[[sYnthesis 06
O measured flow steam
6
I steam 21 -~[header T
steam
'-
'
~te
O unmeasured flow
Powerstation Fig. 13-1. The balancing flowsheat
,D
460
Material and Energy Balancing in the Process Industries
environment. From the balancing point of view used in Chapter 3, all these environment nodes (codes beginning with zero) can be viewed as a single environment node. Around the environment nodes no balance equation is written. It also worthwhile to comment following features of the problem. The single-component balance in such a system means that around every node holds only one balancing (conservation) equation for one of mass, electric energy or steam. From the balancing point of view we do not distinguish among the quality of individual mass streams. We suppose that if the user of such a system needs more information about the product quality (temperature, composition, etc.), he can find it in other process information system or laboratory systems. For this reason we need to keep in the flowsheet the information about the material which represents the specific stream (for example the crude oil, naphtha, etc.). It should be noted that the material of the individual streams does not influence the balancing proper. The only important rule is that the balance around a single node can include only materials which are really mixed (for example, electricity can not be included in a mass balance).
13.2
REQUIREMENTS ON THE INDUSTRIAL BALANCING SYSTEM
Let us now formulate capabilities a balancing system should have. It should be able to process, in an optimum way, the measured balance data and using the data, to set up well-arranged information about mass and energy flows and inventories in the given period. The analysis of the situation in a number of plants has shown that the following problems have to be solved: data collection data pre-processing automatic creation of a system of balance equations classification of variables among redundant or nonredundant (measured) and observable and unobservable (unmeasured) reconciliation of redundant data calculation of unmeasured flows (observable) calculation of confidence intervals for results data validation (detection and identification of gross errors) database facilities presentation of detailed reports (yield tables, comparison with plans, ...).
Data collection Raw data needed for balancing comes seldom from one source. In practice, data present on many places in different forms must be gathered together. Typical sources of data are
C h a p t e r 13 -
Mass and Utilities Balancing with Reconciliation in Large Systems
461
databases of Distributed Control Systems (DCS) plant logistic information systems process records in a "paper" form Laboratory Information Systems. Due to short time which is usually available, data gathering must be well organised, the example of possible data organisation is in Fig. 13-2 (see also Fig. 2-9 in Chapter 2).
DCS
Balancing (accounting) department
Data server
1
Plant 1
Plant 2
Plant 3
Fig. 13-2. Data management in a PC network
Distributed Control System (DCS) communicates with the PC which is connected to the Local Area Network (LAN).The software running on the PC stores process data to the process database on the data server. Data which is not available from DCS enters manually from PCs located in individual plants. There can be also other sources of data (for example Laboratory Information Systems) which are not shown in the Fig. 13-2. After transferring data to the server, data are available to all users connected to the LAN. As many plants are not equipped with a DCS system, part of data must be entered manually. This fact stresses the importance of gross error detection and identification techniques available.
462
Material and Energy Balancing in the Process Industries
Data pre-processing The balance calculation starts from directly measured values. In the sequel, we are mainly interested in mass and energy flows and their inventories. But note that the mass flow measurement system usually comprises not only flowmeters, but also further instruments (in practice, mass flows are very often computed, e.g., using the data of a volume flowmeter along with the density). In general, we speak about pre-processing of data. A special part of pre-processing is so-called compensation of directly measured flows (for pressure, temperature, etc.). Elimination of gross errors - Data Validation The corruption of raw data by gross errors is not an exception, but the rule. Without respecting this fact, all balancing can be characterised as a "garbage in - garbage out" study. In the past, the insufficient protection against gross errors was the major cause of failures when applying balancing information systems with reconciliation in industrial environment. In essence, two kinds of errors can occur. First, there are mistakes in setting-up the balance flowsheet (for example some stream has been omitted), further gross and systematic errors of measurement due to malfunction of instrumentation, mistake of the staff and the like. Balancing proper Balancing means evaluation of mass and energy flows (inputs and outputs) and inventories, in distinct a priori stated periods. The shortest period required in mass and utilities balancing is usually one day. In the process of balancing redundant data are reconciled and observable unmeasured flows are calculated from the balance model. It is further necessary to reckon with creating cumulative balance periods, such as decades, months, possibly longer time periods. Reporting From the results of balancing, further engineering and economic characteristics and survey tables (yields, inventories, specific energy consumption, etc.) are formed. One must suppose that the contents of these tables will have to be changed from time to time, and the user himself should be able to change the contents of the table outputs (their configuration) without intervening into the program proper. Reports can be done either regularly or irregular based on special queries of balancing system users. The quality and user friendliness of reporting software plays a decisive role in the success of the whole balancing system.
Chapter 13 - Mass and Utilities Balancing with Reconciliation in Large Systems 13.3
463
IMPORTANT ATTRIBUTES OF AN INDUSTRIAL BALANCING SYSTEM
Flexibility The structure of the set of manufacturing units and products to be balanced is variable, so that the balancing system should be flexible. As the time goes, the list of raw materials, products, etc., needs modification; new production units are built, interconnections among them are changed. The user of a balance system should have the chance to cope easily with these facts. This holds especially for refinery and petrochemical complexes with variable inter-unit connections changing from day to day (consider for example products which can be shipped variably to many tanks in a tank farm). Classical balancing programs with fixed structure are almost useless in these cases. In contrary to this, the balancing model in IBS described further on is created automatically every day on the basis of real operation of process units and interconnections among them. If, for example, some process unit is not in operation some day, IBS knows about it because no data arrived from this unit in the present balancing time
interval. Distributed and hierarchical architecture The distributed balancing system means that balances of individual subsystems can be set up at individual sites of data input (producing units, plants). This requirement is necessary in order to obtain data free of gross errors. In effect, experience shows that really reliable data can arise only at the lowest level, where the information about instrumentation functioning is available; such information is one of the prerequisites for elimination of gross errors (see Fig. 13-3).
I P, ANTii .
~,
,------ .~
/
',, N Fig. 13-3. Distributed balancing system
X
...
464
Material and Energy Balancing in the Process Industries
The requirement of hierarchicity means that complex balances (of large plants or companies) should be based on lower level balance data sets. Essential is, that the data enter just once and are further easily merged on higher levels and processed by the balance system in the "upward" direction (see Fig. 13-4).
[COMPANY[
[PLANT1]
IPCANT2I [PLANT31 ...........
Fig. 13-4. Hierarchical balancing system
Balancing & simulation In practice, there are many streams which are not measured, for example as being unimportant, occurring only from time to time, or because their importance would not warrant their expensive measurement. Most frequent is the case of off- gases, material and energy losses etc.; here, earlier experience gives one usually an information on their mean flow rates, mainly related to the value of another flow rate (such as the feed into the unit). If considering all such small streams unmeasured, the possibility of computing other, actually important unmeasured streams, would be fairly reduced (we get solution with many unobservable streams). Moreover, even if the calculation of such small streams from the balancing model is theoretically possible (the unmeasured stream is observable), the precision of the result is very often unsatisfactory due to the propagation of errors (we get small values fluctuation around zero). The plausible way of solution of this problem is the combination of balancing with other chemical engineering calculations (simulation). So-called automatically generated streams are calculated as certain functions (e.g., fractions) of so-called reference streams. IBS generates such standard streams (flow rates) automatically when the reference stream is entered. This complementing of direct measurements is the only way of making balancing viable in older plants with insufficient instrumentation. User friendliness Everyday use of the balance system cannot be based (at least at the lowest level) on graduated workers; one has to count upon operators, secretaries and the like. Hence the data input and data processing system should be as simple as possible and user friendly.
Chapter 13 - Mass and Utilities Balancing with Reconciliation in Large @stems
465
Numerical solution
Companies in process industries are becoming larger and larger. Sometimes, one has to reckon with a great number of balance nodes, say more than 1000 with several thousands of streams and inventories daily. Taking into account a routine application of balancing methods, the time required for a solution should be rather in the range of seconds than of minutes or even hours (consider the need of repeated application of the program during elimination of gross errors, where a number of variants is to be evaluated). High precision of reconciled values is required when data are used as input to an accounting system. The implementation of commonly published data processing methods based on classical equations solving to these problems would require minicomputers or mainframes and would be rather time-consuming. It is thus neCessary to dispose methods facilitating a fast solution of such problems on standard PC hardware. Graph-oriented approach used throughout the book represents an efficient method for mass and energy accounting in large systems. Computing time on PCs can be in seconds even for large systems and also memory requirements are moderate.
13.4
B A L A N C I N G ERRORS
Most balancing methods start from the assumption that the balance model (set of balance equations) holds exactly and that the measured values are subject to random errors only, in a range anticipated by the maximum errors of measurement. This is, of course, an idealised situation which can be violated in practice.
13.4.1
Mistakes in the balance flowsheet- topology errors
Under this kind of errors we understand an erroneous interconnection of nodes, such as a missing stream or a wrong stream orientation. It can be a consequence of insufficient information, or also negligence in setting up the scheme; there can exist an unknown stream representing certain losses, or one has neglected a relevant accumulation which must occur in a correct balance scheme as a fictitious stream directed to the environment. Some errors of this kind can be detected before the balancing proper by an analysis of the flowsheet. In what follows we shall assume the convention that nodes belonging to the environment are not shown in the scheme (they are represented by free endpoints of directed streams).
466
Material
and
Energy
Balancing
in the Process
Industries
2
w
r
__,........,..., ................................................h~ .................................................................. :
- ,'il
ss, S
"~
d) Fig. 13-5. Suspicious balance flowsheets measured flow ....... ~
fixed,flow
Fig. 13-5a represents a subsystem with node 2 having an inlet only. So the balance around this node can be satisfied only with zero value of the inlet flow. Clearly, some stream is missing and the question can be answered only by the author of the balance scheme. Such situation is often met when the author did not wish to set up the whole balance scheme, but only that of a part of the system; thus in our case of nodes 1, 3 and 4. In the latter case, one must include node 2 in the environment and delete it from the scheme in Fig, 13-5a. Another suspicious case is so-called loop as represented by stream 2 in Fig. 13-5b. Although theoretically admissible, the existence of a loop is of no use in balancing. If the flow is measured, the value does not influence other values; if not, it will be unobservable. Whereas the two above mentioned cases do not hinder carrying out the balance calculations, an excessive use of fixed quantities (constants not affected by reconciliation) can make the balance problem unsolvable. Fig. 13-5c shows a simple case where all streams connected with a node are fixed. If the values of the flows are chosen independent one from another, the balance equation around this node will probably not be satisfied. The following Fig. 13-5d illustrates the same problem in a slightly more complex form (fixed streams around subsystem formed by two nodes). Not all erroneous schemes can be detected in the manner shown above (for example omitting one stream need not result in an absurd scheme). Further mistakes can be revealed by the analysis of disproportions between balance relations and measured data; see the following subsection.
Chapter 13 - Mass and Utilities Balancing with Reconciliation in Large Systems 13.4.2
467
Analysis of balance inconsistency - balance differences
Under balance inconsistency we understand the measure of how the balance equations are not satisfied with the measured data. In case of singlecomponent balances, frequently used is the notion of balance difference (balance deficit), which is the difference between input and output flows. A balance difference can be due both to a mistake in the balance scheme and to gross error of measurement. As already said, the balance difference r is defined by the relation r = inputs - outputs - accumulation.
(13.1)
If one or more streams connected with a certain node are unmeasured, one proceeds as follows (cf. Subsection 3.2.2 of Chapter 3). In the flowsheet, nodes connected by unmeasured streams are being successively merged. Having merged two nodes connected by some unmeasured stream, all streams connecting these two nodes are deleted in the scheme. Finally, no unmeasured streams are present. Instead of the original nodes, the scheme now contains one or more nodes obtained by merging, and for these nodes one can compute the balance differences according to the relation (13.1). The merging procedure is illustrated by a simple example in Fig. 13-6.
2 1
1 (~ 4
84
5 9
8 9
Ivl~ W"
1 t,7~ 4 .~
5
8 9
6 e)
Fig. 13-6. Elimination of unmeasured streams by merging of nodes measured flow - - --~ unmeasuredflow Having evaluated the balance differences, one has to answer the basic question"
468
Material and Energy Balancing in the Process Industries
Is the balance difference due to random measurement errors only (in the range of maximum measurement errors), or is there a gross error present?
The balance difference is compared with a critical value. If r > Fcrit
(13.2)
one states that the balance around the node is significantly inconsistent, in other words that some gross error is present. How to choose Fcrit for a given node? Most used are two methods - the empirical and the statistical ones. Using the empirical method we determine ourselves, what value of the balance difference will be regarded as admissible, e.g. 10% of the total input and total output average. The empirical method has the drawback that it does not take into account the precision in measuring the flows connected with the node. The mentioned 10% can be an unduly moderate condition if the precision of measurement of any flow is 1%, on the contrary too strict in the case of substantially less precise measurements. The statistical method conceives the computed balance difference as a random quantity which is function of flow measurement precision for streams connected with the node, and which is characterised by the maximum measurement error. In the IBS, the value of Fcritis found using pertinent statistical tables. Another method of gross error detection is computing the generalized least squares criterion Qmin; see Section 9.4.
13.4.3
I d e n t i f i c a t i o n o f the c a u s e of a gross e r r o r
In the preceding subsection, we have shown how the presence of a gross error can be detected by a great value of the balance difference around one or more nodes. We shall now deal with the problem how such disproportion can arise. If one is well familiar with the balance scheme, even the information about a relevant imbalance can suggest also its cause (a missing stream, neglected accumulation due to the start-up and the like). If a simple inspection does not suffice, one has to examine all streams connected with the node where the significant balance difference was found. It is then important to know whether similar problem has not arisen at some neighbouring node. If, for example, one has stated a relevant balance excess at some node and approximately the same deficit at a neighbouring one, it i's probably a stream connecting the two nodes which is subject to a gross error. On the other hand, practical experience shows that a gross error in measuring one stream need not necessarily imply a significant balance difference at both nodes which are
Chapter 13 - Mass and Utilities Balancing with Reconciliation in Large Systems
469
connected by this stream. This can be the case when a relatively small value of the flow is the cause of a significant imbalance for a node with small flow rates, while the error "gets lost" at a neighbouring node connected with a number of high flow rates. Statistical methods for the identification of (the cause of) gross errors are expounded in Section 9.4. These methods which are easy to use are incorporated in the IBS.
13.5
S T R U C T U R E OF T H E B A L A N C I N G SYSTEM IBS
Setting up the balance of the system on the basis of measured data requires, besides the definition of its nodes and their interconnection, also defining other sets (database tables), in particular subsystems materials and kinds of energy units of measurement functions used in primary data pre-processing measurement types forms used in measured data input. If compared with other analogous balancing systems, IBS is characterised by considerable freedom in structure formation. This flexibility of course does not mean a chaos - when defining the structure (configuration of the balance system for a specific problem), the user must obey certain rules described below. Node
A node is the smallest unit to be balanced. Typical representatives of nodes are unit operations and reservoirs. One further often meets with joining or splitting of pipes - the node is then called mixer or splitter, respectively. It is often useless to balance single pieces of equipment, thus a node can consist of several apparatuses or even represent a larger operational unit or a whole plant. Subsystem For better lucidity a set of many nodes is adequately divided into subsets - so-called subsystems. The subsystems usually correspond to manufacturing units of the plant. It is sometimes advantageous to define as subsystems also distributors of different media (cooling water, natural gas, and the like). Material Qualitatively, a stream can be characterised by the name of the medium which flows in it. From the balancing standpoint, the difference between mass
470
Material and Energy Balancing in the Process Industries
and energy flow is irrelevant and we shall thus regard also energies as materials (e.g. heating or cooling media). As individual materials are considered such that considerably differ by their properties. It is not important where the material arises or where it flows to, because such information is stored in another way. Also unimportant are state variables (temperature, pressure) or other qualitative properties (such as density, sulphur content and the like), so far as these properties remain in certain limits.
Units of measurement The units can be intensive (state variables of streams) or extensive (inventories and flows per balance period).
User defined functions Direct measurement of mass flows is still quite rare in practice. In most cases, the mass flow is obtained by computation from primary data with possible compensations (volume flow rates, densities, temperatures, etc.). For this purpose are introduced user defined functions which allow the user easy pre-processing of primary data.
Types of measurement Frequently met in practice are measuring systems characterised by measuring instruments (for example FR501 may mean that Flow rate is Registered on the control panel and its number is 501). In the balancing system, the type of measurement is to be interpreted slightly more generally. Consider for example steam flow measurement by an orifice, requiting in addition to the proper flowmeter also temperature and pressure measurement. In this case, it is not possible to characterise the measurement by a single measuring instrument. We shall further suppose that any type of measurement can be characterised, besides the proper measurement of flow or level, also by several other parameters. In addition, there must be defined also units of primary data measurement and functions for calculation of the balanced quantity on the basis of the flowmeter reading, pressure, temperature and the like. The type of measurement must also comprise information on measurement error, used in reconciliation of redundant data and detection of possible measurement gross errors. FoFm
The form serves for streams' parameters input via a keyboard or from DCS. Usually, the form contains data for a single subsystem (not necessarily). For making the input faster, most (or all) of the inputs for material, nodes and type of measurement are "pre-printed".
Chapter 13 - Mass and Utilities Balancing with Reconciliation in Large Systems
471
Automatically generated streams The automatically generated stream is an unmeasured flow whose value is derived as a function of another, measured stream (so-called reference stream). As soon as data of the reference stream are entered, the program creates automatically generated stream. From this moment, the automatically generated (estimated) streams are viewed as if they were measured (usually with greater "measurement" errors than the other streams). The structure of IBS - Summary To summarise - the structure of the balanced system is defined by lists (database tables) of the above mentioned quantities. The basic building blocks are nodes subsystems materials units of measurement user defined functions which are mutually independent. On a higher level are types of measurement which refer to units of measurement and user defined functions. On the highest level are standard flow rates and forms referring to the all previously defined basic blocks. All the above mentioned building blocks form so-called relational database. The hierarchy of building blocks is depicted in Fig. 13-7.
Forms
Nodes
]
Materials
Fig. 13-7. The hierarchy of building blocks of IBS
Units
Standard flow rates (pre-calculated)
Functions
472 13.6
Material and Energy Balancing in the Process Industries
CONFIGURATION OF THE BALANCING SYSTEM A CASE STUDY
-
Before any balancing can be done, the system (which in the beginning is only the empty database) must be configured which means the filling of database tables shown in Fig. 13-7. Let's configurate the balancing system for the flowsheet in Fig. 13-1. For the case of brevity, only parts of configuration tables will be shown. Subsystems
There are 3 subsystems (plants) which must be introduced. There are only two fields (columns) of the database table, the code and the name of a subsystem Code 1 2 T
Name Crude distillation Partial oxidation Power Plant
Nodes
Nodes are coded in the following way: Code
Name
of n o d e
01 02 03 04
Crude terminal LPG Plant Tank farm 02 p l a n t
Capacity
Dead
0 0 0 0
0 0 0 0
space
? N N N N
The short code and the long name serves for the identification of nodes. The capacity is used only for nodes with possible hold-up (mostly for tanks). The dead space keeps information about the part of the tank which can not be used under normal operation. N in the last columns informs that the node in not a balancing node - there is no conservation equation written around the node. This holds for example for all nodes belonging to the environment. Materials
Besides the name of the material, in the table is also the standard density of the material which can be used by the system if the real (measured) density is not available for some reason
Chapter 1 3
-
Mass and Utilities Balancing with Reconciliation in Large Systems
Name
Density
Atm. r e s i d . CO2 Crude
950 1.97 858
473
Units of measurement The following set of units was introduced: Attribute
Unit 1000m3n oC GWh kg/m3
.
E in the last column stands for the extensive quantity which can be used as the balancing variable, in contrast to intensive quantities which serve as primary data (temperature, etc.).
User defined functions Every function consists of the code and of the description of the function. In the function, besides the individual measured values (denoted on the function as variables sl to s8) also can be other constants characterising the instrumentation (constant A to D). Three examples are Code
User defined
function
sl sl*A sl* (s2- (3. 062-0. 0 0 4 2 8 1 " s 2 + . 0 0 0 0 0 1 7 7 3 * s 2 * s 2 ) * ( s 3 - 2 0 ) ) / i 0 0 0
Let us describe these functions in details. Code "1" Code "2" -
this function only transfers the entered value (in column 1 of the form) to the result. multiplication of entered value by constant "A" defined in the definition of the measurement (see later). This function is used for example when measurement of tank level is recalculated to mass inventory.
474
Material and Energy Balancing in the Process Industries
Code " 3 " -
empirical function used for calculation of mass flow of hydrocarbon mixtures from s l - volume in m 3 s 2 - standard density at 20~ in kg/m 3 s3 - temperature in ~
M e a s u r e m e n t types
Defining of the m e a s u r e m e n t needs the following information" Name Fn
Unit Error s l to s8 AtoD -
name of the measurement the code of the user defined function used in the calculation of the balanced variable from primary data unit of measurement of the measured variable maximum error of the measurement (absolute or relative in per cents) units of measurement of primary variables constants used in user defined functions when calculating the measured variable)
Some Measurement types: Name
~
E1
Umi t
MI. 63
1
2
GWh
V5
3
Error 1%
Sl
S2
S3
GWh
t
2%
mmHg
t
5%
m3
A
0
kg / m3
oC
1.63
0
Note that for better clarity, empty columns $5 to $8 and B,C,D are not presented here. Individual measurements have the following meaning: E1 M1.63 V5
-
-
measurement of electric energy calculation of mass inventory in tank 103 mass flow of hydrocarbon mixtures calculated from the volume flow, standard density and temperature with max. error 5%
Forms
There is one form for every subsystem The part of the form for the Crude distillation is shown below.
Chapter 13 Mass and Utilities Balancing with Reconciliation in Large Systems -
475
Crude distillation" ??
Material
From
To
Measurement
NB BN BN
Crude Electricity S t e a m 1.8 M P a
01 T1 T2
i01 i01 102
V5 E1 M5
o
For example, the first line informs that the Material Crude goes from the Node O1 to the Node 101. The mass flow is calculated according to the Measurement V5 (see table of Measurements). The first column of the form informs about including (or not including) the flow in the balance of nodes incident with the stream. For example, electricity entering Node 101 is not included in the balance of this node (is not present in balance equations) because only mass balance of the crude oil and products is evaluated there. This stream is balanced only in the Node T1 (there is BN in the first column of the second line).
13.7
E X A M P L E S OF B A L A N C I N G P R O P E R
The most important situations that can be met when using IBS will be now illustrated on several examples.
13.7.1
Correct balance - the base case
Measured data with small random errors only are presented in Table 13-1 (for the brevity - primary data are not presented there and only streams from the Crude distillation plant are present). In this case there were no warning messages. The value of Qmi. defined in Chapter 9, Equation (9.4.1) was 9.3 which is lower than the critical value 12.69 (for 6 degrees of freedom and the significance level 95%), so that no gross error is detected. Reconciled values are presented in the last but one column of the table. Note that there were two unmeasured streams of steam in subsystems Partial oxidation and Power plant
476
Material and Energy Balancing in the Process Industries
Table 13-1. T h e list o f s t r e a m s - the b a s e case Streams Line
from
form
1 - Topping
?? M a t e r i a l
From
Unit
To
from
file
Flow/inv.
[31-07-91] Error
measured 1
NB Crude
01
i01
Flow/inv. Unit reconc i ied
9928.4
99.28
9915.4
t
2
BN Electricity
T1
i01
3.6
O. 04
3.6
GWh
3
BN Steam
T2
102
35.2
1.76
35.2
t
4
BN Refinery
i01
02
7.8
0.39
7.8
t
5
BB N a p h t h a
i01
102
2145.9
107.29
2061.0
t
6
BN Kero
i01
03
1355.2
13.55
1355.5
t
7
B N Gas
I01
03
1343.3
13.43
1343.6
t
1.8Mpa gas
oil
8
BB L H O
i01
103
521.7
5.22
522.0
t
9
BB A t m . r e s i d .
i01
104
4718.9
235.94
4625.5
t
i0
BN Heavy
naphtha
102
03
1171.4
11.71
1172.6
t
ii
BN Light
naphtha
102
03
887.7
8.88
888.4
t
12
BN LHO
103
095
502.0
8.15
501.3
t
13
BN LHO
103
I01
45.3
2.26
45.2
t
14
BN LHO
103
03
482.7
4.83
482.5
t
15
BB A t m . r e s i d .
104
200
950.1
9.50
949.7
t
16
BN Atm.resid.
104
03
3579.8
178.99
3675.8
t
There is also information about imbalances around the individual nodes available on the screen, for example
C h a p t e r 13 -
B a l a n c e d node formed by node(s)
I
477
Mass and Utilities Balancing with Reconciliation in Large Systems
J
has input streams1 5 Naphtha
From i01
9
To 102
Sum of inputs-
Flow 2145.9
Error 107.29
t
ii.71 8.88
t t
2145.9
and output streams1 i0 Heavy naphtha 1 ii Light naphtha
102 102
03 03
Sum of outputs:
1171.4 887.7
2059.1
13.7.2 Balancing with a gross error A gross error was introduced to data. The original volume flow of Naphtha from node 101 to 102 was changed from 3082 to 3382 (error approx. 10%). The course of balancing is then following. After checking imbalances the following information window appears on the screen. Significant
imbalance
B a l a n c e d node,
shows suspect Input 1
formed by s i m p l e node(s)-
imbalance!!
streams : 5 Naphtha
I01
102
Sum of inputs: Output streams : 1 i0 Heavy naphtha 1 ii Light naphtha
Sum of outputs :
2354.7
t
2354.7 102 102
03 03
1171.4 887.7
t t
2059.1
It means that significant balance difference (imbalance) was detected in node 102. The imbalance is caused by the gross error of measuring Naphtha flow. It is worthwhile to note that significant imbalance was not detected also in the node 101. This node has much bigger throughput than node 102 so that the gross error is not detected here.
478
Material and Energy Balancing in the Process Industries
After that the program tries to identify the cause of the problem. The standardised adjustments are calculated (see Chapter 9, Equation 9.4.9). The Information about suspect streams appears in the screen. Suspect Form 1 1 1
streams
Line
Material
From
To
5 ii i0
Naphtha Light n a p h t h a Heavy n a p h t h a
101 102 102
102 03 03
Flow/inv. 2354.7 887.7 1171.4
Unit
Stand.adj.
t t t
4.9 4.3 4.3
It means that the stream corrupted by gross error was correctly identified. However, the differences in test values are not significant, so that streams of Light and Heavy naphtha are also suspect.
13.7.3. Some quantities unobservable There is one more unmeasured stream (steam from node T2 to 202) in data (see Fig. 13-1). Remember that the other unmeasured steam flows are from the node TO to T2 and from T2 to 204.Having thus added the former stream to the latter two unmeasured ones, the subgraph of steam flow reads (disregarding the orientation) measured unmeasured
201 102
I ......... TO
T2
204
202
I
i
/I
I
!
I i I
where the nodes TO, 102, 201,202 represent formally 'environment' (no balance of steam set up). According to Chapter 3, the subgraph of unmeasured streams reads
C h a p t e r 13 -
479
Mass and Utilities Balancing with Reconciliation in Large Systems
204
T2
environment
and contains a circuit as drawn. It is also immediately clear that the two streams (flows) in the circuit cannot be uniquely determined from the node T2 balance, while the flow T2-204 can be calculated. Hence, as a result of this change there are two unobservable streams" steam steam
13.7.4
from TO to T2 from T2 to 202
Topology
error - some streams missing
Missing streams can be found as a gross error of measurement described previously in the Subsection 13.7.2. The second way of detecting missing streams is the analysis of topology of the flowsheet. All nodes are checked and suspect are nodes with input or output streams only. Let us suppose that data for subsystem Power plant were not entered (see Fig. 13-1). Node T1 has only output streams. After running balance with these data, the message about topology errors appears on the screen: Topology
Node
errors
T1
has
o u t p u t (s) only-
F. L i n e
??
Material
From
To
1 2
BN BN
Electricity Electricity
T1 T1
I01 201
2 1
Flow/inv. 3.6 25.8
Unit GWh GWh
Also node T2 is affected by missing stream of steam from TO to T2. There is no topology error found (why?) but the significant imbalance is reported. The following message appears therefore on the screen.
480
Material and Energy Balancing in the Process Industries
Balance
differences
Balanced
node,
f o r m e d by s i m p l e
shows
suspect
Input F. 2
streams : Line Material 9 S t e a m 1.8 M P a
S u m of
nodes-
imbalance!! From 201
To 204
inputs:
Flow/inv. 2750.0
Unit t
2750.0
Output streams: 1 3 Steam 2 12 Steam 2 2 Steam
1.8 M P a 1.8 M P a 1.8 M P a
T2 204 T2
102 201 202
S u m of o u t p u t s -
35.2 2055.0 1730.0
t t t
3820.2
All these information help in detection of missing streams and help to complete data.
13.7.5
Topology errors - too many fixed streams
Data has been changed; all streams around node 102 have zero measurement errors (fixed streams). After running balance with these data, the following message appears in the screen. Fixed
streams
Subsystem, 102
has
all
errors
f o r m e d by s i m p l e
. .]
input
and o u t p u t
n o d e (s) 9
streams
L i s t of t h e s e streamsF. L i n e Material 1 5 Naphtha 1 10 Heavy naphtha 1 ii Light naphtha
Note that this error is fatal(reconciliation is impossible).
From i01 102 102
fixed!! To 102 03 03
Flow/inv. 2145.9 117 i. 4 887.7
Unit t t t
balance calculation can't be completed
481
Chapter 13 - Mass and Utilities Balancing with Reconciliation in Large Systems
13.7.6 Reporting
The balancing results presented in the form of Table 13.1 contain full information about the balanced system. In practice, it is inevitable to present data in more user friendly way. Typical example of such user friendly report is the following Table 13.2. Table 13-2. Example of a report - the Yield table Balance
of
crude
Material
column
Flow meas.
Date: Yield %
31-07-91 Flow
reconc.
No. of d a y s : Yield
Target
9915.4
;rude
9928.4
[efinery gas laphtha [ero ~as oil JFO ~tm. resid.
7.8 2145.9 1355.2 1343.3 521.7 4718.9
0.i 21.6 13.6 13.5 5.3 47.5
7.8 2061.0 1355.5 1343.6 522.0 4625.5
0.i 20.8 13.7 13.6 5.3 46.6
10092.8
101.7
9915.4
i00.0
Sum of outputs
1
0.i 21.0 14.0 13.0 5.0 47.0
A typical yield table contains information about all streams incident with the producing unit. It is possible to see the imbalance (+1.7% of the feed). There are presented all measured and reconciled flows in absolute values and in per cents of overall inputs or outputs. Yields can be compared with target values.
13.8
EXPERIENCE WITH COMPANY-WIDE MASS AND UTILITIES BALANCING
Some examples of producing systems where the balancing system with reconciliation IBS described in this chapter is used are presented in Table 13-3. Table 13-3. Typical balanced systems System
Typical No. of nodes
Agrochemicals Petrochemicals Polymers Refinery Utilities distribution
320 1200 1300 1000 330
streams 300 600 500 1800 400
materials 240 600 700 570 50
482
Material and Energy Balancing in the Process Industries
Number of streams and nodes fluctuates according to the operation of the system. It can be surprising that the number of nodes is greater than the number of streams in some cases. It is caused by nodes (mostly environment nodes) which are active only occasionally (imagine for example the set of customers represented by nodes where products are shipped). Some values of flows and inventories are set as "fixed" which means that they are not subjected to reconciliation.
13.8.1 Balancing in operating plants In large systems the data processing is done in two steps. In the first step data are collected in the individual plants and the first reconciliation is done. After checking results, removing possible gross errors and creating balancing reports for individual plants, data are moved to the central database where the second reconciliation takes place. In the second step also inter-plant flows are reconciled (global solution) and remaining gross errors are eliminated if they are present. The two step approach helps the data validation process as the staff in the individual plants has more information about possible causes of gross errors. IBS is usually run on daily basis. Reports (production, inventories, overall refinery yields, etc.) are available in a "paper" form or as ASCII files or database files on the LAN. There are many IBS reports configured covering all important features of the individual producing complexes. Basic reports are generated and distributed by the IBS Administrator, but the reports generation is accessible also by other IBS clients. Final data from IBS are used as input to the company's accounting system. IBS is based fully on PC platform and LAN with NOVELL NetWare. Typical parameters of PC running IBS are 486 processor with 33 MHz. The software takes about 3 MB memory on the hard disk (all data are stored on the data server, data for one day with 1000 streams occupy about 200 kB). Typical reconciliation run with 1000 streams takes about 2 or 3 minutes, depending on how many warning messages and reports are printed on the screen.
13.8.2 Implementation of a company-wide balancing system Implementation of a balancing system with reconciliation represents a serious change in the operation of a process plant. At the beginning, the team is usually set up to solve following problems:
Chapter 1 3
-
Mass and Utilities Balancing with Reconciliation in Large Systems
483
define the scope and targets of balancing define borders of the system and among subsystems create the balancing flowsheet gather the information about instrumentation precision prepare data input and import (manual, DCS, other information systems) propose the organisation of data collection, balancing proper and reporting analyse hardware needs and possibilities. The members of the team should be information technology staff instrumentation engineers control engineers technologists accounting staff (if the balancing results will be used for accounting) vendor of the software. It is advantageous if IBS is incorporated in the company process information system from which it imports primary data. IBS then creates and maintains its own database of raw and reconciled data from which data can be exported to further processing. After that the configuration of the system can begin. The phase of configuration takes usually several months, according to the extent of the balanced system. Finding the best configuration (balancing flowsheet) is not straightforward in all cases, a trial and error solution can not be avoided in some cases. The configuration of the system should be tested on real plant data. During this phase the plant's staff should be trained in using the balancing system. If the system can produce plausible balancing results, the next step is reporting. The efforts connected with this stage can be significant, in some situations this step can be more time demanding than the configuration of the balancing system proper. Target is to provide timely and effective reports about all important balance data for company's staff on different level. Several examples of classification of reports are:
Material and Energy Balancing in the Process Industries
484
Reports for different "levels" of users Report 1 Report 2 \
j
Level 1
Report 3 ~ Report 4 ~ ~
Level 2
Report 5 Report 6
~
Level 3
I
Report 7 /
day regular ~
week month .......
Frequency of reporting
occasional
Subject of reporting basic flows and inventories (production, stock of raw materials, products, etc.) detailed balances of key units (yield tables, specific consumption of utilities, etc.) special reports (emissions, flare, fuel consumption .... ) -
-
-
Reports can be created by user itself balancing system administrator -
-
Reports can be distributed in the form of "paper" report ASCII file available on PC network DBF file spreadsheet file a window into a database -
-
Chapter 13 - Mass and Utilities Balancing with Reconciliation in Large Systems
485
screens showing data on flowsheets in a graphical form screens showing trends of variables in time All "non-paper" forms should be easily viewed or printed via the PC network. The last step in implementing the balancing system is the integration of the balancing system into the overall company information system. It is supposed that this problem was not neglected in the preparation of the whole project. The interfacing of the balancing system with primary data is already done. The interfacing of the balancing system on the other side (for example with the accounting system) can be solved either by exporting data in the form of files, or by direct linking of information systems. 13.9
CONCLUSIONS
The implementation of the balancing system with reconciliation changes the information flows in the company significantly. After the transition period when many problems had to be overcome, the following items are appreciated by IBS users: there is only one set of balance data for the whole company reconciled values are adjusted on the basis of the sound statistical basis, the subjective decisions are eliminated fast access of plant staff and management to daily and long-term plant balancing data data are of better quality than before and the information is extracted in better form easy monitoring of yields and consumption of energy help in maintenance of instrumentation on the basis of gross errors detection easy setting up of long term balances which were very tedious recently possibility of exporting data to text editors, spreadsheets and other software for further processing using data as the basis for planning and Linear Programming (LP) Especially important is the relation of reconciliation to instrumentation maintenance and improvement (gross errors identification). If the feedback to instrumentation staff is not established, one of major advantages of reconciliation is lost. The success of data reconciliation in everyday plant's life requires several prerequisites. The plant staff must be able to manage the software and interpret results properly. A system of continuing education is essential unless more harm than good will be done. The company management must support good house-keeping efforts where data reconciliation plays important role.
This Page Intentionally Left Blank
487
Appendix A GRAPH THEORY A.1
BASIC C O N C E P T S Intuitively, a graph is a set of arcs whose endpoints are the nodes of the
graph. /'/3 no
n2
J~
I'/1
Fig. A-1. A graph
We say node n is incident with arc j (or conversely) when n is one of the endpoints of j . By convention, we shall not consider the case when the two endpoints of an arc coincide (so-called self-loop); as will be seen in Chapter 3, such arcs play no role in balancing problems. Hence any arc has precisely two distinct endpoints, thus n~ and n2 for arc Jl above. But in certain applications, it is useful to consider the case when some node is not incident with any arc (node no in Fig. A-l); such node is called isolated. On the other hand, we admit the possibility that more than one arc are incident with the same couple of endpoints (as arcs J3 and J5 in Fig. A-1). Such arcs are called parallel (multiple). A simple graph contains no multiple arcs. The intuitive concept of a graph is thus that of a figure such as in Fig. A-1. Drawing a graph with, say, several hundreds of arcs is annoying and intuition fails if the properties of the graph have to be analyzed. In applications to technological systems, a graph represents a part of the information we have on the system. The nodes may represent certain production units and (disregarding for the moment the direction) the arcs represent certain well-defined streams between certain nodes. The information can be written formally as a list of entries
488
j ~ J:
Material and Energy Balancing in the Process Industries
arc j:
endpoints n' and n"
(list L1 )
where the set of arcs is J and the whole set of nodes is N. By different graph operations, we can arrive at a graph with isolated nodes ; so the list is completed by the set N O( c N ) of isolated nodes. Observe that a node can be incident with several arcs. Altematively, the information can be written in the form of the list
n ~ N:
incident with arcs j', j",
node n:
(list L 2 )
where the set of incident arcs is empty if n ~ No. Taking some n ~ N and going through the first list, we write down those arcs where n occurs; we thus have the second list. Taking some j ~ J and going through the second list, we write down the nodes incident with j; they must be just two for any j and we thus obtain list LI, along with set N Oby L 2 . Thus according to Fig. A-l, List L~ reads arc
endpoints
Jl
" J2 :
/'/1 ~ /'/2 r/2 ' rt3
J3 :
/'/3 ~ I'/4
J4 ~
n2 ~ /'/4
J5 :
1"/3 ' n4
with N o = {n o } (one-element set of isolated nodes). List L 2 reads node
incident with arcs
no :
O
nl :
Jl
n2" n3" n4"
Jl, J2, J3,
J2, J3, J4,
J4
J5 J5
Appendix A -
Graph Theory
489
In formal mathematical language, any of the lists determines the incidence relation for the graph: arc j and node n are incident/nonincident. The relation can be written on assigning to each couple (n, j) (n ~ N, j ~ J) either 1 (incident) or 0 (nonincident). So the set of nodes (N), the set of arcs (J), and the incidence relation determine the graph (say) G. Any of the lists represents an economic way of storing graph G in the memory of a computer. A number of problems of the graph theory can be solved using only the above definition of G. In balance schemes that are the matter of our interest, we assign in addition a direction (orientation) to any arc j. With the intuitive concept, an arc thus becomes an arrow in Fig. A-l; for example n3
o n~
J2 n2
nl
Fig. A-2. Oriented graph
so arc (stream) j~ goes from n~ to n 2. In List L~, the information can be completed by assigning a given order to the endpoints. We thus have j:
(n', n")
with ordered couple (n', n") according to the direction; thus Jl: (nl, n2 ) in Fig. A-2. In List L 2 , w e can assign to any j incident with n either +1: j goes into n, or - l : j goes from n. Thus for example, with Fig. A-2 /'Z2 :
j, (+l), J2 (+1), J4 (-1) .
We thus obtain a directed (oriented) graph. The oriented incidence relation can be written on assigning to each couple (n, j) (n ~ N, j ~ J) either-1 (j goes from n), or +1 (j goes into n), or again 0 (nonincident). So the oriented graph is determined by set N, set J, and the oriented incidence relation. Let us remark in this context that given any (non-oriented) graph, it can be made oriented by an (arbitrary) convention. It is sufficient to assign an order
490
Material and Energy Balancing in the Process Industries
to any couple n' and n" in the list L~. Certain graph properties, although independent of the orientation, can be convenientlyexamined using an orientation of the arcs. Let us thus consider an oriented graph G that is not a set of isolated nodes only. If the elements of the sets N (nodes) and J (arcs) are, respectively, written in an arbitrary given order, the oriented incidence relation takes the form of a matrix, say A. From the possible two conventions let us adopt that one where the rows are n ~ N and the columns j ~ J; the element (n, j) takes one of the values -1, +1, or 0. For example with Fig. A-2 we obtain no
-1 A
1
nl
1 -1
J,
J2
-1 -1
n2
1
n3 n4
1
1
-1
J3
J4
J5
where the void fields are zeros. The matrix A is the incidence matrix of the oriented graph G. It contains the full information on the graph. List L 1 is represented by the columns, list L 2 by the rows. The information is less condensed; matrix A is sparse (with many zeros) and its use in the description of large systems is nowadays rather obsolete. Nevertheless, the concept is useful in particular in the algebraic analysis of balance systems. Irrespective of how the information is actually stored, it can be always considered as represented by matrix A. The matrix has the following obvious properties. (i)
In any column there are precisely two nonnull elements, one +1 and the other -1
(ii)
The number of nonnull elements in any row is arbitrary; a zero row represents an isolated node.
Conversely any matrix having the property (i) represents an oriented graph, if the rows are interpreted as nodes and the columns as arcs. We thus can, for instance, restrict the matrix to a subset J' of columns; we thus obtain a subgraph of G (see below). Restricting matrix A to a subset of rows is, however, meaningful only if the corresponding submatrix preserves the property (i). It follows from property (i) that the summation of rows over set N yields zero row. Thus conversely, deleting one (arbitrary) row in matrix A the remaining rows still contain the whole information: the deleted row equals minus
Appendix A - Graph Theory
491
the sum of the remaining ones. The matrix (say) A~d obtained in this manner is called reduced incidence matrix; so as to determine a graph by Ared one has in addition to specify the deleted node. The matrix has the following property (i')
In any column there is either one nonnull element (-1 or +1), or two nonnull elements (one + 1, the other - 1).
Conversely any matrix having the property (i') can be completed to the incidence matrix of a graph as shown. The additional node is incident with the arcs-columns having only one nonnull element in A~ed; it can also happen that it is an isolated node. Reduced incidence matrices occur in balance calculations (see Chapter 3). To avoid misinterpretation, we sometimes call the matrix A above the full incidence matrix of graph G.
A.2
SUBGRAPHS AND CONNECTEDNESS, CIRCUITS AND TREES
A.2.1
Subgraphs and connected components
Given two graphs G (nodes N, arcs J) and G' (nodes N', arcs J') we say G' is subgraph of G if N ' c N, J ' c J, and if the incidence relation on G' coincides with that induced by G; if the graphs are oriented then also the orientations coincide. So nodes n 2 , n 3 , n 4 and arcs J2, J3, J4 in Fig. A-2 form a subgraph. Not any subsets N' of N and J' of J determine a subgraph; some endpoint of some j ~ J' may not lie in N'. A subgraph G' of G is uniquely determined when giving (i)
a subset J ' c J
that determines already the set of endpoints of j e J', and possibly in addition (ii)
the set of isolated nodes of G'.
In particular restricting the arcs of G to a subset J ' c J and leaving N' = N we obtain a factor (subgraph) of G; if we take J' = ~ then G' is a set of isolated nodes n (~ N' = N). More generally, it can happen that some node n ~ N' (= N) is not endpoint of any j ~ J'; such node is then isolated in G'. For example deleting arc j~ in Fig. A-1 leaves node n~ isolated in the factor subgraph. The further concepts introduced in this Section are independent of orientation. Let us begin with the notion of a path. From the possible formal definitions, let us adopt the simplest. We call path in graph G a sequence of nodes (n~, ..., nK ) such that n k is endpoint of some arc with the other endpoint
492
Material and Energy Balancing in the Process Industries
nk+~ (1 < k < K-1). The nodes n~ and nK are the endpoints of the path and we say the path connects the nodes n~ and nK. So (n~, n2, n3, n 4 ) or also (n~, n 2 , n4, n3 ) in Fig. A-1 are paths; the sequence (n~, n 3 , n4 ) is not a path, nor the sequence (n 2 , n 4 , n~ ) in this order. The example also shows that by this definition, the arcs may not be uniquely determined (see arcs J3 and J5 ), we only require that they exist in G. [The determination is unique if G is simple. If the graph is not simple, many authors also specify the arcs of the path; we have adopted a simpler definition by the nodes only.] We also see that having two nodes in G, there may be different paths connecting the two nodes; see (n~, n2, n3, n 4 ) or also (F/l' /'/2' n4) in Fig. A-1. We say graph G is connected when any two different nodes can be connected by some path in G; that means, having two different nodes n' and n" there exists some path with endpoints n' and n". It can happen that the graph is reduced to one isolated node; then there are no two different nodes in the graph and the graph is connected by definition. For example the graph in Fig. A-1 is not connected; the subgraph formed by the isolated node n o is connected, and the nodes n~, ..., n4 and arcs j~, ..., J5 form also a connected graph. So as to verify the connectedness of a graph, it is sufficient to select one (arbitrary) node n; if for any other node n' (~: n) there exists a path of endpoints n and n' then the graph is connected. Let us have a graph G of node set N and arc set J. A subgraph G' of G is called a (connected) component of G if and only if it has the following properties. (i)
G' is connected
(ii)
The only connected subgraph of G containing G' is G'itself;
here, ~G" contains G'~ means that G' is subgraph of G". Clearly, if G is connected then it is its own (unique) connected component. If G contains some isolated node then this node is a connected component of G; see Fig. A-1. If a node n~ of G is not isolated, we can find all nodes n of G that are connected by some path with n~, and all arcs of G incident to these nodes; we thus have one connected component (say) G~. If some node n 2 remains, we continue in the same manner. Finally, we obtain the decomposition of G into connected components (the isolated nodes included). Formally, we have the
Graph Decomposition Theorem Let G be a graph of node set N and arc set J. Then there exists a unique number K > 1, a unique partition (disjoint union of parts) of the set N into nonempty subsets N k (1 < k < K), and a unique partition of the set J into subsets
493
Appendix A - Graph Theory
Jk (1 < k < K) such that N k and Jk are the respective node set and arc set of connected component G k o f G. Thus G is uniquely decomposed into K connected
components G k . I f G k is an isolated node then N k is a one-element set and Jk -- 0 . The uniqueness follows from the decomposition of the node set into classes of equivalence: nodes n' and n" are in the same class if and only if either n' = n" or there exists a path connecting n' and n".
The decomposition can be visualized by the following figure Jk :r Q~
II I
I
I
I I I I I I I
1I
Nk {
"'"""-,........,.. "'"'"'.......,..o., ""~
isolated {
nodes
Fig. A-3. Decomposition of node and arc sets
where the void fields mean nonincidence. (Imagine the incidence matrix.) Any field N k x Jk represents a connected component, no arc is incident with any of the isolated nodes, and arcs j E Jk (~O) can be incident only with nodes n E Nk; a path in G is whole contained in some N k where Jk ~ 0 . The fields N k x Jk have the property that no finer such subdivision is possible.
A.2.2
C o n n e c t e d graphs, circuits, trees
When analyzing a graph, the first step is clearly its decomposition into connected components. This done, we can focus our attention upon the properties of connected graphs. For convenience, let us designate I SI the number of
Material and Energy Balancing in the Process Industries
494
elements of set S. For a connected graph G of nodes n ~ N and arcs j ~ J we have the well-known inequality
IJI ~ I N I - 1 (hence generally
(A.1)
I JI ~ I NI
-
K where K is the number of connected
components.) The inequality can be proved by induction starting from I N[ = 2 and going from
INI to INI + 1, The information that graph G is of node set N and arc set J is written briefly as G [N, J]. Observe that J :r O implies I NI > 2. Let us have some G [N, J] where J :r O. A subset C c J is called a circuit in G when it has the following properties. (i)
The set can be arranged in a sequence (j~, ..., JH ) of two-by-two distinct arcs (thus H = I C I ) in the manner that Jh (1 < h < H) is of endpoints n h and nh+~ (thus the corresponding sequence of nodes n h is a path), and
(ii)
nH+l = n l .
(A.2)
Let N c be the set of nodes nh; we do not require that the nodes n~, ..., n n are two-by-two distinct, hence we have only the inequality IN c I < I C I . The order of the arcs in (i) is not necessarily unique. Imagine a circuit like
Fig. A-4. A (nonsimple) circuit
A simple circuit is such circuit C that IN c I = I CI (thus the nodes n,, .-., n n are two-by-two distinct). In any circuit we can find a simple circuit, and in fact Any circuit is disjoint union of simple circuits.
Appendix A - Graph Theory
495
The idea of the proof is straightforward. Starting from node n~ and going through the sequence, if the path returns to some n 2 (~: n I ) we separate the circuit going from n 2 back to n2, and so on; finally, we have a decomposition into simple circuits.
The decomposition is not necessarily unique; imagine
s
or I l
"O
i II
l I
I
I
~
J
",O, S
Fig. A-5. Decomposition of a circuit
Recall that the circuit is defined as a set of arcs having the above properties. The node set N c is not partitioned by the above decomposition. But clearly, the sets N c and C form a connected subgraph of G. A special case of a connected graph is a tree. It can be defined as follows. A connected graph G [N, J] is a tree if and only if the set J contains no circuit.
An equivalent definition reads. A connected graph G [N, J] is a tree if and only if deleting any one arc j ~ J disconnects the graph. This means that if J' is an arbitrary subset of J such that I J'l = I J[ - 1 then the subgraph G'[N, J'] has (at least) two connected components (and in fact, just two). The idea of the proof is again straightforward. On the one hand, one would find a circuit in G if some G' [N,J'] were connected. On the other hand, if no G' [N, J'] is connected then G [N, J] cannot contain a circuit C because the deletion of an arc of C would leave this G'[N, J'] connected; hence G [N, J] is a tree.
Material and Energy Balancing in the Process Industries
496
A u s e f u l criterion reads A c o n n e c t e d graph G [N, J] is a tree if and only if Clearly, if I JI = I NI - 1 then of C would leave the G'[N, J'] contradiction with (A.1). The I NI - 2 and going from I NI
I JI - I NI
-
1.
(A.3)
G cannot contain a circuit C because the deletion of an arc above connected and one would have ]J'] - I NI - 2 in converse assertion is proved by induction starting from
to I NI § 1,
If in p a r t i c u l a r I N I = 1 (isolated n o d e ) w e h a v e J = ~ and the e q u a l i t y (A.3) h o l d s true. R e c a l l that w e have, by c o n v e n t i o n , i n c l u d e d isolated n o d e s in the class o f c o n n e c t e d graphs. B y the s a m e c o n v e n t i o n (definition), any isolated node
is a tree. L e t us call nontrivial the trees that are not isolated n o d e s . Let G [N, J] be a tree and let I NI ~ 2. Then f o r arbitrary two nodes n' and n" (n'r n") there exists a u n i q u e sequence (j~ , ... , Jn ) o f two-by-two distinct arcs in the manner that Jh (1 j. Now to any such j' corresponds uniquely such j. The number of arcs j' of T' that are not arcs of T equals precisely the number of arcs of T that are not arcs of T'. Hence the sum (A.14)
xq=
j6 JT
_
1 , A2 n 2 : 1 and A m n 2 - " 0 for m > 2 , ... , A KnK " - 1 and A mnK ---- 0 for m > K . Thus in the remaining (M-K) equations (the first, ..., K-th excepted), the coefficients at Xn,, "'" , XnK equal zero. We finally arrive at such K that either K = M (no equation remains) or K < M but all the remaining (M-K) equations have zero coefficients at all Xn. The procedure stops. For a better visualisation, let us arrange the variables in the order Xnl , "" , XnK , and the remaining ones. Then the equations read 9
nK
9
nK+ 1 ... n N 9
Xn I
+ A ~ln:n2 q" "'"
+a
Xn 2 - I - " ' "
XnK
+
...
1
=0
+a2
-0
+a
=0
K a'
K+I
~- 0
,
empty if K = M a M =0.
(B.7.2)
This is (a slightly modified version of) the famous Gauss elimination. The solvability analysis that follows is well-known; for example if some am ~ 0 for m > K then the equations are not solvable. If the original a~, ..., aM equal zero (a homogeneous system of equations), they remain such by the operations, hence also a~ = --. = aM = 0 and the equations are solvable, at least by x~ = ... = XN = 0. Clearly, K < N. On the other hand if N > M then after Xn~ follow necessarily certain Xn~.,, "'" , Xn~ as K < M; if al = "'" = aM = 0 then setting for example Xn~§ = 1, the system remains solvable in the other unknown variables, hence if M < N then the homogeneous system has always some nontrivial solution (some 9
Xn ~ 0).
Material and Energy Balancing in the Process Industries
540
The Gauss-Jordan elimination proceeds further in the m a n n e r that A'lnztimes the second equation is subtracted from the first one, giving zero at Xn2, with the other coefficients (say) A';n, then A~n3-times the third equation is subtracted from the second one and A';n3-times from the first one, and so on. Finally, the equations read Xn I Xn 2
+ AInK+IXnK+I
"1" "'"
+
+
A2nK+IXnK+I
"~" al
"'" +
a 2
- 0 -
0
9 , , , , ,
Xn K
+ AKnK§247
+ "'" + a K
= 0
aK+1 -- 0
aM
-- 0
(B.7.3)
giving directly x ~ , Xn2 , ~ " , XnK as functions of the remaining XnK+I , "'" , XnN (if K < N), and of al, "" , aK, provided that either K - M or ai~+l . . . . . aM = 0. Our goal is now, however, to translate the result into the language of vectors and matrices. W e introduce matrix A of elements A m n and vector a of c o m p o n e n t s a m . Then the equations (B.7.1) read Ax + a = 0 .
(B.7.4)
Set a = 0. Let us consider the system (B.7.3), having the same set of solutions, always n o n e m p t y because a - 0. Writing the variables (components of x) in the original order the equivalent equation reads A*x = 0 .
(B.7.5)
T h e set of solutions is KerA-
KerA*
.
(B.7.6)
We have put a = 0. Taking arbitrary values of the components X n K + l , "~ , Xnr~ in (B.7.3), the components Xn, "", Xn~are uniquely determined by the equations, hence the vector-solution x of (B.7.5) is determined. Let vj (j = 1, ... , N-K) be the solution obtained on setting XnK+j: 1 and the other XnK+i "- 0. Any solution x then equals X "- XnK+l V 1 4" "'" q- XnN VN_ K
(B.7.7)
hence the vectors vj generate the space KerA = KerA*. The vectors vj are linearly independent. Indeed, if we have, for some coefficients k~
Appendix B - Vectors and Matrices
541
N-K
(say) v =
E
k i v i -- 0
i=1
then, because the nK+;th component of vj equals 1 and the nK+;th component of vi (i ~: j) equals zero by the construction, and because the nK+.i-th component of v equals zero we have kj = 0 9 the conclusion holds for each j = 1, ... , K, from where the linear independence. This kind of reasoning is quite common. Imagine for example three vectors
1
0
0
0
1
0
0
0
1
they are linearly independent. Consequently, the N - K vectors vj (j = 1, 9. - , N-K) constitute a basis of KerA, hence d i m K e r A = N - K , and rankA = K
(B.7.8)
according to (B.6.17). The general theory o f vector spaces applies as well to r o w vectors. So the rows of a matrix, say again A [M, N], with m-th row (Aml, "" , AmN ), are again elements of N-dimensional space, say V*. So they generate a vector subspace, say A*, of V*; it is the space of all linear combinations of the rows,
thus a general vector of A* is
v* =
M Z Pm @~m m=[
(B.7.9)
where we have denoted the m-th row vector (representation of linear form) by @[m - -
(Aml, "'" , AmN )
(B.7.10)
and where Pm are arbitrary real numbers. Of course it is only another convention for arranging the vector components. The dimension dimA* of A* will be, for a m o m e n t , called the row rank of matrix A . We now easily conclude that replacing s o m e o[ m by ko~m (k ~: 0), or by a sum where am. is another row vector (or, of course, changing the order) leaves the space A* invariant; the new row vectors generate the same space. Now recalling the elementary operations leading finally to the equation (B.7.3) thus (with a = 0) to (B.7.5), we see that also matrix A* generates A*. But repeating the reasoning after formula (B.7.7) @[m + O[m'
542
Material and Energy Balancing in the Process Industries
and considering now the rows of A* as they occur (with re-arranged variables) in (B.7 3), we conclude that the space A* is generated by K linearly independent rows of A* (M-K rows being zero). Hence the row rank
dimA* = K
(B.7.11)
equals rankA by (B.7.8). It is also the maximum number of linearly independent rows (row vectors) of matrix A (which also generate A*). On the other hand, consider the columns (column vectors), say al, .-., aN of A; so Aln
n=
1,...,N:
RM .
an -
(B.7.12)
AMn
Again for a moment, let the column rank of A be the dimension of the space generated by the a n , thus the maximum number of linearly independent columns (column vectors) of matrix A . But this space is just ImA; indeed, a general element y of ImA reads r
N ]~ AlnX n n=l
y=Ax=
=
N ]~ Xn a n n=l
(B.7.13)
N ]~ AMnXn n=l
by (B.6.11) and according to the axioms of vector space. Consequently, rankA = dimlmA equals the column rank. We thus have the following theorem.
For an arbitrary M x N matrix A, rankA (= dimImA)further equals (i)
its row rank, thus the dimension of the space generated by the rows of A, thus the maximum number of linearly independent rows
(ii)
its column rank, thus the dimension of the space generated by the columns of A, thus the maximum number of linearly independent columns
Appendix B (iii)
543
Vectors and Matrices
the number of nonzero rows obtained after Gauss (or Gauss-Jordan) elimination.
In the latter case, the elimination represents the same sequence of operations as above, omitting simply the variables (unknowns) in the rectangular scheme (B.7.1). The equivalent matrix A* corresponding to the rectangular scheme (B.7.3) (or that corresponding to (B.7.2)) is obtained by re-arranging the variables (thus the columns) in the original order. Note that the latter matrix is generally not unique; one has generally several possibilities of selecting successively Xn,, Xn2 etc. Only the set of solutions of the linear equations is left invariant.
B.8
MATRIX OPERATIONS Let us begin with the transposition, for example All A21
A
All A12 A13
/~_ ~ A x -
A12 A22
A21 A22 A23
A13 A23 thus n-th column becomes n-th row, and m-th row becomes m-th column. Formally, if A is M x N matrix of elements A m n then its transpose is N • M matrix A T of elements AVnrn = Am n (n = 1, ... , N; m -
1, ... , M) .
(B.8.1)
Then rankA v = rankA
(B.8.2)
as follows immediately from the theorem in Section B.7; by transposition, columns become rows and the rank remains invariant. In particular if x is a column vector then x T is a row vector, and if ct is a row vector then ctT is a column vector; thus X1
(B.8.3)
(X 1 ~ ... ~ XN)T XN
The former notation is frequently used for saving space in a paper.
544
Material and Energy Balancing in the Process Industries
The Gauss (or Gauss-Jordan) elimination can be applied as well to matrix A T. This is equivalent to performing the elementary operations with columns instead of rows; we then speak of column elimination, whereas in the former case we can speak of row elimination to be more explicit. Notice that if in particular K = M in (B.7.2 or 3) (hence if no row is annulled by the elimination), we have also rankA = M by (B.7.8). In that case, we say that the matrix is of full row rank. In analogy if, by column elimination (thus by row elimination on A T [N, M]) we obtain N nonnull columns, we say that matrix A is of full column rank; thus rankA = N. The matrices of given type (say) M • N form a vector space for the summation and scalar multiplication defined in the well-known manner; one simply regards the MN elements Am n as components of a vector A of RMN, arranged conventionally in the rectangular scheme. Preserving the rectangular scheme, a linear combination of matrices of given type is again a matrix of the same type. The reader is certainly also familiar with the notion of matrix product (say) BA, where B is K x M and A is M • N. Observe that according to the representation theorem, the product represents composition of linear maps. Indeed, if A represents LA and B represents LB then LA x = Ax ~ R M, thus L B (L Ax) = B(Ax) = Cx = z where M
k = 1"-" '
'
K:
Zk-
N
N
E nkm n~l amn Xn- n~=lfknXn
m=l
on changing the order in the double summation, and we have
k=l,...,K n = 1, .-- , N
Ckn =
:
M ]~ BkmAmn
(B.8.4)
m=l
for the matrix product
C = BA
(B.8.5)
which is the matrix representation of the composed linear map LB LA. Defined in this way, the matrix product obeys the relations associativity:
A1 (A2 A3 ) = (AI A2 ) A3 written simply as A 1A2 A3
(B.8.6)
distributivity:
B1 (82 + 83 ) = B1 B2 + B1 83
(B.8.7) (B.8.8)
( C 1 + C 2) C3 = C 1 C 3 + C 2 C 3
Appendix B
545
- Vectors and Matrices
provided the operations make sense (summation of matrices of the same type, in products of matrices number of columns of the first matrix = number of rows of the second). For scalar multiplication it holds B(kA) = k(BA)
(B.8.9)
for arbitrary real k. All these identities are easy conseqences of the definitions.
A partitioned matrix is a matrix scheme like
A
/A/ A"
' ~ A = (AI' A2)' ~ A = ( A IAI~ 2 A~2 ) A 22
thus the rectangular scheme of matrix A is cut horizontally and/or vertically. More generally, the rows and columns of a matrix A [M, N] are partitioned in the manner that the sets M of M elements { 1, ... , M} and N of N elements { 1, ..-, N} are partitioned M=M
N=N1
1 L) ... u
MH
(B.8.10)
u... uNK
into two-by-two disjoint subsets. Generally, the decomposition can be for example {1, 2, 3, 4, 5} = {1, 3} L) {2, 4, 5 } . Re-addressing the row and the vector components of x components of vectors y ~ obtain a partitioned matrix N1
A =
N2
""
column indices, thus introducing new numbering for ~ R N on which A operates by A x , and for the vector 1~M into which A maps (sends) the vectors x, we can in the form
NK
All A12 ..-
AIK
M1
A21 A22 ...
A2K
M2
. . . . . . . An1 AH2 ""
(B.8.11)
AUK
(B.8.12) MH
where Ahk is of elements A m n , m e M h and n e N k . For example if K = 2 and if the original matrix A operates on column vectors (Xl, x 2 , x 3 , x 4 , x 5 )T, and if
546
Material and Energy Balancing in the Process Industries
we have the partition (B.8.11) then the re-indexed matrix A operates on vectors (x~, x3; x2, x4, x5 )T, thus All on (Xl, x3 )T and A12 on (x2 , x4, x5 )T. The submatrices Ahk are also called blocks. We then have the block rule of multiplication for matrices. It is the same as in (B.8.4). Let A be decomposed into blocks Ahk (h = 1, ..., H; k = 1, ..., K) and B into blocks Bib (i = 1, . - . , I; h = 1, .--, H), and let, for h = 1, ..., H, the number of columns of Bib equal the number of rows of A~ whatever be i and k. Then C = BA is partitioned into blocks Cik (i = 1, ..., I; k = 1, ..., K) where H Cik =
(B.8.13)
Z Bih Ahk .
h=l
An assiduous reader can verify the rule; it is an easy consequence of the rule (B.8.4), restricted to subsets of rows and columns. For example A ( B 1 , B 2 ) = ( A B 1 , AB 2 )
(B1' B 2 ) (
A21AllB A12 2] - A (B1 All 2 +2 B2A21 ) A' B1Al2 2 2+
and the like. Denoting by A
-
(al,
... ,
an
the n-th column vector of A, we can write
a N)
(B.8.14)
and we have, by the block rule BA
=
(Ba
1 ,
-.-
,
Ba N ).
(B.8.15)
Having again a matrix product C = BA
(B.8.16)
we can readily verify that C T - ATB T .
(B.8.17)
Because ImC is generated by vectors By where y - Ax c ImA , it is also generated by K vectors By k where Yk are some K basis vectors of ImA, with K = rankA; hence rankC = dimlmC < K. Let H = rankB; because rankB T - rankB and rankC T - rankC, by (B.8.17) we have also rankC < H. Hence rank(BA) < Min(rankA, rankB)
(B.8.18)
Appendix B
547
- Vectors and Matrices
where Min means the smaller of the values, or the common value if they are equal. But the rank can be lower; we can even have BA = 0 even if both matrices are nonzero. For example
/11//11/ (00/ 1 1
-1-1
0 0
.
Of special interest in linear algebra are square matrices. They are matrices of type N • N ; a matrix of type 1 x 1 is simply a scalar. The N x N unit matrix, denoted by I N , is of elements ~n n' (B.6.6), thus f
N
1
IN (B.8.19) N where the remaining elements are zeros. It has the obvious property (B.8.20)
INX = X
whatever be N-vector x. The matrix having this property is unique. Indeed, it thus represents the (unique) linear map Lx = x , thus identity. IN is also called
identity matrix. Having an arbitrary N • P matrix D = (all, "", dp) with column vectors dp, by (B.8.15) we have IND
= ( d l , "'"
, dp)
thus IND = D
(B.8.21)
;
on the other hand, for any A [M, N] thus
AT
[N, M] we thus have
INA T = A T
hence by transposition AI N = A . Here, we have used the obvious identities (A T )T_ A and I T -
(B.8.22) IN.
548
Material and Energy Balancing in the Process Industries
Let now A [N, N] be regular (invertible), thus rankA = N, and there exists the (unique) inverse A -1. Because, as shown, A is representation of a one-to-one linear map and A -1 that of the inverse map, we have clearly (A-I)-I _ A
(B.8.23)
because L - l y = X is equivalent to y = L x , or also to y = ( L 1 )-lx. Because the composition of the map with its inverse is identity and because matrix product represents composition of linear maps, we have AA - 1 -
A - 1 A - IN
(B.8.24)
9
Let us further have two arbitrary N x N matrices A and B, such that AB
=
IN
.
If we had rankA < N or rankB < N then, by (B.8.18), we should have rankI N < N, which is absurd. Hence A and B are invertible. Using the associativity we thus have A -1
=
A-IIN
A -1 ( A B ) = ( A - 1 A ) B
=
=
IN
B = B
and using (B.8.23), we have A = B -1. On the other hand A -~ = B implies I N = AA -1 = AB, and also A = B -1 implies AB = I N .Consequently AB
=
if and only if A = B -1 if and only if B if and only if BA = I N ;
IN
= A -1
(B.8.25)
for N x N matrices, the four equalities are equivalent. Let again A [N, N] be regular. Then (A T
(A-1)T ) T
=
A-1A
= IN
by (B.8.16 and 17), hence by transposition A T (A-I)T
=
i T = IN
and by (B.8.25) ( A T )-l =
(A-1)T
.
(B.8.26)
The inverse of the transpose, equal to the transpose of the inverse, is sometimes denoted by A -T.
B -
Appendix
Vectors and Matrices
549
Let us have two regular N • N matrices A and B. We then have (B-IA -' )(AB) - B-' (A-'A)B = B-1B
-
IN
hence by (B.8.25), the product AB is also regular and we have (AB) -1 = B-'A-' .
(B.8.27)
Let us return to a general M x N matrix A. Recall the elementary operations (a), (b), (c) introduced in Section B.7. Any of the operations can be represented by an M x M matrix. The operation (a) is represented by a permutation matrix P, obtained by a permutation of the rows of unit matrix. Indeed, if m'-th and m"-th rows of matrix I M are interchanged, we have, for any column k Pm'k = ~m"k, Pm"k = 8m'k, Pmk = ~mk for the other m
hence in the matrix B = PA we have, for any n Bm, n =
]~ k
em,kAkn =
Bm,,n =
]~ ~m,,kAkn = k ]~ 8m,kAkn k
Am,, n
= Am, n
and if m r m', m" Bmn =
]E 8mk Akn = Amn
k
by the properies of Kronecker's delta. This means precisely that the rows m' and m" of A have been interchanged. By composition, we obtain an arbitrary permutation PA of rows. Because by the permutation of rows of I M , the rows remain linearly independent, the permutation matrices, and also their arbitrary product, remain of full row rank. So operation (a) is written as PA, with regular P. The operation (b) is represented by a matrix obtained by multiplying some m-th row of unit matrix by k ~: 0; the result is multiplication of m-th row of A by this k, as the reader easily verifies. Clearly, the matrix representing the operation is regular. The operation (c) is adding (say) m"-th row to row m', with m" ~: m'. This corresponds to adding m"-th row of I M to the m'-th row. Indeed, the matrix (say) Q is of elements amk = 8mk if m ~: m', and am'k = ~m'k+ ~m"k hence if B = QA then, for any n
ifm~:m'" Bmn: ~k QmkAkn:~k 8mkAkn=Amn and
Bm'n ~-" ~k (Sm'k + 5m"k )Akn = Am,n + Am,,n
Material and Energy Balancing in the Process Industries
550
which is the result of the operation (c). Now Q represents the linear map that consists of adding m"-th component Ym"to m'-th component Ym' of any vector y; the inverse is clearly subtracting again Ym"" Hence also Q is regular. By composition of the linear maps, thus by the product of the corresponding matrices, we obtain some regular matrix L such that LA is the matrix resulting from the elimination. Hence
Let A [M, N] be arbitrary, let A' be a matrix obtained from A by Gauss elimination, A* that by Gauss-Jordan elimination. There then exists regular matrix L' [M, M] resp. L*[M, M] such that L ' A = A' resp. L*A = A* .
(B.8.28)
The matrices L', L* depend on the choice of the elimination strategy; they are not unique. But given a procedure, they can be found. Instead of A, let us write the extended M x (N + M) matrix
(A, IM) }M. N
(B.8.29)
M
We eliminate the rows of A only, but extend the row operations over the whole matrix (B.8.29). As shown above, this means multiplication by some L' or L*. By the block rule we thus obtain L ' (A, IM )
=
(A', L') or
L*
(A, IM ) -- (A*, L*)
(B.8.30)
hence in the last M columns, we have the transformation matrix L' or L*. Let in particular A be N x N regular. Then, by Gauss-Jordan A * - L*A = IN hence L* - A -~ .
(B.8.31)
The result holds true, of course, only if A* = I N has been obtained without permutation of columns; if A is regular, this is always possible.
Appendix B - Vectors and Matrices B.9
551
SYMMETRIC MATRICES An N x N matrix S is called symmetric when it equals its transpose (B.9.1)
S T -- S
thus any element Sij equals Sji. For example the matrix
254 346 is symmetric. Generally, the elements Aii (i = 1, .--, N) of an N • N matrix A are called diagonal elements, the elements Aij where i ~ j are called off-diagonal elements. A matrix whose off-diagonal elements equal all zero is called diagonal matrix; it is clearly symmetric. If D is such matrix we have Dij - 0 if i ;~ j .
(B.9.2)
Denoting the diagonal elements
Dii
simply as di, the matrix D is denoted by
d1
~
(B.9.3)
diag(dl, ... , dN) -
where the remaining elements equal zero. Clearly, a scalar multiple of a diagonal matrix and the sum of two diagonal matrices are again diagonal matrices. For the product we have diag(d~, ..., dN) diag(el, ..., eN ) = diag(d~ e l , ' " ,
dN eN )
(B.9.4)
as is readily verified by the rule (B.8.4). The properties of symmetric matrices are conveniently examined in a broader frame than is that of linear algebra only. We shall limit ourselves to several remarks. The scalar function of variables x~ and x2 thus of vector x = (x~, x2)T f(x) = a~ + bxl x2 + c~ can be written
552
Material and Energy Balancing in the Process Industries
cb'2)(Xl) x2
a fiX)
-- ( X l , X2 )
b/2
,i -~r
S
xTSx
with symmetric matrix S. Generally, a quadratic form in vector variable x ~ R N reads q(x) = x T Qx
(B.9.5)
where Q is N x N symmetric matrix. If Q has elements Qij (= Oji )' we have
q(x)
-
N N Z Z Qij Xi Xj i= 1 j= 1
(B.9.5a)
as follows from the rule (B.8.4) applied to (1 x N) matrix XT and (N x 1) matrix Qx. If in particular Q is diagonal thus N
Q = diag(ql, ..., qN) then q(x) =
2 . ]~ qi Xi , i=1
(B.9.5b)
if Q is unit matrix then q(x) is simple sum of squares. The sum of squares is always positive, with the exception of x 1 = x 2 = ... x N = 0. Clearly, the same property has the sum (B.9.5b) if (and only if) we have qi > 0 for all i. Generalizing further, we can regard as a 'generalized sum of squares' a function (B.9.5) such that q(x) > 0 with the exception of x = 0. In Algebra, one calls such quadratic form positive definite. It is thus defined by the condition q(x) > 0 whatever be x r 0
(B.9.6)
while q(0) - 0 as follows from (B.9.5). Going back to symmetric matrices, we shall use the same terminology. Thus an N x N symmetric matrix Q is called positive definite when XT Qx > 0 for any x ~ R N, x r 0 .
(B.9.7)
An immediate conclusion reads
Any positive definite matrix is invertible, and the inverse is again positive definite.
Appendix B -
Vectors and Matrices
553
Indeed, if Q were not invertible, one would have rankQ < N thus dimKerQ > 0 by (B.6.17) hence one would have Qx = 0 for some x :~ 0, thus also x T Qx = 0. Hence any positive definite Q is invertible. Then given arbitrary x ~ 0, it equals Qy for a unique y = Q-ix ~ 0. But then, as QT = Q x T Q-1x = (Qy)T Q-, (Qy) = yT QQ-1Qy = yT Qy > 0 . The positive definite character of a matrix can be assumed by hypothesis, due to its physical nature. Let us for example have N physical variables xi, the values of which are measured. The i-th measurement error is the difference ei = xi§ - ~i where x~§ is the measured value, xi the true value. The statistical theory of measurement is discussed in another part of the book (see Chapter 9). Here, let us suppose that having a large set of measurements, the average error equals zero, and that the covariance matrix of measurement errors, say F of elements Fij, can be approximated by the averages m
1
Fi i =
T
Z ei(t) ej (t) T t=l
where e i (t) is error of t-th measurement, t = 1 , - . . , T, with T >> 1. Thus F~j = Fji and F is symmetric. If y is an arbitrary N-vector then N yT Fy
=
-
N
E E Yi i=1 j=l 1
T
1
T ]~ e i (t) ej (t) yj
T t=l N
N
~, (~, Yiei(t))(~=
T t=l
i=1
1
T
N
T
t=l
i=l
j 1yj
ej (t))
2
~ ( ~,yiei(t)) >-0.
If thus yT Fy = 0 for some y ~ 0 then in the sum of squares we have N
Z Yi ei (t) = 0
i=1
for any t, with certain coefficients Yi, not all zero; this means that there is a linear dependence among the errors in variables x~, x2, "" , x y . [The conclusion becomes formally exact when the averages are replaced by theoretical expectations (mean values) of random variables.] Precluding this case, the covariance matrix can be assumed positive definite.
Let us have some positive definite matrix. In other parts of the book, we need the following result.
Let Q [N, N] be positive definite, A [K, N] arbitrary such that rankA - K
(B.9.8)
(full row rank). Then the symmetric K • K matrix AQA T is positive definite.
(B.9.9)
Material and Energy Balancing in the Process Industries
554 Indeed, if x is arbitrary we have XT AQATx = (ATx) T Q(ATx) (> 0)
equal to zero only if ATx = 0; but the number of columns of AT is K, hence dimKerAT = K- rankAT = K - rankA = 0. Hence ATx = 0 implies x = 0, from where (B.9.9).
B.10
ORTHOGONALITY
The following concepts belong no more to linear algebra proper. We shall limit ourselves only to those which are needed in the chapters dealing with reconciliation of measured data. The reader knows the notion of threedimensional Euclidean space. In Cartesian coordinates (x~, x2, x3 ), the scalar product of two vectors equals
x, x',+ where (x'1, x 2, x'3 ) are the coordinates of another vector. If the product equals zero we say that the two vectors are orthogonal. If x'i = xi (i = 1, 2, 3), the square root 2
112
is called the absolute value of the vector. In particular if e i and ej (i ~ j) are two canonical basis vectors then the scalar product equals zero (they are orthogonal), and the absolute values equal one. The absolute value of the difference of two vectors represents their distance (thus the distance between the two points they represent in R 3 ). Generalizing, in the space 1~N of N-vectors we introduce the (canonical Euclidean) scalar product of vectors a and b ( a l b ) = aT b (= bTa = ( b l a ) ) .
(B.IO.1)
Endowed with this scalar product, the space is called (canonically) Euclidean. The vectors are called
orthogonal when ( b l a ) = 0 .
(B.10.2)
The square root
Ilall = (a [a) 1/2
(B.10.3)
Appendix B -
Vectors and Matrices
555
is called
the (canonical Euclidean) norm of vector a and the norm lib- all is the (canonical Euclidean) distance of points a and b in R y. In particular, if e i and ej are two canonical basis vectors, we have Ila-bll-
(B.10.4)
(e i [ej) = 0 if i ~ j , and Ileill = 1 .
Hence the basis ( e l , ' - ' , eN ) is (called) an orthonormal basis of R N . Generally, any basis (e'l, "" , eN ) of ~[S is called orthonormal when for i, j = 1, ..., N: (e;
le] ) = 8ij
(B.10.5)
where 8 o is Kronecker's delta (B.6.6). Then N
e'i - k__E1Oikek
(i = 1, ..., N)
(B.10.6)
is the expression for el in terms of its canonical coordinates Qik; let Q be the N x N matrix of elements Qik" Consequently for any i and j
~ij = ]~ Qik (ek k,l
le0 Qjl
=
]~ Qik ~kl Qjl =
k,l
]~ Oik Q~j k
where QkT are the elements of the transpose QT. Hence QQT = I
(B. 10.7)
with unit N • N matrix I. Conversely having any N vectors e] obeying (B.10.6) with (B. 10.7), the condition (B. 10.5) is satisfied. Any N x N matrix Q having the property (B.10.7) is called orthogonal. Thus a basis (e'l, "-', eN ) is orthonormal if and only if the matrix Q of coordinates according to (B.10.6) is orthogonal. Observe that by (B.10.7), Q is invertible and we have Q-1 = QT ;
(B.10.8)
by (B.10.6) we have e'i = QVei - Q-le i
(B.10.9)
as the reader readily verifies. [Thus the e] are column vectors of matrix QT; one thus verifies that they are linearly independent thus indeed, a basis of RN.]
556
Material and Energy Balancing in the Process Industries
Let us have some K linearly independent vectors of R N, say v~, ..., VK. Denoting 1
f, = Y--7-.. Vl
we have (fl If, ) = 1 9
iiv, II
let f2 = v2- (fl Iv2) fl (~: O) thus (~ Ill) = 0 and
f; f2 -
thus (f21t'2 ) - 1 . I1~11
Generally having orthonormal vectors fl, "'" , fk (k < K), linear combinations of vectors Vl, "", Vk, let k
fk+, = Vk+,- i__~l (fiIrk+, ) fi (r
O)
(B.
10.10)
hence for j = 1, ..., k: (rk+l Ifj ) = (Vk+l Ifj ) - (fj IVk+l ) = 0 because (fi ]fj) = 0 if i ~: j while (fj Ifj) = 1, and let
fk+l m. ~
~k+l
(B. 10.11)
thus (fk+, Ifk+, ) = 1.
Ilrk+ll] Observe that the orthonormality implies linear independence: indeed, Z ai fi - 0 implies 0 = a i (fiJfi) = a i for any i; then f~k+l :~: 0 in (B.10.10) because thd vectors Vk+ l and fl,"", fk are linearly independent. We have thus obtained k+l orthonormal vectors f~, "'" , fk, fk+~, linear combinations of Vl, "" , Vk, Vk+~. In the end, we thus have K such vectors. We have thus shown: I f q/'is a n a r b i t r a r y v e c t o r s u b s p a c e
of R N , dim qT- K (>0) then there exists
a n orthonormal basis ( s a y ) f l , "'" , fK o f '/2; w e t h e n h a v e , f o r k, l =
l, . . . , K: ( f k l f l ) = 0 if k ~ l, (fklfk) -- 1 . Let us consider the set of equations
k = 1, ..., K"
(Xltk) = O.
If fk is i-th canonical coordinate of fk then the equations read, as (x [ei ) = xi k = 1, -.. , K"
K ZfkXi = 0 i=l
(B.10.12)
Appendix B - Vectors and Matrices
557
with full row rank K of the matrix ~ ) by the linear independence of f~, ..., fK" Hence the null space of the matrix is of dimension N-K; let V ^ be this space. We have (x lY) = 0 whatever be x e V ^ and y e 'V. Conversely let a set V ^' of vectors x be determined by the latter condition of orthogonality, for any y e V; then clearly V ^ c V ^', and x ~ V ^' implies in particular (x Ilk ) = 0 for k = 1, ... , K, thus x ~ V ^, thus V ^ ' c V ^. Hence V^= V ^' is uniquely determined. W e call t h e s p a c e V ^ ( c x~
~N) d e t e r m i n e d
by the condition (B.10.13)
V ^ if a n d o n l y if (x [y) = 0 for a n y y ~ V
t h e ( c a n o n i c a l ) Euclidean orthogonal to V. It is a v e c t o r s u b s p a c e o f R N, o f dimension dim V ^ = N-
(B.10.14)
dim V;
it is c l e a r l y a s u p p l e m e n t a r y
s p a c e to V in R N, u n i q u e l y d e t e r m i n e d b y t h e
orthogonality condition. The orthonormal bases (fl,
"'", fK) of V and (say)
(f~, "'", fN-K) o f V ^ c o n s t i t u t e an o r t h o n o r m a l b a s i s o f R N. Let us now consider a symmetric N x N matrix S. Let ,ge be the unit sphere (spherical hypersurface) in II N, thus x ~ ,7' means ( x l x ) = 1 ;
(B.10.15)
compare with the unit sphere in threedimensional Euclidean space. According to the elementary theory of metric spaces, there exists some point i ~ ,7' such that the quadratic form (say) q(x) = x T Sx is maximum on ,7' at x = i .
(B.10.16)
[The point is not necessarily unique; for instance if S is unit matrix then the maximum (=minimum) equals 1 whatever be i e ,7'.] Let us select some i. We have i ~: 0 and for an appropriate order of the coordinates, let the coordinate 2~ 4: 0. Let us consider a curve passing through point ~, parametrized as x = tp(t) thus x i = tpi(t), i = 1,..., N
(B.10.17)
where for i > 2: tpi (t)
=
Xi + kit
and
N 1/2 tPl(t)=(1- ]E (Pi(t)2 ) sgrl~l i=2 where sgn~ = 1 if ~ > 0, -1 if ~ < 0, and where t is in some neighbourhood of point
Material and Energy Balancing in the Process Industries
558
t = 0. Thus, clearly, 9(t) e ,7' and 9 ( 0 ) = i . Hence, denoting by 9' the derivative, we have
for 1
N
i > 2 9q~'i(0) = ki and qo'~(0) = -
s ki s
because IXll sgns
= s
i=2
thus
N i=1
s q)] (0) "- 0
i.e.
(~ I(p'(O)) = o
(B.10.18)
for any such curve. Taking arbitrary k2, "" , kN, the vectors tp'(0) generate an N - 1 dimensional vector subspace of R N , say H determined by the orthogonality condition
v e H" (~lv)= 0 .
(B.10.19)
Now the condition of maximum (B.10.16) implies, for any curve as introduced d q (tp(t)) = 0 at t = 0 thus 2~ T Sip'(0) = 0 dt hence, as iTS = (S~) T
(B.10.20)
(S~ Iv) = 0 for any v e H .
We have ~ :~ 0 thus :~ ~ H b y the orthogonality (B.10.19); observe that H i s the orthogonal of the onedimensional vector space generated by ~, and conversely the latter space is the (onedimensional) orthogonal of the N - 1 dimensional H. Hence by (B.10.20), S~ being orthogonal to H we have
S~ = s~
(B. 10.21)
for some real s, where (as iv i = 1)
~T S~ - s
(B. 10.22)
is the maximum by (B. 10.16). Let us write i = i l , H = ~ , and s = s~. Consider now the intersection ~ n ,7'. We can take an orthonormal basis of H1, thus N - 1 vectors fl, "'" , fs-l. The condition x e ~ n ,~e reads
xe
~thusx=
N-1 X Y i f i , a n d ( x l x ) = 1 thus i=1
N-1 E y~= 1 i=1
where Yi is the i-th coordinate of x relative to the latter basis; geometrically it means that H1 ~ ,7' is unit sphere in the N- 1 dimensional space HI. We thus can, in the same manner
559
A p p e n d i x B - Vectors and Matrices
as above, select some 22 e ~ n ,7' where q(x) is maximum on Hi n ,7'. By the same construction, using the coordinates relative to the f~, ..., fN-1 we obtain the result Si 2 = s 2 2 2
for some real $2, with
i~ Sx2 = s2 -< s~ because s 1 was the absolute maximum; and since
22 E
ff~l, we have
(x2 Ix~) = 0 . Here, the subspace ~ c ~ is determined as orthogonal to 22 ~ HI, of dimension N - 2 . Continuing in this manner, we obtain a chain HI D -q-{2D ~ D ... of subspaces of dimensions decreasing successively by one, and of vectors i~, 22 ~ H1 n ,7', 23 ~ ~ n ,7', 9.. , where each .q{, is determined as orthogonal to ik in ~ - l . Thus (ik+l lit ) = 0 for l = 1,... , k because ik+~ ~ ~ C ~ where ~ is orthogonal to i t ; and we have Sik+l = Sk+l ik+~ for some real Sk+l. Finally, we then have N vectors i 1, ..., i N , two-by-two orthogonal and such that Ilinll - 1 (n = 1, ... , N), and N real numbers Sl > s2 > "" > SN such that S i n = Sn in. We thus have the following result.
Let S be N x N symmetric. Then there exists an (r,1, "'" , X'N) of R N, and N real numbers S 1 ---~ S 2 >--- ... >
orthonormal basis (B.10.23)
SN
such that n = 1, ... , N: S~n
(B. 10.24)
= Sn Xn 9
According to (B.10.9), we have an orthogonal matrix 0 such that Q = 0 T is also orthogonal and we have ^T S i n = enT (QT Sn _. Xn
i n =
0Ten ; thus
SQ) e n
hence s n is the n-th diagonal element of QT SQ, while the mn-th element for m ;~ n equals, T by (B.6.28) where 8m = em T QT SQen = (Qem)T S(Qe n ) = Xm ,, T ( S i n ) em
=
Sn ( i m l i n )
=
0
by the orthogonality. Hence the matrix QT SQ is diagonal and we have in addition:
There exists an
orthogonal matrix Q such that
n = 1, . . . , N " ]Kn "- Q e n
(B.10.25)
and QT SQ = diag(sl, ... , SN) is
diagonal.
(B.10.26)
560
M a t e r i a l a n d E n e r g y B a l a n c i n g in the P r o c e s s I n d u s t r i e s
The vectors Sn and matrix Q are generally n o t unique; we only know that they exist. Let S t = a t for some t where Iltlf = 1. Then
t = Zpnt n
n
with some real coefficients P n , hence a Z pntn = ax = Sx = Z PnSXn = n
n
]~ P n S n X n n
thus, as tn are basis vectors " apn
=
Snp n for n = 1, ..., N
and because some p, ~: 0 a
= s n for
some n
(while Pm -" 0 for any m such that s m ~ Sn because Snp m a is some o f the Sn.
"-
Smp m for any m); hence any such
The (not necessarily two-by-two distinct) real numbers s~, ... , SN (B.10.23) having the property (B.10.24) are called the eigenvalues of matrix S. The set of eigenvalues Sn (so-called spectrum) is uniquely determined by the condition S~ = Sn ~ for some ~, and any such z~ is (called) an eigenvector of matrix S. [Historically from German: 'eigen' means 'proper'.] Thus there exists an orthonormal basis of R N constituted by some N eigenvectors of S (not necessarily unique). [For example if S = I N is unit matrix then the set of eigenvalues is the unique element 1 and any (for example orthonormal) basis is that of eigenvectors.] In this book, we do not need the complete result concerning the eigenvalues and eigenvectors; so let us limit ourselves to several remarks. Observe that ,, Tn S ~ n = X
(B. 10.27)
Sn .
Thus if in particular S is positive definite then S1 ~
S2 ~
"'" ~
SN >
0
(B.10.28)
.
The matrix is then invertible and because, with QT = Q-1 (QT SQ)-~ = (Q-~ SQ)-I _ Q-, S-1Q = QT S-~Q we have, by (B.10.26) QT S -1 Q = diag(1/s 1 ,
"" ,
1/SN ) ;
(B.10.29)
Appendix B
561
- Vectors and Matrices
the eigenvalues of the inverse S -~ equal 1/s~, ... , 1Is N because Sx = s n x is equivalent to S-~x - ( 1 / s n )x. More generally, a symmetric N x N matrix S such that XT S x _> 0 f o r a n y x ~ l~ N
(B.10.30)
is called positive semidefinite. Then all the eigenvalues of S are nonnegative. If rankS < N then some eigenvalues (say) SK+l, "", SN in (B.10.23) equal zero. The corresponding eigenvectors XK+l, "'", :~N in (B. 10.24) then generate the null space KerS, and the vectors Xl, "'", it( generate the orthogonal (KerS)^. We have rankS = K. Let us have a matrix A [M, N], rankA = K. Then xTATAx = (Ax)T(Ax) > 0 thus ATA is positive (semi)definite (positive definite if rankA = N). We have x E Ker(A T A) if and only if Ax = 0, thus Ker(ATA) = KerA is of rank N - K . Putting S = ATA the above vectors ~K+I, "'", % generate KerA, and the vectors i l , --., XK generate (KerA) ^ ( c RN).
Consequently we have the partition AQ=(A §
K
0) } M w h e r e r a n k A §
(B.10.31)
N-K
is full column rank. [Indeed, (AQ)e n = A~ n by (B.10.25), thus the n-th column (AQ)e n of A Q equals zero if n > K + 1 because Xn E KerA; and Q being regular, K = rankA = rank(AQ) = rankA+.] In particular if A is of full row rank thus K = M then A § is invertible.
In this book, the eigenvalues and eigenvectors are not of systematic use and occur only as auxiliary concepts in certain mathematical proofs. Computing the eigenvalues of a (nondiagonal) matrix is laborious. For a symmetric matrix, at least the sum of eigenvalues is easily found. Generally, if M is an N • N matrix of elements Mij, its trace trM is the sum of its diagonal elements; thus N
trM -
Z Mii .
i=1
(B.10.32)
If Q is arbitrary N x N regular then tr(Q -I MQ) = t r M . Indeed, if P = Q-1 then the LHS equals Z E Mjk Z. Qki Pij = j,g E Mjk 8kj = j~. M.U i j,kZ P~j Mik " Qk~ = j,k as Q P is unit matrix of elements 5jj = 1, 5jk = 0 for j ~ k.
(B.10.33)
Material and Energy Balancing in the Process Industries
562
If M = S is symmetric then taking orthogonal Q transforming S to diag(sl, 9" , SN) we have in particular N ]~ Sii --
i=1
N trS = Z S i i=1
(B.10.34)
hence the sum of eigenvalues equals the sum of diagonal elements of S.
B.11
DETERMINANTS
In this book, we need determinants only marginally; so let us limit ourselves to several remarks. In the theory of determinants, well-expounded in any first course on Algebra, one begins with the concepts of permutation and its signature. A permutation P of numbers 1, 2, ..., N assigns, to the original order, another order according to the scheme 1,2,
..., N )
P: i l, i2, ...,
iN
9
(B.11.1)
We can imagine the following procedure. If iN = N, we leave i N in its place; else we successively exchange iN with iN_1 , then with iN_2 , and so on until, if iN = k, i N stands in its k-th place according to the original ('natural') order.
Each exchange represents a transposition (m, n) ~ (n, m). We now have i N = k in the fight place, and we repeat the procedure with the N- 1 remaining elements, starting from the last (/N-l) and leaving k fixed. And so on, until we have the natural order. In this well-determined procedure, we have performed some number p of transpositions. Then (-1)P = 1 if p is even, (-1)P= -1 if p is odd. We designate e(i,, .-., iN ) = (-1) p
(B.11.2)
where p is the number of transpositions. In fact we can choose another sequence of transpositions and it can be shown that in any case, the signature (B. 11.2) of the permutation remains invariant; thus if some p is odd (even) then any other number of transpositions is odd (even) for the given permutation P. But we can manage with the procedure as described.
Appendix B - Vectors and Matrices
563
L e t us n o w h a v e s o m e N arbitrary vectors X i E R. N. A skew-symmetric N-form tx assigns, to any o r d e r e d N-tuple (x~, ..-, x N ), the n u m b e r a ( X l , --., XN ) such that (a)
tx is linear in each xi; thus for e x a m p l e t3~(X 1 4" X~, X 2, "'" , X N) : 13~(X1, X 2, " " , X N) 4" a ( X ' l , X 2, "'", X N)
and 1~ (kXl, x2, ... , XN )
(b)
: kct (Xl, x2, "'", XN ) (k s R)
( t h e s a m e f o r x2, ..., X N )
(B.11.3a)
a (x~, ... , x N ) = 0 if X i "- Xj for s o m e i # j.
(B. 11.3b)
F r o m the properties it f o l l o w s i m m e d i a t e l y that w h e n adding, to s o m e x~ , a linear c o m b i n a t i o n o f the other xj (j r i), the value of tx does not c h a n g e . T h e n in p a r t i c u l a r a(
. . . , x i , ... , x j , ... )
: a(
" ' " , Xi-Xj, "'", Xj , "'" )
"- 0 ~ (
"'" , X i - X j ,
"'" , X i ,
"'" )
----(g( "'" , - X j , "'", Xi, "'" )
thus by the linearity, for any such t r a n s p o s i t i o n (with i r j) ( g ( " " , Xi, " " , Xj, "'" )
: - ( ~ ( " " , Xj, " " , Xi, "'" ).
(B.11.4)
L e t ( e l , -.. , e N ) be the c a n o n i c a l basis of 1~N , with g i v e n o r d e r of the unit vectors e i . Then, h a v i n g s o m e N vectors aj
N
= aj
alj.
~ aij e i =
(j = 1, ... , N)
(B. 11.5)
i aN
we have N N N E i2=1 ]~ "" iN=I ]~ aill ai22 ".. aiNN (~ (ei I , eia , ... , ei N) (a I , 9-. , aN ) = i1=1
(B. 11.6)
564
Material and Energy Balancing in the Process Industries
by the N-linearity. According to (B.11.3b) and (B.11.4) (X ( e i l ,
... , eiN) -- 0
if ij - i k for some j r k
(B.11.6a)
and if ( i l , "'" , iN ) is one of the N! permutations of (1, ..., N) then (t (ei,, ... , eiN ) = E (il, "'" , iN ) (g (el, "" , eN )
(B.11.6b)
as follows from successive transpositions, each of them changing the algebraic sign. Consequently, a skew-symmetric N-form Gt is uniquely determined by the value of c~ (e~, ... , eN ) giving c~ (al, "" , aN ) -- ( N Z! ~ (il, "'" , i N ) ail 1 ai2 2
" "
aiN N ) (Z
(el, "- , eN ) ,"
(B.11.7)
here, Z means summation over all the N! permutations ( i l , " " , iN ) of indices, N! two-by-two distinct. Conversely, determining some c~ by (B.11.6) with (B.11.6a and b), which is thus (B.11.7), this o~ is linear in each of the a~, ... , aN, and obeys (B.11.4) because a transposition of a i and aj (i r j) changes the sign: for example the transposition of al and a2 represents replacing ( e i l , e i 2 , ... ) in (B.11.6) by (ei2, eil , ' " ) (re-indexation). But from (B.11.4) follows (B.11.3b) because then, putting x i = xj 2c~ ( ... , x i ,
--. , x i ,
... ) = 0
.
Let us now introduce a special N-form, denoted as det, by det(e~, e:, ... , e N ) = 1 .
(B.11.8)
Hence det(al, a 2 , ... , aN ) = N Z! ~ (il, i2, "'" , i N ) ail 1 ai2 2
""
aiN N
.
(B.11.9)
Denoting A = (a~, ..., a N )
(B.11.10)
detA is the determinant of matrix A [N, N], of columns al, 9" , aN. Then, for the transposed matrix detA T - Z ~: (il, i2, "'" , iN ) a l i 1 a2i2 "'" aNiN 9 N!
565
A p p e n d i x B - Vectors and Matrices
Because the product in each of the N! permutations is commutative, we can rearrange the terms by the inverse permutation F ~, thus P-~ (1, ..., N)= (k~, k2 , ' " , kN ) (say); we thus have the product e (il, i2, "'", iN ) akll ak22 "'" akNN ; but the signature of ( i l , i2, 9" , iN ) equals that of the inverse permutation, thus the term finally equals ~: (kl, k2, ... , kN ) akll ak22 ." akN N and we have, in the total of the N! permutations d e t A T = Z 13 (kl, k2, "'" N!
kN ) akll ak22 "'" akNN
hence detAT
=
det A .
(B. 11.11)
Further, let us consider the product of matrices C = BA. Thus detC = det(Bal, ..., Ba N ) N N i,=1 ]~ "'" iN=Zlaill "'" aiNN d e t ( B e i , ,
"'" , Bei N )
= ( N ~! e (i~, -.- , i N ) ai, 1 .-. aiN N ) det(Be~ , "" , B e N ) where Bej = bj is j-th column of B, hence finally det(BA) = (detA)(detB) = (detB)(detA) .
(B.11.12)
In particular if A is regular, since (see (B.11.8)) detIy = 1
(B. 11.13)
for unit N x N matrix IN, w e have detA-1 = (detA) -1
(B.11.14)
thus if A is regular then detA r 0. Conversely if A is not regular then some column is a linear combination of the remaining columns, and by the N-linearity
566
Material and Energy Balancing in the Process Industries
and skew-symmetry, we have detA = 0. Hence A is regular if and only if detA 4: 0. We have thus summarized the most important properties of determinants. Observe finally that according to (B.11.9), the determinant is a polynomial of N-th degree in the matrix elements. Clearly, if A = diag(a 1 , ... , a N )
(B.11.15)
is diagonal then detA = det(al
el,
"'" , aN e N ) =
al
(B.11.15a)
a2 "'" aN
by the N-linearity. Using elimination reducing a matrix to diagonal form, the determinant can be calculated..
Remark In Appendix E, determinants occur in certain transformations of integrals. Let us outline the idea of such transformation. Let us begin with N = 2 where R 2 is a plane. If D is a region in the plane, its area (2-dimensional volume), say V2(D), is additive for two not-overlapping regions D 1 and D2 , thus V2 ( D 1 ~ D 2 ) = V2 ( D 1 ) 4- V 2 ( D 2 ), and independent of translation:
~
,
,
,,
!!
Fig. B-3. Union and translation of regions
Appendix B
567
- Vectors and Matrices
thus V2 (D) = V2 (D'). If in particular D is a rhombus (2-dimensional parallelepiped), in its basic position D is determined by two vectors, say a~ and a2; let V2 (a~, a2 ) be the area.
. . . ;--
. ...-.;-
9
.,. ,.-
9, "
t
J
,,- "
i
al" a2
/" ,"
tl I
,"
,,
! Fig. B-4. Summation
of areas
Using the above two properties, by the arguments of elementary geometry and as illustrated in Fig. B-4, when a~ is replaced by a~ + a'~ with another vector a'~, if the arrangement is according to the figure then V2 (a~ + a'~, a2 ) = V2 (a~, a2) + + V2 (a'~, a2 ). Clearly, if k > 0 we have also V2(ka~, a2 ) = kV2(a~, a 2 ). But the volume (area) has to be nonnegative; thus generally, we introduce a function a such that V2(al,
a2)--
l a ( a l , a2)l
where, for example a (a 1 + a'l, a2 ) = ~ ( a l , a2 ) + ~ (a'l, a2 )
and cx (kay, a2 ) = kcx (a 1 , a 2 )
568
Material and Energy Balancing in the Process Industries
for any k. In addition, if al = a2 then the rhombus degenerates to a line segment whose area is null. Thus o~ ( a l ,
al)
= 0 .
The latter three conditions (formulated also with a 2 in place of a l ) imply that, by definition, (~ is a skew N-form according to (B.11.3), for N = 2. We finally normalize o~ by the condition Vz (el, e2 ) = 1
for a unit square of edges el, e 2 (unit vectors). Thus V2 (al, a2) = Idet(a~, a2)l 9 By similar but more elaborate arguments, one could obtain as well V3 (al, a2, a3 ) = Idet(al, a2, a 3 )1 for the 3-dimensional volume of a parallelepiped of edges al, a2, a3; by the way, it is a well-known formula. And again, the volume V3(~) of a 3-dimensional region R is independent of translation. Generalizing, the volume VN of a region in R N is introduced plausibly in the manner that it obeys the following conditions. If R and ~ are two regions in 1~N such that, for some fixed N-vector t (translation) x' e ! ( i f a n d o n l y i f x ' = x + t w h e r e x ~
R
(briefly: ~ = R + t )
(B.11.16)
then VN( ~ = VN( ~ ) ; further (normalisation condition) VN (el, "", eN ) = 1
(B.11.17)
for a cube of edges el, "", eN (unit vectors), generally VN (al, "", aN ) = Idet(a~, "", aN )l
(B.11.17a)
for a parallelepiped of edges a l , ... , a N . Without precizing the expression 'nonoverlapping', we state that the volume of two nonoverlapping regions is additive.
569
A p p e n d i x B - Vectors and Matrices
The N-dimensional volume VN is thus a measure on R N . Of course such definition could not satisfy a mathematician. The concepts of measure and integral are introduced carefully step by step, starting from certain general axioms. A special case is then the volume measure VN obeying in addition the axioms (B.11.16 and 17). Certain functions (a broad class, including those occurring in practice) are then integrable and one designates
f fdVN
(B.11.18)
R
the integral of function f over region ~ c R N ). The term dVN can be interpreted as an 'infinitesimal volume element' and the integral as a 'summation' of terms f(x)dV N (x) over x ~ R in accord with the intuition. In mathematics, the volume measure is called 'Lebesgue measure' and the integral 'Lebesgue integral'. Even if the reader is perhaps not a true-born mathematician, he need not be afraid of the name 'Lebesgue integral'. It is just the integral he knows from practice, only precised mathematically so as to include a broad class of regions R and functions f (for example not only continuous functions). At least intuitively, he then perhaps accepts also the following results. (i)
If t e R N is arbitrary and R N are the two regions in (B.11.16) obtained by translation t then f f(x')dV N (x') = f f(x+t)dV N (x) ; N R in particular if R -
RN
(B.11.19)
then the integral
f f(x)dVN (x) = dJ(x+t)dVN (x)
R~
(B. 11.19a)
is independent of translation.
(ii)
If A
= (a 1 ,...,
aN)
(B.11.20)
is N x N regular, R c R N , and N is determined by transformation of coordinates x' e 9( if and only if x' = Ax where x e R (briefly: ~ = Ag0 then f f(x')dVN (x') = [detA[ f flAx)dV N(x) . K R
(B.11.21)
570
Material and Energy Balancing in the Process Industries
Clearly, if R is the whole 1~N then also N - R N (the regular transformation does not change the whole space R N).
Mnemonically: Integrating over N in (B.11.19), x + t is substituted for x' and the volume element remains invariant by the translation. Integrating over K in (B.11.21), Ax is substituted for x' and any infinitesimal cube of volume d VN (x') is, due to the transformation, replaced by the parallelepiped of volume IdetA [dVN(x),with x ~ R. A transformation A (B.11.20) in (B.11.21) is called unimodular (volume-preserving) when [detA] = 1. In particular any orthonormal transformation, say A = Q is unirnodular because QQT= IN thus (detQ) 2 =(detQ)(detQ T) = 1 thus [detQ[ = 1. As a special case, imagine rotation in 3-dimensional space, preserving clearly the volume.
571
Appendix C DIFFERENTIAL
BALANCES
The description of industrial chemical processes, as adopted in this book, is based on traditional concepts of mass and energy conservation in terms of quantities such as mass- and energy flowrates of streams between the units (nodes) of the system. This corresponds to the process engineer's way of thinking and treating the information obtained from industrial measurement. When analyzing the process in more detail, the chemical engineer has to take into account the more detailed time- and space variability of quantities such as temperature, chemical species' concentrations, and the like; for example the concentration gradients are the driving force for diffusion, thus of separation processes. So at this more advanced level, also the conservation laws are expressed as (instantaneous local) differential balances.
C.1
M A T E R I A L CONTINUUM
Of course also the differential balances represent a simplification, based on the idea of a material continuum. The continuum is characterized by certain fields of scalar quantities (temperature, concentrations, ... ) and vector quantities (local velocity of mass flow, diffusion fluxes, ... ). Generally, the continuum is heterogeneous: the fields are continuous in any of the phases, possibly discontinuous at interfaces. Imagine a distillation or absorption column, or a heterogeneous reactor. Let us now consider one of the phases, thus a region in space occupied by a continuous multicomponent mixture. The 'actual' nature (molecular configuration) of the mixture may be little known" imagine, e.g., a liquid ionic solution with various degrees of dissociation, solvatation, etc. One then usually assumes that some equilibria (such as ionic equilibria) are installed very rapidly so that the (instantaneous local) thermodynamic state at a point of the mixture can be defined by the temperature, pressure, and mass (or mole) fractions of certain K components C~, ..., CK. The C k are some formal chemical species the concentrations of which can be (in some extent) varied independently: for example a solution containing H20, SO 2 , H2SO3, NH3, NH4OH , HSO3, ... can be defined as the system (H20, SO2, NH 3 ). Accordingly, possible chemical interactions (whose mechanism is again very often little known) are expressed in terms of some formal chemical reactions (stoichiometric balance schemes)
572
Material and Energy Balancing in the Process Industries
r = 1, --. , R:
K E VkrC k=l
k =
0
(C.1)
(Vk~> 0 for reaction products); see also Section 4.1. Let M k be the formula (mole) mass of species C k and wr the r-th reaction rate; thus M k Vk~W~ is, by definition, the amount of species C k produced (consumed if negative) by the r-th reaction per unit volume per unit time. Then the differential species balances read K-
1, . . . , K :
~)(PYk ) ~t
R = - div(py k v + Jk ) + MkZ VkrW r r=-I
9
(C.2)
Here, p is mass density and Yk the k-th mass fraction, t is time and div the divergence operator; v is local mass flow velocity (vector) and Jk the k-th molecular diffusion flux vector, added to the term pykv representing the convection of particles Ck by the motion of a material element as a whole. So the instantaneous local change (increase) of the Ck-Concentration (mass per unit volume) equals minus the amount that escapes from a volume element (the divergence term) plus the amount produced by chemical reactions. Physically, the balance makes sense if we know how the flux Jk depends on the gradients (most simply by Fick's law), and how the rates of possible reactions depend on the local state of the element. If also the latter information is available then the balance takes the form of convective diffusion equation, possibly with chemical reactions. [If we have no information on the reaction rates, the Wr-terms can be eliminated from Eqs. (C.2) by an algebraic transformation in the same manner as in Chapter 4; indeed, it is sufficient to substitute w~ for W~ in (4.3.2) and to define the components of column vector n as follows from (C.2).] Observe finally that we have Yl + "'" + YK- 1
(C.3)
and also Jl + "'" + JK = 0
(C.4)
for the relative transport of particles by diffusion, with respect to the total mass flow density vector pv. Because mass is conserved by the stoichiometry (C.1), K thus Z M k Vkr = 0, the differential mass balance k=l
Appendix
~P ~t
C -
573
Differential Balances
- - div(pv)
(C.5)
follows as a formal consequence from (C.2). We have of course not considered nuclear reactions, and for the sake of simplicity, nor the presence of electrically charged particles in the balances. So neither electric currents are admitted and let us preclude electromagnetic phenomena at all. Then the differential energy balance reads
(C.6)
= - div(p/~v + T.v + JH ) + q ^
where E is energy per unit mass. In the divergence term, the item due to convection is represented by pEv and the additional molecular flux of energy ('heat') is denoted as vector JH; in addition T is (second-order, symmetric) pressure tensor thus the product T.v represents the flux of energy on account of mechanical work against contact forces. The term q is source term due to radiation (radiation energy absorbed - if negative then emitted by unit volume per unit time). In gaseous or liquid media, the tensor T equals ^
T = PI + F
(C.7)
where P is scalar pressure (a thermodynamic state variable), I is unit tensor, and F is tensor of viscous friction; we adopt this simple form for any state of aggregation. The total specific energy can be decomposed
= E in + Epot + O
(C. 8) ^
into kinetic, potential, and internal energy U, a thermodynamic state function. We 1
u165per unit mass, and /~pot is potential of mechanical forces, 2 basically gravitation potential. Let us remark that the complete set of differential balance equations comprises also the (vector) momentum balance (pv can also be interpreted as momentum of a material element per unit volume); then the balance of/~kin -I- /~pot can be computed from the balance of momentum and by subtraction from (C.6), we have the 'net thermodynamic' balance of internal energy. On the other hand the balance of kinetic and potential energy, if integrated over a region through which the material flows (imagine a pipeline) takes the form of the well-known Bernoulli equation. In chemical engineering thermodynamics, for different reasons more familiar than internal energy is another function, viz. the enthalpy. The specific enthalpy (per unit mass) equals have
Ekin -" ~
574
Material and Energy Balancing in the Process Industries
/~-0+Pf'
((1= 1 ) P
(C.9)
where f' is specific volume. In the same manner as internal energy, /4 is a function of the thermodynamic state, thus in a given state of aggregation (phase) of the variables T (absolute temperature), P and the (K-l) independent mass fractions (say) Y2, "'", YK. We then introduce the partial specific enthalpies/4k by the equations ~/~
k = 2, ...
K
K:/4k-/4,'
^
and E YkHk --/~" /)Yk
k=l
(C.10)
'
the definition is independent of what species is considered the 'reference species' C~. This definition is related to the introduction of Yk as state variables. It is equivalent to the traditional definition for a uniform mixture by/4k = ~ H / b m k ; here, H is enthalpy of the mixture of ml, "" , mK kilo_grammes of species C~, ..., CK, respectively. For partial molar enthalpies Hk we then have the relation B
k=
(C.11)
l, 2, ... , K: Hk = Mkl?-Ik .
Note also that the mole fractions Xk are related to Yk by xk =
Yk
(C. 12)
K y~ 1=1 All m
hence given (for instance in thermodynamical tables) Hk as function of mole fractions, Hk is easily computed as function of mass fractions. The 'heat flux' vector Jn is then decomposed g
^
Jn : JQ + ~ H k J k
(C.13)
into 'net heat flux' jQ and the contributions of species flux vectors Jk, each 'charged' with partial specific enthalpy/4k, in correspondence with (C. 10)2. With (C.7-9) the whole energy flux vector in (C.6) equals g
pEv + T.v + Ju = p/4v + k=l Z H kJk + JQ+ P(/~kin + /~pot)V + F.v. ^
(c.14)
Appendix C - Differential Balances
575
In addition to the fluxes J k , also the flux jQ depends on the gradients; most simply (neglecting minor effects) only on the temperature gradient by Fourier's law of heat conduction. Finally the tensor F depends on the velocity gradients with viscosity as the coefficient of proportionality. Taking into account these relations, Eq. (C.6) represents the energy transport equation.
C.2
I N T E R F A C E BALANCES
Generally, matter can be adsorbed on interfaces, transported along interfaces (surface diffusion), and can undergo surface reactions. Also accumulation of energy on interfaces is theoretically relevant due to interface tension. All the named terms come into consideration in detailed analysis of interface phenomena, and also in technological processes including adsorbers and heterogeneous reactors. An interface balance is then formulated per unit area of the interface; neglecting the surface transport, it takes the form increase in accumulation quantity transported from both sides towards the interface + quantity generated on the interface
(C.15)
per unit area per unit time. In such cases, the interface can also be regarded as a very thin threedimensional region and the balance is then formally an integral of the correponding differential balance equations. Let us consider explicitly only the case when the interface phenomena can be neglected. Denoting, at a point of the interface possibly moving with velocity v~ j = p(v
-
(C. 16)
VI )
we have [j]2 .n = 0
(C. 17)
where n is unit normal vector to the interface, oriented from phase 1 to phase 2, and where generally []]~ = f2- f~ is difference between values f2 in phase 2 and f~ in phase 1. Hence j.n is simply mass flowrate through unit interface, and we have the balances k : 1, -.. , K"
[Yk ]21 j.n + [Jk ]21 .n - 0
(C.18)
[if/j2 j.n + ~H ]~ .n = 0
(C.19)
576
Material and Energy Balancing in the Process Industries
with (C.13). In case of adsorption, the zero on the RHS of Eq. (C.18) is replaced by (-dmsk ~dr) where msk is mass of species Ck adsorbed per unit area, and in the presence of surface reactions, we there have in addition a term qk representing mass of species Ck produced by the reactions per unit area per unit time; the term qk is of analogous form as the last RHS-term in (C.2). Here, we have neglected the difference (C.17) in the total mass flow through the interface.
C.3
T H E R M O D Y N A M I C CONSISTENCY
The reader may have noticed that in the energy balance, there are no terms due to 'heats of reactions', or 'heats of mixing'. This corresponds to the rigorous thermodynamic formulation of the balance, where the 'latent heats' are included in the definition of the enthalpy (or internal energy) function. The enthalpic data given in this manner are called thermodynamically consistent. As is well known, in thermodynamics an energy can be determined only to within a constant; then only the energy difference is unique. The problem is dealt with in detail in textbooks of chemical thermodynamics. The underlying idea is that any chemical component can be made up from the elements; one then puts equal to zero the enthalpy of any element at its (conventional) standard state (say, temperature TO, pressure P0, and a state of aggregation in which the element is stable at TOand Po ). If the chemical formula of species Ck contains %k atoms of element Eh then the formal chemical reaction reads -
E (~hkEh + Ck = 0
h
(C.20)
and the isobaric reaction heat (supplied to produce one mole of C k at the same TOand P0 and in a corresponding stable state of aggregation) equals the standard molar enthalpy__H{k~ of C k as given in tables of thermodynamic functions; thus /)k~~ -- (1/M k )HkC~ is the standard specific enthalpy of C k . One then chooses a thermodynamic path starting from Yk kilogrammes of C k (k = 1, .-. , K) at (To, P0 ), and ending at the given state of the mixture with mass fractions Yk of K C k . Hence the final specific enthalpy/) equals Z Yk/t~o} plus sum of increments k=l due to change in temperature from TO to T, in pressure from Po to P, possibly also to phase transitions (melting, evaporation), and to mixing. The order of the increments is not necessarily unique, but their sum is independent of how the path has been chosen. We can for example proceed at constant pressure P0, divide the temperature interval according to the points where the phase transitions and mixing take place, and integrate the relation
Appendix C - Differential Balances
OT
-
c
3'/'/
(C.21)
P
where Cp is isobaric specific heat, first for any component separately before the mixing, then for the mixture. In addition the relation
~P
(c.22)
- f'- T~ ~)T
(with thermal expansivity ~)f'/~T) is integrated from P0 to P. In certain cases, the thermodynamic path can be made shorter. In particular in absence of chemical reactions among the components Ck we can put directly "-k~rr176 0, more generally at least for any ('inert') component not participating in any of the reactions. We can also select a 'basis' of components such that any other component can be made up from the basis; then the partial specific enthalpies equal zero for the basis, and if some remaining component Ck arises by formal chemical reaction (C.23)
- ]~ f~ikBi + Ck = 0 i n
the components of the basis) then Hk~~ is put equal to the standard isobaric heat of the reaction. For example in the gaseous mixture (N 2 , 02 , SO 2 , SO 3) we can take ffi~ 0 for B i -- N 2 , 0 2 , SO2, and/4k~~ -- (1/M k ) Hk~~ for C k - SO 3 , where Hk~~ is standard molar heat of the reaction - SO2 - 1/202 + SO3 = 0. This ideal scheme has often to be simplified rather drastically, according to the data actually available or to make simpler the computation. For instance the increment due to the relation (C.22) is neglected at least under moderate pressures. Also the heat of mixing can be neglected at least for mixtures of weakly interacting components (nearly ideal mixtures). Thus for example in the gaseous mixture (air, water vapour) we can regard air as component C1, C2 = H20, and at (T, P) where P does not differ substantially from atmospheric pressure, we have approximately (B i are
/4 = (y, Cp, + Y2Cp2) (T- To ) + Y2L~~
(C.24)
Here, Cpk is isobaric specific heat of gaseous C k (approximated by a constant),
and/,~0~ is heat of evaporation of H20 at (TO, P0 ). [To be precise, if for example TO = 273 K and Po is normal atmospheric pressure then the value of/,2~~ is, in fact, extrapolated because liquid water is not in equilibrium with its vapour at these conditions; such extrapolated values are quite common in thermodynamic tables.]
578 C.4
Material and Energy Balancing in the Process Industries
EXACT INTEGRAL BALANCES
Let R be a finite region in space, b R its boundary. The boundary is oriented by the choice of the unit normal vector n at any its point; we take n directed outwards from R as is the usual convention in mathematics. The region R may be one phase of a multiphase system (e.g. liquid in an absorption column), an apparatus or a section of it, possibly also a larger set of apparatuses or a whole chemical plant. Thus generally, Rcan be decomposed into subregions of individual phases (material continua) separated by phase boundaries (interfaces). At a given instant t, we can formally integrate the differential balance equations over each of the phases, taking into account the interface balance conditions of Section C.2. We shall not describe the mathematical details; for simplicity, let us regard also the interfaces as certain thin layers, as remarked below the formula (C.15). We thus obtain the integral balance of species C k dmk ( ~
dt
R = - : (YkJ' + Jk ).ndS+ M k Z vk, W, ~99~t) r=l
(C.25)
and the integral energy balance
dE(90 dt
=- f (/~j'+ T.v + Ji-i).ndS + f qdV ~9~t)
(C.26)
~t)
With the notation introduced in (C.2 and 6), we designate further mk (R) mass of species Ck contained in Rand E(R) total energy contained in R. The region R, thus also its boundary can be variable in time (imagine moving droplets or an agitator), hence we write ~ t ) at time t. We have designated j' = p(v- v')
(C.27)
where v' is the local velocity with which ~Rmoves. The surface area element is dS and the volume element is dV in the integrals. We have denoted (C.28)
W r = f wrdV R
the integral r-th reaction rate. Recall also the equality (C.14), hence K
/~j' + T.v + Jn =/qJ' + ~ink Jk + Jo +
(J~kin-I-/~pot)J' q" Pv'
-I-F.v.
(C.29)
Appendix C -
Differential Balances
579
The balance (C.25) has the obvious form of a conservation law with source term. With the minus sign at the integral it means that the increase in mk equals the quantity transported into R across the boundary plus that produced by chemical reactions, per unit time. The jk-term can be relevant at a permeable boundary; imagine Ras liquid phase in a distillation column, thus j'.n represents total mass transferred per unit area and jk.n is due to molecular diffusion of species Ck. In the balance (C.26), the situation is more complex. With (C.29), the first three RHS terms represent heat transferred by convection and diffusion with heat conduction, in the same manner as above; the jQ-term occurs even at an impermeable boundary (wall). If a part of ~9~t) is a fictitious boundary (imagine the cross-section of a pipeline limiting the system), the most relevant term is /qj'.n, enthalpy transported across the boundary by the streaming material; recall the example (C.24) comprising 'latent heat' L~~ The items due to (/~kin q- J~pot) can often be neglected. Finally the term Pv'.n represents, when integrated, the volume work, and the term (F.v).n the work due to friction; imagine a compressor. Now even if we have reliable and precise thermodynamic data, the latter items are never precisely known in practice. Though exact theoretically, in practice the energy balance is never exact; recall in addition the jQ.n term at not-perfectly insulated walls causing heat losses, and the frequent uncertainty in thermodynamic data. Putting up with this impreciseness, let us give an example of simplified integral balances. Let us consider R as a set of one or more apparatuses (a production unit) in steady-state operation. Hence the left-hand sides in (C.25 and 26) equal zero. The boundaries of R can schematically be divided into impermeable walls (W), inlets and outlets (,ofi ), and free boundaries (such as the surface of liquid in a vat), plus some randomly distributed permeable boundaries and leaks. The latter three items cause material losses and uncontrollable mixing with the surroundings; for simplicity, they can be considered as some fictive inlets and outlets. So let us decompose the oriented boundary I
~ R : W-k- ]~,(~i i=1
(C.30)
where the algebraic sum takes account of orientation. We thus have j'.n < 0 at inlets, j'.n > 0 at outlets, j'.n - 0 at walls. If a larger system is composed of several subsystems where outlet ,ofi becomes inlet ,ofi., we have ,~i = -,ofi, and the flows j'.n cancel on ,YJi + '~i.-For example
Material and Energy Balancing in the Process Industries
580
mainly walls 'l,(J ( also leaks .... )
1
I"
"x.. \
l ...... subsystem
subsystem
[1.... / J
pipes
(-)
.A "~
-"
k "-
CI)
Fig. C-1 Decomposition of oriented boundary
Note that the complex balance of a larger system of units is set up just according to this input/output scheme. At a fictitious cross-section the system is cut, and the stream parameters refer to this cross section (our ,JJi ). The molecular fluxes JR can be significant at free surfaces (imagine evaporation). For simplicity, let us however neglect the molecular portion of transport at the '~i. Denoting i = 1, .-., I:
Ji = f J'.ndS
(C.31)
(outwardly oriented total mass flowrate through
k-1,...,K i - 1, ..., I:
1
y~ =
f ykj'.ndS Ji
I
1 ... '
'
K:
with (C.28).
at ,(~Ji) we have R
Z y~ Ji = Mk 2; Vkr Wr
i=1
(C.32)
ff)i
(average mass fraction of Ck k-
'(fi ) and
r=l
(C.33)
A p p e n d i x C - Differential Balances
581
In a similar manner, the steady-state total energy balance is obtained. On the walls, we have j ' . n = 0 and jk.n = 0 (impermeability). The system may comprise moving parts (such as pumps and compressors), but the inlets and outlets will be assumed at rest; thus v' = 0 at , 0
(D.3)
586
Material and Energy Balancing in the Process Industries
and in fact, qs > 0 for any natural process. The equality qs = 0 holds true only if the material element is in equilibrium, which is a hypothetical limit state where 'nothing happens': all processes (heat conduction, diffusion, chemical reactions, 9.. ) have vanished (or, in an abstraction, are 'infinitely slow'). Our aim is not to introduce the reader into the field of thermodynamic theory, its historical development and problems. The latter are numerous, starting from the general definition of entropy itself. We shall simply assume that the thermodynamic state functions are those found in tables, or computed using the classical thermodynamic relations. For example we have the relations
~S
Cp m
OT
~)P
T
--
~T
(D.4)
(D.5)
where, as in Appendix C, T is absolute temperature, Cp is isobaric specific heat, P is pressure, and V is specific volume of the mixture. The partial specific entropies Sk obey analogous relations as (C.10), with S in lieu of/-). Again, as (independent) thermodynamic state variables are considered T, P, and Y2, "", YK (mass fractions). In the same manner as in Section C.3, we can find thermodynamically consistent entropy values starting from standard states and following a thermodynamic path up to the actual state. But if the availability of the data can have been prohibitive in the case of enthalpies, the less available or reliable can be the data on entropies. This remark concerns in particular the entropies of mixing, or also standard reaction entropies. More common in classical thermodynamics is the function
(; -/-)- TS
(D.6)
called specific (Gibbs) free enthalpy (energy), or rather the same quantity expressed on the mole basis, and its derivatives; clearly, knowing (~ and/-), we know also S. In recent years, the availability of thermodynamic data has increased considerably thanks to the use of computer programs, based on semiempirical thermodynamic state equations. Also theoretical quantum-mechanical methods based on solutions of the SchrOdinger equation have proven useful, at least for gases and crystalline solids; the values are sometimes considered more accurate than those obtained experimentally.
Making use of the thermodynamic relations and differential species and energy balances, the entropy production term qs can be computed explicitly in
Appendix D - Differential Form of the 2nd Law of Thermodynamics
587
terms of the individual fluxes and gradients of thermodynamic state functions, and chemical reaction rates. In this manner, individual items causing the production of entropy can be specified. It turns out that the most relevant items are due to flow of heat under gradients of temperature, diffusion under concentration gradients, chemical reactions under chemical nonequilibriun (nonnull affinities), and viscous friction under gradients of velocity (shear flow). These processes are called irreversible. In a rather intuitive than logically precise manner, it can be shown (cf. Chapter 6) that the irreversible processes represent a 'dissipation of energy', thus some transformation of energy into a 'less noble' form, less available for further exploitation. In nonequilibrium thermodynamics, the product
d = Tqs
(D.7)
is introduced as the dissipation function. The name is justified by the fact that it is a generalisation of the Rayleigh dissipation function introduced in hydrodynamics. Indeed, the general expression for qs written explicitly as mentioned above contains the term qsf due to viscous friction, and the product Tqsf equals just the Rayleigh function representing the dissipation of energy. In a streaming medium, this dissipation decreases the pressure in the direction of flow, and/or transforms the (macroscopic) kinetic energy into kinetic energy of molecules, thus into 'heat'.
From the individual entropy production terms, let us give the explicit expression of the term qsh due to heat flow; it reads 1
qsh = -
T
Jo.g radT
(D.8)
where jQ is 'net heat flux vector' as introduced in (C.13). If there are no other sources of dissipation, thus if qs - qsh then, by virtue of (D.3), qsh > 0; hence heat cannot flow in the direction of increasing temperatures, which is one of the traditional formulations of the 2 nd Law. The differential form of the 2 nd Law is important mainly as a theoretical base for (so-called) nonequilibrium thermodynamics (thermodynamics of irreversible processes). Some direct information can be drawn from the integral expression. A rigorous integral entropy balance can be obtained on integrating formally the 'balance' (D.2) over a region R, in the same manner as in Section C.4. We shall give only a simplified expression. Considering again the region R as a set of one or more apparatuses in steady-state operation, we shall decompose the oriented boundary OR according to (C.30), and neglect again the molecular transport terms at inlets and outlets (thus JQ - 0 and Jk = 0 at '(Pi ). We then introduce (cf.(C.32 and 34)) the averaged specific entropy on ,7Ji
Material and Energy Balancing in the Process Industries
588
1 i-
1, ..., I:
,~i _
f Sj'.ndS
(D.9)
Ji ,~)i
with (C.27) and (C.31). We also neglect the radiation energy transfer in region R Then the integral entropy production rate in R Qs - f qs dV R
(D. 10)
equals I ^.
1
Qs - Z S~Ji + f i=1
W
- - JQ
T
.ndS
(D. 11)
and can be computed, if thermodynamic and process data are available. The value of Qs can be regarded as an integral measure of irreversibility in the whole region R In Chapter 6 we give examples of its use in a thermodynamic analysis of a technological process.
D.1
RECOMMENDED LITERATURE
This appendix, as well as the preceding one, deal with topics that usually stand as an introduction to (nonequilibrium) thermodynamics of continuous media. The ideas as presented here are mainly due to a textbook by Haase (1963) where continuum (nonequilibrium) thermodynamics is conceived as a natural extension of the classical one. We consider useless to cite more of the vast literature on the subject, and the theoretical disputations about the concept of entropy. R. Haase (1963), Thermodynamik der irreversiblen Prozesse, D. Steinkopf, Darmstadt
~89
Appendix E PROBABILITY AND STATISTICS
We suppose that the reader is familiar with the basic concepts of probability and statistics. It should be noted that although applied statistics is a very pragmatical discipline, its theoretical base (the probability theory) is surprisingly abstract. We shall not, however, start from the fundamental concepts of probability space and probability measure. Rather, we will rely upon the reader's intuition conceming the notion of probability itself. In this book, we are interested in probability on vector spaces (spaces of several numeric variables). At a slightly advanced level, let us begin with the concept of a random vector variable. The reader is recommended to peruse Appendix B, in particular Sections B.9-11.
E.1
RANDOM VARIABLES AND THEIR CHARACTERISTICS
The reader may recall the well-known normal (Gaussian) distribution of a random variable. As a simple example, let random vector variable X take its values (x 1 , x2 ) in two-dimensional space R 2 , and let us consider the (so-called) standard normal distribution. Then the probability that Xl is found in the limits a 1 _< X1 _< b 1 and, at the same time, a2 < x2 < b2, equals 1 b, ] 2x
~b~exp(- ~ 2
a2
~
2
) d x l dx2, 9
observe that using the equality -~-oo
exp(-t 2 )dt = rt 1/2
(E. 1.1)
-OO
the above integral (probability) equals 1 if a~ = a 2 = -oo and b 1 = b 2 = + 0 % thus when integrating over the whole space R 2. The latter case is a 'sure event': (Xl, x2 ) is certainly in 1~2. Instead of the twodimensional interval, one can consider an arbitrary region D c 1~2; we then integrate over the region (area) D to obtain the probability (of the event) that (Xl, x2 ) is found in D.
Material and Energy Balancing in the Process Industries
~90
Let us generalize. In terms rather intuitive than precise mathematically, a random variable X is an element of a given (say, N-dimensional) vector space V, which can take different values in the manner that, whatever be a region
D(c V), P{X e D / = Ifx dVN
(E.1.2)
D
is the probability that the (vector) value of X lies in region D. Here, d VN is N-dimensional volume element (Lebesgue measure, as mathematicians put it), and the function fx is the (joint) probability density defined on V, associated with random variable X and obeying the conditions fx > 0 on V
(E. 1.2a)
and fxdVN - 1.
(E. 1.2b)
Hence the probability cannot be negative, and the probability that the value of X is found somewhere in V equals unity. Moreover, let us adopt the condition that the function fx is (not only integrable, but also) 'sufficiently small at infinity'; see (E.l.10a) below. [On the other hand, we do not require fx to be continuous.] In this manner, the randomness of variable X is quantitatively characterized by the joint probability density fx. The probability is distributed according to the integrals (E.1.2). The law (E.1.2) is also called the probability distribution of random variable X: The probability (of the event) that the value of X is found in D is determined by a well-defined integral over D. For a random vector variable (with N > 1), the distribution is called multivariate. It is rather a philosophical (onto- and epistemological) problem (and a very deep one), what is the probability. For a mathematician, the probabilistic concepts are introduced axiomatically and the laws are consequences of the axioms.So does also theoretical statistics, on introducing further concepts idealizing the (physical, industrial, economic, ... ) reality. [In practice, the abstract theory is tacitly forgotten and replaced by routine formulae.] In this book, we can manage with a limited number of theoretical concepts. The basic ones are the following. Generally, if g is a function defined on V, let g(X) be the (random) variable associating the value g(x) with any value x of X in vector space qZ. Then the integral mean value of g, with density fx, equals by definition E(g(JO) = I g(x)fx (x) dx
(E.1.3)
591
Appendix E - Probability and Statistics
so long as the integral exists. Recall that the density fx is normalized by the condition (E.1.2b). Here, the integration is over the whole V (omitted in the notation by standard convention), and for convenience, we have written dx instead of dVN; the reader can imagine the more traditional dx~ dx 2 ... dx N if V = R N, and the classical N-dimensional integral in the limits from - ~ to +oo. The symbol (operator) E is called expectance; the symbol E is standard and recalls the traditional name going back to the history of the concept. More precisely, one should write E x because the definition of the operator as presented depends on the random variable X with joint probability density fx ; see the remark at the end of this section. The function g can be vector valued, or also represent a matrix; thus if gij is ij-th element of g then E(g(X)) is matrix of ij-th element E(gij (X)). By (E. 1.3), the operator E is linear; thus if kl and k2 are two real numbers and g~, g2 two functions of X then (E.1.4)
E (kl g, (X) + k2 g2 (X)) = kl E(gl (X)) + ke E(g2 (X)). Let in particular g be identity thus g(X) - X. Then the N-vector E(X) = J" xfx (x)dx
(E.1.5)
is called the mean of random variable X. Thus if Xl
E(X1 )
9
x =
9
9
then E(X) =
9
,
(E.1.6)
9
XN
E(XN ) where E(X n ) = j Xnfx (x)dx ;
hence computing E(X n ), in (E.1.3) we set g(x) assigns to x its n-th component. Let us designate
(E.1.6a) =
x n
(n = 1, 9.., N) and this g(x)
X1 ~
E(X) = x =
~
XN
which is a constant vector, and let
g(X) = ( x - ~ ) ( x - ~)~ ; hence g(x) is symmetric matrix of ij-th element
(E.1.7)
592
Material and Energy Balancing in the Process Industries m
gij (X) "- (X i - Xi) (Xj - Xj ) thus g(x) - (x-
Then F x = E ( ( X - ~ ) ( X - ~)v)
(E.1.8)
is called the c o v a r i a n c e m a t r i x of r a n d o m variable X, with elements
Fx,ij - f (x i - x'-i ) ( X j - ~j ) f x
(x)dx.
(E.1.9)
T h e i-th diagonal e l e m e n t is denoted by
(YXi2= Fxii"
(i ' _ l, .. , N)
(E.I.IO)
w h e r e w e have the c o n d i t i o n
02i < +oo
(E. 1.10a)
u n d e r w h i c h also the integrals (E.1.6a) and (E.1.9) exist as real n u m b e r s . T h e e l e m e n t (E. 1.10) is called the v a r i a n c e of the i-th c o m p o n e n t , and its square root CYxiis its s t a n d a r d deviation. Generally, the ij-th element (E. 1.9) is called the ij-th c o v a r i a n c e cov(Xi, Xj ). Generally, the matrix Fx is positive semidefinite. Indeed, if y is an arbitrary (constant) N-vector then, by the linearity of operator E ya-Fx y = E(yT (X_~)(X_~)Vy)) = E((yT (X_~))2) > 0
(E.I.ll)
according to (E.1.3) with (E.1.2a). Observe that by (E.1.2b), fx must be nonnull thus positive at some points of 'V. So as to avoid arguments of the general measure theory, let us admit only such probability densities fx that fx > 0 at least in some N-dimensional interval cj where fx is continuous; this is always the case in practice. Let now yT Fx y = 0 for some y ~: 0. We then have a fortiori ,(j
(yr (x_~))2fx (x)dx = 0
thus, the integrand being continuous in :cj, we have ya- (x-x) = 0 for any x e cj. But then, as y ~: 0, the vector components of x - ~ where x ~ cj would be restricted to the intersection of a vector subspace of dimension N-1 with ~, which is absurd. More sophisticated arguments of the measure theory would show that there would be no function
Appendix E- Probability and Statistics
593
fx obeying the conditions (E.1.2a and b). The probability (E.1.2) would then be expressed by a more general measure, not derived from the canonical volume (Lebesgue) measure. With respect to that measure, one could then show that the components of the random variable X-~ would be almost everywhere linearly dependent; in other terms, the probability that yT(X-~) r 0 then equals zero. Thus if the random variable X admits of a probability density according to (E.1.2) then the covariance matrix (E.l.12)
Fx is positive definite ;
see Appendix B, Section B.9. Let us consider the random variables X1, "", XN (components of random vector X); see (E.1.6). Then the variance 2 -- E ( (Xi-xi)2 ) O'Xi
(> 0)
(E.l.13)
(also called the dispersion of X i ) represents, in mathematical abstraction, an expected averaged 'sum of squares' of deviations Xi- xi from the mean value that can be found when taking a great number of randomly selected 'samples', thus realisations of random variable Xi. The standard deviation (Yxi(> 0 ) i s a measure for the magnitude of the deviations. The covariances m
m
m
cov(Xi, Xj ) - E ((Xi-xi) (Xj-xj) )
(E.l.14)
for i r j, if nonnull, indicate that the variables X i and Xj are correlated. In the statistical mean, for instance if cov(X i , Xj ) > 0 then a positive deviation of X i is accompanied by a positive deviation of Xj, or both are negative. On the other hand, if cov(X i , Xj ) = 0 then X i and Xj are uncorrelated
(E.l.15)
according to the statistical terminology. From the standpoint of practice, uncorrelated variables can be regarded as 'independent'. It is not so when the rigorous definition of statistical (probabilistic) independence is taken into account. Only conversely, if (we assume that) the variables are independent then they are also uncorrelated. Of particular interest is the case when all the (component) variables X i are independent. The definition of the independence is equivalent to the assertion P {X1 < a l , X2 < a 2 , - " , XN < aN ) = P{X1 < al ) P {X2 < a2 ) "" P {XN < aN } (E.I.16)
594
Material and Energy Balancing in the Process Industries
whatever be real numbers a~, . . . , aN. On the LHS is the probability that
simultaneously, the value x~ of X i is xi < ai for i = 1, .--, N. It then equals the product of the probabilities that x~ < al (whatever be the other components' values), x2 < a2, ..., XN < aN. According to (E.1.2), a sufficient condition reads fx (Xl, "'" , XN ) = fl (Xl)f2 (X2) "'" fN (XN) where for i = 1, ... , N "fi (Xi) ~ 0 and
(E.l.17) (E.l.17a)
-4-oo
J"fi (x~) dx i = 1
(E. 1.17b)
-oo
thus fx can be factorized (decomposed into factors) as written. Indeed, the LHS in (E.l.16) then equals the product ai
aN
( !f~ ( x , ) d x l ) . . . (IfN(XN)dXN) -oo
-oo
where
-oo
>
= j
...
I f x <x, , "
,
> d x , ...
-oo<xi 0, hence for some nonnull y r KerA T we have yT F v y = 0. Hence, as stated in the text following after formula (E.I.11), the random variable Y does not admit of a probability
596
Material and Energy Balancing in the Process Industries
density with respect to the canonical volume measure. This is clear also directly: the points of R M where y = Ax + b lie in a set (linear affine manifold) of lower dimension (L = rankA = dimlmA) than M. Of course we suppose here that the functional dependence (E.1.21) is deterministic: all values y of Y do obey y = g(x) where x is some value (realisation) of the random variable X. If rankA = M is full row rank, one can also show that there exists some probability density fv. The proof is based on the transformation (B.10.31) thus in the present case
(E.I.25)
AQ = ( A + , 0 ) } M
M
N-M
where A + is M x M regular, with orthogonal N x N matrix Q. One first transforms
(E.1.26)
z=y-b=Ax. Then, given a region Dz in R M, ze
(E.1.27)
Dz if and only if x ~ DQ
where Do is the set of vectors x such that x=Q(
Bz /
w h e r e z ~ Dz
z0
and where z 0 e ~N-M is arbitrary;
(E.1.27a)
here,
B = (A+)".
(E. 1.27b)
Denoting by Z the random variable Y-b, the probability
(E.1.28) is computed according to (E. 1.2) where D = DQ, using density fx. The integral is computed using standard transformations; see (B.11.21). By Q-l, one transforms the integral in the manner that integration over z0 e R T M in (E.1.27a) is performed in the first step, giving a value independent of z0. One then transforms the remaining M-dimensional integral by B 1 = A+. One obtains
(E.1.29)
P {Z (~ Dz} = J'fz(z)dz Dz where
fz(z) = [detBlj" l~ TM
fx(Q
("z/
)dzo
(E.1.29a)
Z0
is the joint probability density for Z, by definition; here, IdetBI is absolute value of the determinant of matrix B (E.1.27b), while IdetQI = 1 because
Appendix E - Probability and Statistics (detQ) 2 = (detQ) (detQ T ) = det(QQ x ) = 1
597 (E.1.30)
for any orthogonal transformation Q. Integration over Dz = 11M gives the value 1, in accord with (E.1.2b). And we finally set
(E. 1.31)
fv (Y) = fz (y-b) by simple translation of the origin in RM; see (B.11.19).
Remark
With the exception of several fine-printed details, our aim was to avoid the more abstract concepts of probability theory. In the theory, one starts from the construction of a probability space and probability measure on the space. The elements (or rather parts) of the space represent some 'primary events', and the (abstract) integral, thus measure of a part D of the space is the probability of the event D. A random variable is then a (numerically evaluated) consequence of the 'primary cause',thus a numeric function (hypothetically) defined on the space, and its integral over the whole space is the mean. The space is generally not some N-dimensional space of vector components, it can be infinite-dimensional or even constructed by a quite abstract, mathematically formal procedure (axiomatically); nor the measure then admits of a 'geometric' interpretation as an N-dimensional volume. In this section, we have not examined the nature of the 'primary' events and we have started pragmatically from an N-dimensional space of real values (components of vector X) that can be identified for instance by some measurement. Formally,the vector space 1~N is thus the probability space and the probability measure is fx dVN in (E.1.2). It should be noted that even in practice, such concept need not suffice generally. It will suffice in the chapters dealing with reconciliation of measured data.
E.2
SPECIAL PROBABILITY DENSITIES
The construction of probability densities is possible theoretically, but it is not always easy to verify the theoretical hypotheses in practice. Then, it is rather a matter of intuition. Let us assume that we have no other information than that the values x i of random variable Xi will obey the condition ai < xi < bi
(a i < b i ) .
(E.2.1)
It is then possible to assign equal probability to any value in the interval, and zero outside of the interval. Thus
598
Material and Energy Balancing in the Process Industries
bi
P {a'i
bi
or a'i> bi.
(E.2. la)
Thus if '~N is the N-dimensional interval of points obeying (E.2.1) for i - 1, ..., N, the N-variate joint probability density (assuming the X~-variables independent) is clearly N fx (x) = rI i=1
1 for x ~ iC/N
(E.2.2a)
bi - ai
(H means product) and fx (x) = 0
for x ~ 'qN 9
(E.2.2b)
Thus if X is the random variable of components Xi (i = 1, -.., N) then 1
E(X1. )
E(X) =
i
where
E(Xi)
-
2
(ai § bi )
(E.2.3)
E(XN) and F x - diag(c~2~, ..., (y2N )
(E.2.4)
where 2 (YXi--
1
12
(b i
_
ai
)2
.
(E.2.4a)
The probability distribution (E.1.2) with (E.2.2) is called uniform. Notice that it provides an example of joint probability density that is not continuous at the limits of the intervals (E.2.1).
Appendix E
-
Probability and Statistics
399
Among the probability distributions of measurement errors, the most important role plays the normal, or Gaussian (or, to be fair historically, Laplace-Gauss) distribution. It can be derived in different manners starting from certain elementary hypotheses (relying, in the end, on intuition) and in the simplest form, it leads to the conclusion that the probability density decreases exponentially with the square of the error. Along with the plausibility, the distribution has a number of agreeable properties, for instance that (considering only one scalar random variable) the probability density is determined by two parameters only: the mean and the standard deviation (or covariance matrix in general multidimensional case). If adopted, it leads to many other theoretical consequences and, finally, routine formulae used in practice. Let us summarize the most important properties of the distribution. Considering again an N-dimensional random variable X as in Section E. 1, the probability density fx denoted as f for simplicity has the form 1
f(x) = k exp(-
s q(x)) 2
(E.2.5)
R ( x - a) ;
(E.2.6)
where q(x) = (x
- a) T
here, R is a symmetric positive definite N x N matrix, a a constant N-vector, and k a scalar constant. Using this general form off(x) and the assumption that f is a probability density fx, it can be shown that a = E(X)
(E.2.7)
is the mean, R = Fx 1
(E.2.8)
is the inverse of the covariance matrix, and k = (2rt)-(Nm(detFx)-v2 where detFx is the determinant of matrix F x ; i n
(E.2.9) particular if R thus Fx is
diagonal with elements (E. 1.10) then 2 (YX2 2 " .. o2N detFx = oXl
(E.2.9a)
600
Material and Energy Balancing in the Process Industries
The results (E.2.7-9) are well-known; let us only outline the proof. One makes use of the formula (E.I.1) from where, integrating by parts 4-oo
J" t exp(-t 2 )dt = 0
(E.2.10)
-oo
and +oo
1
flexp(-fl)dt = ~ -co
n '/2 9
(E.2.11)
2
One substitutes y = x- a.
(E.2.12)
By translation (E.2.12), the integrals over R N remain unaltered. We have thus to compute the integrals 1
1
I0 = I exp(- 2 yr Ry)dy
[ = --~ I f(x)dx ]
(E.2.13)
[=~
(E.2.14)
(N-vector) 1
11=Iyexp(-
- yVRy)dy 2
k
E(X- a) ]
(N x N symmetric matrix) 1
12 = j" yya- exp(- 2
1
yr Ry)dy[ -
k E((X-a) (X-a) r ) ].
(E.2.15)
Let Q be some orthogonal matrix (B.10.8) diagonalizing R (B.10.26) thus
(E.2.16)
Qr RQ = diag(rl, ..-, rN ) ;
if R happens to be diagonal, one puts Q = I N(unit matrix). The following transformations are standard. Denoting
1
N
2
h(u) = exp(- - ~ i ~ ri ui )
"
where u = UN
we obtain, by the invariance of the integral with respect to the transformation u = Q-ly (=Qry) N
I0 = H
+0"
j" exp(-
i = l -00
1 T
2 )dui ri u i
=
(2n) Nt2(rl
r2 "'" rN
)-1/2
(E.2.17)
further Q-1 il = ~ uh(u)du = 0
(E.2.18)
601
Appendix E - Probability and Statistics because in the i-th component, we have a product of integrals where the i-th equals +~ I
U i
1
exp(- 2
ri ui2 )dui
(E.2.19)
= 0
-oo
by (E.2.10), and 1
Q-112 Q = ~ uu T h(u)du = I 0 diag(
1 ,
. . ., .
rI
).,
(E * 2 . 20)
rN
here, the ij-th element of the matrix equals zero if i ~ j because in the product of onedimensional integrals, we then have (even) two integrals (E.2.19), for i and forj instead of i, and the ii-th (diagonal) element is product of N-1 integrals +oo
1
I exp(- --~- rj uj2)duj
(j ~ i)
-oo
and of the factor +oo
1
I ~ exp(- ---~- r i U 2i )dui -oo
where we use (E. 1.1) and (E.2.11). According to (E.2.16) where IdetQ] = 1 (cf. (E.1.30)), we have
(E.2.21)
rl rz "-- rN = detR. Using (E.2.13), by (E.1.2b) we have 1
k-
.
(E.2.22)
Io According to (E.2.18) with (E.2.14), E ( X - a) = 0; hence E(X) = a, which is (E.2.7). According to (E.2.20) with (E.2.15) 1
Fx = klo Q diag( ~ , r!
1
... , ~
)
QT
=
R-l.
rN
see (E.2.16) where (QV RQ)-I _ QT R-i Q. We have thus proved (E.2.8), and according to (E.2.21) detFx = (rl r2 --. rN )-i from where in combination with (E.2.17) and (E.2.22)follows (E.2.9).
602
Material and Energy Balancing in the Process Industries
A variable X obeying the law (E.1.2) with fx = f by (E.2.5) is called Gaussian. Let thus X be Gaussian and let us consider the random variable (E.2.23)
Y - g(X) where g(x) = Ax + b ;
A is M x N matrix and b constant M-vector. We know that if A is not of full row rank then Y does not admit any probability density (E.1.2); see the fine-printed paragraph following after (E.1.24). On the other hand, assuming full row rank, thus rankA = M
(E.2.24)
it can be shown that the distribution of Y is normal (Gaussian). We can use the result (E.1.29a) with (E.1.31). The random variable
w = x- ~
(~ = E(X))
(E.2.25)
is again Gaussian and has the probability density fw (w) = k exp ( - ~
1
(E.2.26)
w TR w ) .
2 We have, for any value y of Y
(E.2.27)
y = A w + c where c = Ax + b thus
fv (y) = fz (y-c)
(E.2.28)
where
fz (z) = IdetB [_j..fw (Q -
/Bz/
(E.2.28a)
) dzo
ZO
according to (E.1.29a); here, Q is an orthogonal matrix transforming A by (E.1.25), and B is the inverse matrix (E.1.27b). We thus set
w= Q
/Bz/
where z = y- e
(E.2.29)
z0 in (E.2.26). The following operations are again standard. We compute w T Rw. Denoting
S~ S' / } M QTRQ=Swhere.S=
S 'T So
} N-M
(E.2.30)
603
Appendix E - Probability and Statistics
we have N x N positive definite matrix S, where S*[M, M] and S0[(N-M), (N-M)] are also positive definite. We designate
u = Bz
(E.2.31)
and we have w TRw
2UT S ' z 0 -!- z~ S 0 z 0 .
= u T S * u -I-
We substitute
(E.2.32)
Z0 = V - SolS'Tu
with new vector variable v, thus
(E.2.33)
WT R w = u T U u 4- v T Sov
where
(E.2.33a)
U = S* - S'SolS 'T . In the integral (E.2.28a), we now have
1 fw (w) = k e x p ( - ~ :
1 u T Uu) exp(-
(Z0 @ S;1S'TR)T S 0 (z 0 q- S;1S'TR))
2
where integration over R TM means integrating the second factor, as u = Bz is independent of z o . But whatever be u e 1~M, by translation (E.2.32) the integral remains unaltered. Thus
A (Z)---~ k k 1
IdetB[ exp(-
1
uTUu)
(E.2.34)
2 where
1
kl=~ exp(-~ ~N-M 2
t TS ot)dt
(E.2.34a)
is constant. So as to show that the matrix U (E.2.33a) is positive definite, let us put
W --"
/ u / _S;1S,Tu
with arbitrary u ~ R M, u r 0 9
thus also w r 0 and wTSw > 0.
But using the partition (E.2.30) of S we find 0 < w T Sw = u r Uu for any u r 0
(E.2.35)
hence U is positive definite. Recalling that u = Bz (E.2.31) thus u T Uu = z T B T UBz where also B TUB is positive as B is regular, the expression (E.2.34) shows that fz thus also fv (E.2.28) represents a normal distribution.
604
Material and Energy Balancing in the Process Industries
This is one of the agreeable properties of the normal distribution. Knowing that also Y is Gaussian, we need not use the expression (E.2.34) with (E.2.28). Because, by (E. 1.22 and 23) m
E(Y) = Ax + b
(x = E(X))
and
(E.2.36)
Fv = AFx A T it is sufficient to substitute A~ + b for a and Fzv~ for R in (E.2.6) to obtain the joint probability density for Y = g(X) (E.2.23). Let us have in particular a Gaussian random variable X with zero mean E(X) = 0
(E.2.37)
and uncorrelated components Xi thus cov(Xi, Xj) = 0
for i ~ j .
(E.2.38)
Let Ox~ be the standard deviations; see (E.l.13 and 14). Introducing the random variable Z of components 1
Zi -
Xi
(E.2.39)
(Yxi the variable Z is again Gaussian and of zero mean, and it has the standard normal distribution characterized in addition by the property F z - IN
(E.2.40)
with unit N x N matrix IN. We then introduce the scalar random variable g(Z) where g(z) = z~z
(E.2.41)
is sum of squares of the components. It can be shown that the variable g(Z) has a distribution with joint probability density as introduced in (E.1.2). It is called chi-square (~2) distribution, with N degrees of freedom. [The usual convention is writing v instead of N and denoting by ~2 (v) the distribution.]
605
A p p e n d i x E - Probability and Statistics
W e have g(z) > 0 if z ~ 0. Let R > 0. Then P {g(Z) < R 2 } = k .f e x p ( - ~
?1):
f~2, = (n-l)!
(E.2.46)
and for 2" ~;.-I N = 2n - 1 (n > 2):
~'~2n-I -"
1 93 ... ( 2 n - 3)
According to (E.2.45), we have an expression (E. 1.2) for the probability, with zero density in the negative region of the real axis.
606
Material and Energy Balancing in the Process Industries
The integrals (E.2.45) thus (E.2.44) giving the probability can be computed by recursion formulae; they can be found in statistical tables. The information is not restricted to the standard normal distribution. Let X be a general Gaussian random variable. Let us introduce the random variable Q = q(X) where q(x) = ( x - a) T R(x - a)
(E.2.47)
is the function (E.2.6). Let P be N x N orthogonal transforming pT R P = diag(r~, ... , r N ) ;
(E.2.48)
cf. (E.2.16). Setting
Yl y = p1 (x - a) = YN we have q(x) - yT p~ R P y = y~diag(rl,
N , rN)Y-- i__Z 1 riY~
and introducing further 1/2
i = 1, ... , N: zi = ri Yi thus the vector of components z i z = diag(rl/2, . . . , r N1/2) y we have N q(x) = z~z = E
2 Zi
.
(E.2.49)
i=1
If R 2 > 0 is arbitrary, we have q(x) < R 2 if and only if zVz < R 2 . Introducing thus the random variable Z = h ( X ) w h e r e h(x) = diag(rl/2, "", r_N 1/2,n-1 ) r (X- a)
(E.2.50)
is a regular linear transformation, Z is again Gaussian, E(Z) = 0, and the covariance matrix F z = IN is unit matrix; indeed, it equals, by (E.2.36) with p-i = pT
Appendix E - Probability and Statistics Fz . diag(rll/2, . . . where F x
=
607
, rr~in ) p-1 Fx P diag(rll/2, ..., r~t2) R -1
(E.2.8) and where p1 R - 1 p = (p-1 Rp)-i = (pT Rp)-I =
= diag(1/r 1 , ..., 1/rN ), thus F z - I N. We thus have Gaussian variable Z with standard normal distribution, and we have, for any value z of Z
zTz