scieee AI-readable full text Open interactive document viewer

Sensor placement for fault diagnosis based on structural models: application to a fuel cell stak system

Rosich Oliva, Albert

Abstract

The present work aims to increase the diagnosis systems capabilities by choosing the location of sensors in the process. Therefore, appropriate sensor location will lead to better diagnosis performance and implementation easiness. The work is based on structural models ands some simplifications are considered in order to only focus on the sensor placement analysis. Several approaches are studied to solve the sensor placement problem. All of them find the optimal sensor configuration. The sensor placement techniques are applied to a fuel cell stack system. The model used to describe the behaviour of this system consists of non-linear equations. Furthermore, there are 30 candidate sensors to improve the diagnosis specifications. The results obtained from this case study are used to strength the applicability of the proposed approaches.

Full text

ADVERTIMENT . La consulta d’aquesta tesi queda condicionada a l’acceptació de les següents condicions d'ús: La difusió d’aquesta tesi per mitjà del servei TDX (www.tesisenxarxa.net) ha estat autoritzada pels titulars dels drets de propietat intel·lectual únicament per a usos privats emmarcats en activitats d’investigació i docència. No s’autoritza la seva reproducció amb finalitats de lucre ni la seva difusió i posada a disposició des d’un lloc aliè al servei TDX. No s’autoritza la presentació del seu contingut en una finestra o marc aliè a TDX (framing). Aquesta reserva de drets afecta tant al resum de presentació de la tesi com als seus continguts. En la utilització o cita de parts de la tesi és obligat indicar el nom de la persona autora. ADVERTENCIA. La consulta de esta tesis queda condicionada a la aceptación de las siguientes condiciones de uso: La difusión de esta tesis por medio del servicio TDR (www.tesisenred.net) ha sido autorizada por los titulares de los derechos de propiedad intelectual únicamente para usos privados enmarcados en actividades de investigación y docencia. No se autoriza su reproducción con finalidades de lucro ni su difusión y puesta a disposición desde un sitio ajeno al servicio TDR. No se autoriza la presentación de su contenido en una ventana o marco ajeno a TDR (framing). Esta reserva de derechos afecta tanto al resumen de presentación de la tesis como a sus contenidos. En la utilización o cita de partes de la tesis es obligado indicar el nombre de la persona autora. WARNING. On having consulted this thesis you’re accepting the following use conditions: Spreading this thesis by the TDX (www.tesisenxarxa.net) service has been authorized by the titular of the intellectual property rights only for private uses placed in investigation and teaching activities. Reproduction with lucrative aims is not authorized neither its spreading and availability from a site foreign to the TDX service. Introducing its content in a window or frame foreign to the TDX service is not authorized (framing). This rights affect to the presentation summary of the thesis as well as to its contents. In the using or citation of parts of the thesis it’s obliged to indicate the name of the author UNIVERSITAT POLITÈCNICA DE CATALUNYA Programa de Doctorat: AUTOMÀTICA, ROBÒTICA I VISIÓ Tesi Doctoral SENSOR PLACEMENT FOR FAULT DIAGNOSIS BASED ON STRUCTURAL MODELS: APPLICATION TO A FUEL CELL STACK SYSTEM Albert Rosich Oliva Directors: Ramon Sarrate Fatiha Nejjari Abril de 2011 To Marta Abstract Diagnosing faults correctly can prevent serious damage on systems or a loss of process performance. For this reason, the study of fault diagnosis system design is an important research area. However, the application of novel techniques in industrial processes are rare. This is mainly due to the fact that the achieved diagnosis performance is not the expected one, or the design techniques are cumbersome and difficult to implement. The present work tries to mitigate these problems by choosing the location of sensors in the process. It is known that diagnosis systems strongly depend on the on-line information acquired from the process. Therefore, appropriate sensor location will lead to better diagnosis performance and implementation facilities. In order to properly deal with the sensor placement problem for complex systems, a suitable framework based on structural models is developed beforehand. Some simplifications (e.g. single faults, no faulty models and a one-to-one correspondence between a model equation and a fault) are considered in order to only focus on the sensor placement analysis. This framework also allows to easily handle installed sensors in the system and to derive some properties that will be used later to develop the proposed sensor placement approaches. Faults affecting the placed sensors are also considered in this framework, as well as redundant sensors (i.e. sensors that measure an already measured variable). In this work, the combinatorial nature of the sensor placement problem is shown. This means that representing the complete set of possible solutions may be unfeasible when the number of candidate sensors grows. Therefore, only optimal solutions will be sought. The present work proposes three new approaches to solve the optimal sensor placement problem for fault diagnosis based on structural models. The first approach focuses on efficiently generating the minimal redundant sub-models when different candidate sensor configurations are tested. The second approach is based on binary integer programming. And the third one is specifically devoted i ii to perform the sensor placement when the unknown variable computation in the residual generators is taken into account. Deriving residuals from the minimal redundant sub-models requires computing the unknown variables of such sub-models. This is not a trivial issue when complex systems with non-linear equations (e.g. look-up tables, piecewise functions, maps, etc.) are considered. For this reason, a method that ensures the unknown variable computation by assigning causality between equations and variables is developed. This method is combined with the sensors placement problem. Sensors are placed such that the unknown variable computation in the residual generators is guaranteed. Finally, the sensor placement techniques are applied to a fuel cell stack system. The model used to describe the behaviour of this system consists of 96 equations, most of them non-linear. Furthermore, there are 30 candidate sensors to improve the diagnosis specifications. The results obtained from this case study are used to strength the applicability of the proposed approaches. Keywords: optimal sensor placement, fault diagnosis, fault detection and isolation, structural analysis, minimal redundant sub-model, binary integer programming, causal computability, fuel cell stack system. Resum Diagnosticar fallades correctament pot evitar importants d’anys en els sistemes o la p`erdua de prestacions del proc´es. Per aquest motiu, l’estudi del disseny de diagnosticadors de fallades ´es una important `area de recerca. Malgrat tot, la implementaci´o de t`ecniques innovadores en els processos industrial ´es poc freq¨uent. Aix`o ´es degut, principalment, a que les prestacions assolides pel diagnosticador dissenyat estan per sota de les esperades o b´e a que les t`ecniques de disseny s´on massa complexes i dif´ıcilment implementables. El present treball t´e per objectiu intentar resoldre aquests problemes mitjan¸cant la localitzaci´o de sensors en el proc´es. D’aquesta manera, instal·lant els sensors apropiats s’obtenen millores en les prestacions del diagnosticador i facilitats d’implementaci´o. Per tal de poder treballar adequadament amb el problema de localitzaci´o de sensors en sistemes complexos, pr`eviament es desenvolupa un marc de treball basat en models estructurals. En aquest marc de treball es suposen una s`erie de simplificacions (fallades simples, models de fallada inexistents i una correspond`encia d’un a un entre equacions del model i fallades) amb la finalitat de centrar-se nom´es en la problem`atica de la localitzaci´o de sensors. Aquest marc de treball tamb´e permet considerar de forma eficient els sensors instal·lats en el sistema, aix´ı com la possibilitat d’extreure algunes propietats de diagnosis que seran posteriorment considerades a l’hora de desenvolupar els diferents m`etodes proposats per a la localitzaci´o de sensors. A m´es, es tenen tamb´e en compte les fallades que afecten als sensors instal·lats, aix´ı com sensors redundants (sensors que mesuren una variable que ja est`a mesurada). El problema de la localitzaci´o de sensors ´es de naturalesa combinat`oria, tal i com es mostra en el present treball. Aix`o significa que la representaci´o de totes les possibles solucions pot esdevenir impossible quan el nombre de sensors a considerar ´es gran. Per tant, tan sols es buscar`a la soluci´o `optima. Es proposen tres enfocaments diferents per tal de resoldre la localitzaci´o `optima de sensors per diagnosi de fallades basada en models estruciii iv turals. El primer m`etode es centra en la generaci´o eficient de sub-models de redund`ancia m´ınima per verificar les diferents configuracions de sensors candidates. El segon m`etode utilitza la programaci´o bin`aria entera per resoldre el problema. Finalment, el tercer m`etode t´e en compte el c`alcul de les variables desconegudes en els generadors de residus a l’hora de resoldre el problema de la localitzaci´o de sensors. La extracci´o de residus a partir dels sub-models de redund`ancia m´ınima requereix la determinaci´o del valor de les variables desconegudes d’aquests sub-models. Aquesta tasca no ´es gens f`acil al tractar-se de sistemes complexes on apareixen equacions no lineals (per exemple, taules, funcions a trossos, corbes caracter`astiques, etc.). Per aquest motiu, s’ha desenvolupat un m`etode que permet assegurar la calculabilitat de les variables desconegudes mitjan¸cant l’assignaci´o de causalitats entre equacions i variables. Aquest m`etode es combina amb la localitzaci´o de sensors. ´ Es a dir, es cerquen els sensors `optims que cal instal·lar en el sistema, per tal de garantir la calculabilitat de les variables desconegudes en els generadors de residus. Les t`ecniques de localitzaci´o de sensors s´on aplicades a un sistema basat en una pila de combustible. El model emprat per descriure el comportament d’aquest sistema consta de 96 equacions, la majoria de les quals s´on no lineals. A m´es, hi ha la possibilitat d’instal·lar fins a 30 sensors per tal de millorar la diagnosis del sistema. Degut a aquestes caracter´ıstiques del sistema i del model, els resultats obtinguts mitjan¸cant aquest cas d’estudi reafirmen l’aplicabilitat dels m`etodes proposats. Paraules clau: localitzaci´o de sensors `optima, diagnosis de fallades, detecci´o i a¨ıllament de fallades, an`alisis de models estructurals, sub-model de redund`ancia m´ınima, programaci´o bin`aria i entera, calculabilitat causal, sistema de pila de combustible. Contents Abstract . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . i Resum.................................... iii Acknowledgement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii List of Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiv List of Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii List of Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xviii 1 Introduction 1 1.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.1.1 Practical Motivation based on the Case Study . . . . 4 1.2 Main objectives . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.3 Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.4 Related Publications . . . . . . . . . . . . . . . . . . . . . . . 8 2 Review of Background Theory 11 2.1 Consistency based Diagnosis Framework . . . . . . . . . . . . 11 2.2 Structural Model . . . . . . . . . . . . . . . . . . . . . . . . . 16 2.3 Graph Theoretical Preliminaries . . . . . . . . . . . . . . . . 20 2.4 Testing Consistency in Structural Models . . . . . . . . . . . 24 2.4.1 Minimal Sub-models for Testing Consistency . . . . . 24 2.4.2 Review of Algorithms to Generate MSO Sets . . . . . 28 3 Introduction to Optimal Sensor Placement 31 3.1 Basic Assumptions for Sensor Placement . . . . . . . . . . . . 31 3.2 Fault Detectability and Isolability . . . . . . . . . . . . . . . 33 3.3 Sensors for Fault Diagnosis . . . . . . . . . . . . . . . . . . . 38 3.3.1 Adding Sensors in the Structural Model . . . . . . . . 38 3.3.2 Faults in Sensors . . . . . . . . . . . . . . . . . . . . . 42 3.3.3 Physical Redundant Sensors . . . . . . . . . . . . . . . 42 3.3.4 Useful Sensors for Fault Diagnosis . . . . . . . . . . . 44 xi xii CONTENTS 3.4 Maximum Diagnosis Specifications . . . . . . . . . . . . . . . 46 3.5 Optimal Sensor Placement for Fault Diagnosis . . . . . . . . 47 3.5.1 Sensor Cost Function . . . . . . . . . . . . . . . . . . 47 3.5.2 Optimal Sensor Placement Problem Set-up . . . . . . 48 3.6 Related Works on Sensor Placement for Fault Diagnosis . . . 50 4 Sensor Placement by Incremental MSO Sets Generation 53 4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 4.2 Relation between Sensors and MSO Sets . . . . . . . . . . . . 54 4.3 Algorithm for Optimal Sensor Placement . . . . . . . . . . . 57 4.4 Application to the compressor model . . . . . . . . . . . . . . 59 4.5 Extension to Redundant Sensors . . . . . . . . . . . . . . . . 61 4.6 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 5 Binary Integer Optimisation for Sensor Placement 67 5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 5.2 Constraint Formulation for BIP . . . . . . . . . . . . . . . . . 68 5.2.1 Preliminary Notation . . . . . . . . . . . . . . . . . . 68 5.2.2 MSO Set Selector . . . . . . . . . . . . . . . . . . . . . 69 5.2.3 Fault Detectability Constraints for BIP . . . . . . . . 71 5.2.4 Fault Isolability Constraints for BIP . . . . . . . . . . 73 5.3 BIP Optimisation for Sensor Placement . . . . . . . . . . . . 75 5.4 Redundant Sensor Extension . . . . . . . . . . . . . . . . . . 78 5.5 Binary Integer Linear Programming for Sensor Placement . . 79 5.5.1 Standard Binary Integer Linear Programming . . . . . 80 5.5.2 Linear MSO Set Selector . . . . . . . . . . . . . . . . . 80 5.5.3 Linear Fault Detectability and Isolability Constraints 82 5.5.4 BILP Optimisation for Sensor Placement . . . . . . . 84 5.5.5 Sensor Placement and MSO Set Optimisation . . . . . 88 5.5.6 BILP for MSO Set Optimisation . . . . . . . . . . . . 91 5.6 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 6 Sensor Placement for Causally Computable MSO Sets 93 6.1 Causal Computability on Residual Generation . . . . . . . . . 93 6.2 Causal Structural Model . . . . . . . . . . . . . . . . . . . . . 97 6.3 Extracting the Causally Computable Part . . . . . . . . . . . 99 6.4 Detectability and Isolability with Causal Relations . . . . . . 103 6.4.1 Causal Structural Detectability . . . . . . . . . . . . . 103 6.4.2 Causal Structural Isolability . . . . . . . . . . . . . . . 104 6.5 Sensor Placement based on Causal Relations . . . . . . . . . 106 CONTENTS xiii 6.5.1 Maximum Causal Detectability and Isolability Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . 106 6.5.2 Sensor Placement Algorithm . . . . . . . . . . . . . . 107 6.5.3 Redundant Sensor Extension . . . . . . . . . . . . . . 109 6.6 Optimal Sensor Search Improvement . . . . . . . . . . . . . . 110 6.7 Generating Causally Computable MSO Sets . . . . . . . . . . 115 6.8 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 7 Fuel Cell Stack System Application 119 7.1 Fuel Cell Stack Description . . . . . . . . . . . . . . . . . . . 119 7.2 Review of Works on Diagnosis of FCS Systems . . . . . . . . 121 7.3 FCS System Benchmark . . . . . . . . . . . . . . . . . . . . . 122 7.3.1 FCS System Model . . . . . . . . . . . . . . . . . . . . 124 7.3.2 Model Equations . . . . . . . . . . . . . . . . . . . . . 137 7.3.3 FCS Process Faults . . . . . . . . . . . . . . . . . . . . 140 7.3.4 Causal Structural Model . . . . . . . . . . . . . . . . . 141 7.4 Sensor Placement for FCS Systems . . . . . . . . . . . . . . . 143 7.5 Implementation of Causal Residuals . . . . . . . . . . . . . . 145 7.5.1 Causal MSO Set Optimisation . . . . . . . . . . . . . 145 7.5.2 Residual Implementation and Simulation . . . . . . . 146 7.6 Comparison with Alternative Approaches . . . . . . . . . . . 152 7.7 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 7.A Causal Structural Models of the FCS System . . . . . . . . . 155 7.B Causal MSO Set of FCS Model Equations . . . . . . . . . . . 159 7.C Computation Sequences . . . . . . . . . . . . . . . . . . . . . 164 8 Concluding Remarks 167 8.1 Summary of Contributions . . . . . . . . . . . . . . . . . . . . 167 8.2 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169 8.3 Proposed Approaches Discussion . . . . . . . . . . . . . . . . 170 8.4 Future Works . . . . . . . . . . . . . . . . . . . . . . . . . . . 172 Bibliography 175 xiv CONTENTS List of Tables 2.1 Biadjacency matrix of the structural model of the compressor. 19 2.2 Structural model, (M,X, A′), of the compressor system. . . . 27 4.1 Compressor sensor costs. . . . . . . . . . . . . . . . . . . . . . 59 4.2 Results from Algorithm 4.1 at intermediate iterations. . . . . 60 4.3 Fault equations contained in the MSO sets of ΩS111 . . . . . . 62 5.1 Truth table of a valid MSO set. . . . . . . . . . . . . . . . . . 70 5.2 Wmatrix for the compressor model. . . . . . . . . . . . . . . 71 5.3 Vmatrix for the compressor model. . . . . . . . . . . . . . . 72 5.4 Fault equations contained in the selected MSO sets. . . . . . 78 5.5 Fault equations contained in the optimal selected MSO sets. . 89 6.1 Non-symmetric isolability example. . . . . . . . . . . . . . . . 105 6.2 Optimal search example. . . . . . . . . . . . . . . . . . . . . 114 7.1 Variable nomenclature. . . . . . . . . . . . . . . . . . . . . . . 124 7.2 Variable subscription. . . . . . . . . . . . . . . . . . . . . . . 125 7.3 Reduced equation of the FCS model. . . . . . . . . . . . . . . 139 7.4 Correspondence between faults and equations. . . . . . . . . . 141 7.5 Measurable variables and costs. . . . . . . . . . . . . . . . . . 144 7.6 Fault Signature Matrix for the FCS system. . . . . . . . . . . 146 7.7 Noise standard deviation. . . . . . . . . . . . . . . . . . . . . 147 7.8 Modelling errors. . . . . . . . . . . . . . . . . . . . . . . . . . 148 7.9 Air compressor model. . . . . . . . . . . . . . . . . . . . . . . 155 7.10 Supply manifold model. . . . . . . . . . . . . . . . . . . . . . 155 7.11 Air cooler model. . . . . . . . . . . . . . . . . . . . . . . . . . 155 7.12 Static humidifier model. . . . . . . . . . . . . . . . . . . . . . 155 7.13 Anode flow controller model. . . . . . . . . . . . . . . . . . . 156 7.14 Outlet manifold model. . . . . . . . . . . . . . . . . . . . . . 156 7.15 Structural fuel cell stack model. . . . . . . . . . . . . . . . . . 156 7.16 Structural relations for component interconnections and known variables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 7.17 Causal structural Fuel Cell System. . . . . . . . . . . . . . . . 158 xv xvi LIST OF TABLES 8.1 Approaches comparison. . . . . . . . . . . . . . . . . . . . . . 172 List of Figures 1.1 Diagnosis system diagram. . . . . . . . . . . . . . . . . . . . . 2 2.1 Graphical interpretation of the behaviours modes in the domain Y............................... 14 2.2 Bipartite graph of the structural model of the compressor. . . 19 2.3 DM-decomposition in a biadjacency matrix. . . . . . . . . . . 23 6.1 Computation sequence. . . . . . . . . . . . . . . . . . . . . . 95 6.2 Computation sequence with loop. . . . . . . . . . . . . . . . . 96 6.3 Causally computable structure with no linear relations. . . . 100 6.4 Computable structure with causal and linear relations. . . . . 102 6.5 Search tree for {s1, s2, s3, s4}. . . . . . . . . . . . . . . . . . . 112 7.1 Basic principle of a PEM fuel cell. . . . . . . . . . . . . . . . 120 7.2 Fuel Cell Stack system. . . . . . . . . . . . . . . . . . . . . . 123 7.3 Input signal pattern. . . . . . . . . . . . . . . . . . . . . . . . 148 7.4 Simulation scenarios . . . . . . . . . . . . . . . . . . . . . . . 150 7.5 Simulation scenarios . . . . . . . . . . . . . . . . . . . . . . . 151 7.6 Computation sequence for r1. . . . . . . . . . . . . . . . . . . 164 7.7 Computation sequence for r2. . . . . . . . . . . . . . . . . . . 164 7.8 Computation sequence for r3. . . . . . . . . . . . . . . . . . . 164 7.9 Computation sequence for r4. . . . . . . . . . . . . . . . . . . 165 7.10 Computation sequence for r5. . . . . . . . . . . . . . . . . . . 165 7.11 Computation sequence for r6. . . . . . . . . . . . . . . . . . . 166 7.12 Computation sequence for r7. . . . . . . . . . . . . . . . . . . 166 xvii xviii LIST OF FIGURES List of Algorithms 2.1 Ω= findMSO(M, R)....................... 26 4.1 S∗= IncrementalSP(M,S, C, F,M) . . . . . . . . . . . . . . 58 6.1 EC= CausalModel(M, X) . . . . . . . . . . . . . . . . . . . . 101 6.2 EL= LinearModel(M, X) . . . . . . . . . . . . . . . . . . . . 101 6.3 E= ComputableModel(M) . . . . . . . . . . . . . . . . . . . 102 6.4 MFD= CausalDetectability(M, MF) . . . . . . . . . . . . . . 104 6.5 MFI= CausalIsolability(M, MF) . . . . . . . . . . . . . . . . 105 6.6 isFeasible(Sk,S,M, MFDmax , MFImax ) . . . . . . . . . . . . . . 108 6.7 S∗= CausalSensorPlacement(M,S, C, MFDmax , MFImax ) . . . 108 6.8 S∗= searchOptimal(node, S∗, M′ FDmax , M′ FImax ) . . . . . . . . 113 6.9 Ωc= findCausalMSO(M, R) . . . . . . . . . . . . . . . . . . . 116 xix xx LIST OF ALGORITHMS Outline 7 provided at each iteration of the sensor configuration search. This is performed by incrementally computing the set of redundant submodels. •Chapter 5: In order to improve the search strategy presented in the previous chapter, the sensor placement problem is solved here by means of binary integer programming. Two formulations are presented. The first formulation involves non-linear constraints, whereas the second one just uses linear inequality constraints. Extensions for efficiently handling redundant sensors are proposed. Finally, binary integer programming is also used for an optimal selection of the useful redundant sub-models. •Chapter 6: In this chapter, the computation of the known variables in the residual generators is specially addressed. First, a new framework to handle causalities in the unknown variable computation is presented. Then, the sensor placement problem for fault diagnosis is introduced under the causal computation framework. Two main algorithms are developed in this chapter. The first one allows to solve the sensor placement problem within the causal framework for both process and sensors faults. The second algorithm, based on specific heuristics, is limited to process faults, but its efficiency is better than for the former algorithm. •Chapter 7: The sensor placement problem is applied to a fuel cell stack system. First, a detailed model of the process is presented. Then, the sensor placement problem within the causal framework is solved. Based on the obtained solution, several residuals are implemented and tested. This chapter presents a methodology to design diagnosis systems involving: structural model extraction from the analytical model, sensor placement analysis, redundant sub-model computation and residual generation. •Chapter 8: The main contributions of this thesis are first summarised. Next, the three sensor placement approaches presented in this thesis are compared, and the main conclusions are drawn. Furthermore, some possible future works are suggested. 8Chapter 1. Introduction 1.4 Related Publications Several publications have been derived during the doctoral courses and the thesis development. A list of published works where the thesis author has contributed to is next presented: •A. Rosich, E. Frisk, J. ˚ Aslund, R. Sarrate, F. Nejjari (2010). Fault Diagnosis Based On Causal Computations. IEEE Transactions on Systems, Man, and Cybernetics–Part A. Under review. •A. Rosich, A. A. Yassine, S. Ploix (2010). Efficient Optimal Sensor Placement for Structural Model Based Diagnosis. 21th International Workshop on Principles of Diagnosis, DX’10. Portland, USA. •F. Nejjari, R. Sarrate, A. Rosich (2010). Optimal Sensor Placement For Fuel Cell System Diagnosis using BILP Formulation. 18th Mediterranean Conference on Control and Automation. Marrakech, Morocco. •A. A. Yassine, A. Rosich, S. Ploix (2010). An Optimal Sensor Placement Algorithm taking into account Diagnosability Specifications. 17th IEEE International Conference on Automation, Quality and Testing, Robotics,. Cluj-Napoca, Romania. •A. Rosich, E. Frisk, J. ˚ Aslund, R. Sarrate, F. Nejjari (2009). Sensor Placement for Fault Diagnosis Based On Causal Computations. 7th IFAC Symposium on Fault Detection, Supervision and Safety of Technical Process, Safeprocess’09. Barcelona, Spain. •A. Rosich, F. Nejjari, R. Sarrate (2009). Fuel Cell System Diagnosis based on a Causal Structural Model. 7th IFAC Symposium on Fault Detection, Supervision and Safety of Technical Process, Safeprocess’09. Barcelona, Spain. •A. Rosich, R. Sarrate, F. Nejjari (2009). Optimal Sensor Placement for FDI using Binary Integer Linear Programming. 20th International Workshop on Principles of Diagnosis, DX’09. Stockholm, Sweden. •A. Rosich, R. Sarrate, V. Puig, T. Escobet (2007). Efficient Optimal Sensor Placement for Model-Based FDI using an Incremental Algorithm. Proc. 46th IEE Conference on Decision and Control. New Orleans, USA. Related Publications 9 •R. Sarrate, V. Puig, T. Escobet, A. Rosich (2007). Optimal Sensor Placement for Model-based Fault Detection and Isolation. Proc. 46th IEE Conference on Decision and Control. New Orleans, USA. •V. Puig, A. Rosich, C. Ocampo, R. Sarrate (2007). Fault- Tolerant Explicit MPC of PEM Fuel Cells. Proc. 46th IEE Conference on Decision and Control. New Orleans, USA. •A. Rosich, V. Puig, J. Quevedo (2006). Fault-Tolerant Constrained MPC of PEM Fuel Cells. IAR Annual Meeting. Universit´e Henri Poincar´e, Nancy, France. 10 Chapter 1. Introduction Chapter 2 Review of Background Theory In this chapter, some theoretical fundamentals are reviewed, focusing on those issues that have a special interest for the comprehension of this thesis. The reader who is acquainted with these topics can skip to the next chapter since no new contribution is here addressed. In order to present a general framework suitable for sensor placement, the foundations of diagnosis based on consistency are firstly introduced. Then, the structural model is formally introduced, as the modelling representation used in this thesis. Since a structural model representation is a graph representation, some theoretical issues on graph theory are also introduced. Specifically those concerning bipartite graphs and the Dulmage-Mendelsohn decomposition. Finally, this Chapter focuses on how parts of the model can be selected to test consistency. In particular, the computation of Minimal Structural Overdetermined (MSO) sub-models is reviewed, as well as the existing works in the literature devoted to this issue. Here, only basic concepts on these topics are covered. However, there exists a great number of works extending the topics presented in this chapter. The reader interested in further information is encouraged to resort to the given bibliography. 2.1 Consistency based Diagnosis Framework The task of diagnosing faults can be explained, regardless of the implemented method, by using the notion of consistency based diagnosis. The framework here presented arises as a result of combining approaches from the artificial 11 12 Chapter 2. Review of Background Theory intelligence (AI) community and the control theory community (also known as FDI). Main issues in the AI community (e.g. (De Kleer and Williams, 1987) and (Reiter, 1987)) deal with identifying those behaviour modes that may be present in the process, being the inference procedure its key point. On the other hand, FDI community issues (e.g. (Gertler, 1998) and (Chen and Patton, 1999)) are more focused on obtaining signals (called residuals) that are sensitive to faults, i.e. residual generator design. The basic ideas developed in this section were first introduced by Nyberg and Krysander (2003) and further detailed in Krysanders’ thesis (Krysander, 2006). It is worth mentioning that an introduction to consistency based diagnosis can be also found in (Blanke et al., 2006). In the area of diagnosis, a system is usually assumed to consist of a set Cof components, C={c1, c2, c3,...} For instance consider an air compressor system. It is possible to define some components such as the electric motor, the compressor box or the manifold of the outlet air flow. This allows us to assign different system descriptions to each component, so that the entire system model can be split into several component models. As it will be seen next, this facilitates the task of defining and representing faults in the system, as well as distinguishing between faults during the fault isolation task. System variables interact with one or several components. A variable that only appears in one component is called internal variable, whereas a variable shared by several components and/or observable is called external variable. External variables connect a component to its outer world, it can be whether an other system components or other external systems (e.g. a control system or a diagnosis system). A component c∈Cis associated to one or several behaviour modes, Bc. Typically, a component has at least the non-faulty behaviour mode, NF , also known as “normal” behaviour mode for some authors. However, it is also possible to associate one behaviour mode, Fi, for each fault defined in the component. It is assumed that the real behaviour mode of a component corresponds to exactly one of its associated behaviour modes in Bc. Therefore, for convenience, an unknown-fault behaviour mode UF is defined, which covers any non-specified behaviour mode. The set of all behaviours modes associated to a component cis denoted as Bc={b1, b2,...,bn} where each birepresents a different behaviour mode of the component: b1= Consistency based Diagnosis Framework 13 NF ,bi=Fi−1(i={2,...,n−1}) and bn=UF . In a system, the different behaviour modes are characterised by means of relations among the system variables. So, depending on how system variables relate among them, the system will behave according to a given mode. Here, the term equation will be used to denote any expression defining a relationship between two or more system variables. Nevertheless, other authors use other equivalent terms as, for example, the term relation used in (Trav´e-Massuy`es et al., 2006) or the term constraint used in (Ploix et al., 2005). These equations represent the a priori knowledge available for modelbased diagnosis and can be expressed by a wide range of different classes: dynamic-algebraic equations, logic laws, look-up tables, etc. Thus, a system model can be defined by the set of equations that depend on the system variables and is denoted as M={e1, e2, e3,···} where eirepresents the i-th equation of the model. Therefore, a behaviour mode b∈Bcfor a given component c∈Ccan be characterised by a subset of model equations, Mb⊆M.Mbis called the behaviour model of b. The idea of consistency-based diagnosis is to determine, from the set of model equation M, which behaviour modes are consistent with the observations. Thus, for diagnosis purposes, it is important to distinguish between the set Yof known variables (or observations) and the set Xof unknown variables. The set Yusually refers to controlled and/or measured variables. Let xand ydenote vectors of variables in Xand Y, respectively, and let Xand Ybe its domains. According to (Krysander, 2006), a subset of equations M⊆Mis consistent with the observations y∈Yif ∃x∈X:M(x,y) (2.1) where M(x,y) means that all the equations in Mare satisfied for the given values in y. Analogously, the set of known variables consistent with Mis defined as O(M) = {y∈Y| ∃x∈X:M(x,y)}(2.2) In Figure 2.1 a graphical interpretation of the behaviour mode consistency is depicted. The different behaviour modes are represented as space subsets of the observation domain, Y. For instance, considering the observation y1∈Yin the figure, it can be concluded that behaviour modes F1 and F3are not consistent with y1, whereas behaviour modes NF ,F2and 14 Chapter 2. Review of Background Theory y1 O(MUF ) O(MF1) O(MNF )O(MF2) O(MF3) Figure 2.1: Graphical interpretation of the behaviours modes in the domain Y. UF 1are consistent with y1. For practical reasons, it is easier to draw a diagnostic statement when the behaviour mode is not consistent with the observations than when it is (Nyberg and Krysander, 2003). To test consistency from a set of model equations, M,analytical redundancy in the model must exist. In other words, there must be observations such that the model is not consistent with: ∃y∈Y,∀x∈X:¬M(x,y) (2.3) where ¬M(x,y) means that there is at least one equation in Mthat is not satisfied for the values in y. Note that this is equivalent to ∃y∈Y:y/∈ O(M) (2.4) As said above, any behaviour mode bis characterised by a subset of model equations, Mb. Thus, if the component is in a behaviour mode bthen it is assumed that Mbis consistent with any possible set of system observations. Given a model equation e∈M, the operator assump(e) (Krysander, 1The space subset related with the behaviour mode UF in Figure 2.1 involves the whole observation domain Y, despite it is difficult to see in the figure. Consistency based Diagnosis Framework 15 2006) will denote those behaviour modes that are assumed to be consistent with e, assump(e) = {b|e∈Mb}(2.5) The assump(e) operator can be extended to also denote which behaviour modes are assumed to be consistent with a set Mof model equations, assump(M) = \ e∈M assump(e) (2.6) This implies that, given an inconsistent sub-model M, the conclusion drawn for the diagnosis system is that assump(M) behaviour modes are inconsistent with the observations. Therefore, the remaining behaviour modes Bc\assump(M) are consistent with the observations (i.e. the behaviour modes in Bc\assump(M) can explain the observed behaviour of the component). To show how the diagnosis reasoning works within this framework, the following example is proposed. Example 2.1. Consider a component cwith the following behaviour modes: Bc={NF ,F1,F2,UF } The model of the component consists of three equations, M={e1, e2, e3}, which describe the different behaviour modes as follows: MNF ={e1, e2, e3} MF1={e2, e3} MF2={e1, e3} MUF =∅ This can be interpreted as equations e1,e2and e3describing the free fault component behaviour. A fault related with F1affects equation e1, therefore equations e2and e3remain consistent in the presence of such fault. The same interpretation can be done for a fault related with F2, but now the affected equation is e2, i.e. e1and e3are consistent with F2. Finally, note that no equation describes the unknown fault behaviour mode, UF , indicating that any equation may become inconsistent in the presence of an unknown fault. Now, assume that the sub-model M′={e1, e2}becomes inconsistent, which means that assump(M′) is also inconsistent, assump(M′) = assump(e1)∩assump(e2) = {NF ,F2}∩{NF ,F1}=NF (2.7) 16 Chapter 2. Review of Background Theory Therefore the diagnosis inference is that the component is behaving as one of the remaining modes, Bc\assump(M′) = {F1,F2,UF }(2.8) Improving the diagnosis task in order to detect and isolate faults is possible by testing consistency on several sub-models, Mi⊆M. Given a set of sub-models suitable to test consistency, the diagnosis statement, D(y), is presented as a function from the set of all possible observations yto all possible combinations of Bc, D(y) : Y→ P(Bc) (2.9) where P(Bc) denotes the power set of Bc, and D(y) is computed as D(y) = Bc\[ Miis inconsistent assump(Mi)(2.10) This shows that the diagnosis performance strongly depends on the submodels Mito test consistency. How these sub-models are generated from Mis explained in Section 2.4. Finally, remark that this framework has been here introduced regarding the behaviour modes of a component. However, the framework can be easily extended to cope with several components in a system and several behaviours modes per component (Krysander, 2006). 2.2 Structural Model The analysis of the model structure has been widely used in the area of model-based diagnosis (Blanke et al., 2006). Next, it is explained what a structural model is and how it can be represented. The structural model of a system is an abstraction of the analytical model. In fact, the structural model is a coarse model simplification since only the relation between variables and equations is taken into account, neglecting the mathematical expression of this relation. Due to its simple description, it cannot be ensured that the diagnosis performance obtained from structural models will hold for the practical case. However if the required diagnosis performance is not fulfilled for a structural model, neither it will be for the practical case (i.e. only best case results can be computed). It is usually assumed that all the equations in the model are compatible and independent (Blanke et al., 2006). Graph Theoretical Preliminaries 23 V2∞V2b··· V21V20 V1∞ V1b . . . V11 V10 Figure 2.3: DM-decomposition in a biadjacency matrix. The DM-decomposition can be graphically represented by a triangular form in the biadjacency matrix (see Figure 2.3). The white areas mean that only zeros can appear (there are no edges) while the coloured areas mean that both, zeros and ones, can appear (there may be some edges). The diagonal line represents the maximum matching in the graph, formed from the complete matching of V1∞into V2∞within G∞, the perfect matchings in each Gk(k= 1,···, b) and the complete matching of V20into V10within G0. Clearly, the DM-decomposition can be applied on a structural model since it is based on a bipartite graph. In the structural model-based diagnosis literature (Blanke et al., 2006), the DM-decomposition is used to decompose a structural model Minto three parts,denoted as G+= (M+, X+;A+) (2.27a) G0= (M0, X0;A0) (2.27b) G−= (M−, X−;A−) (2.27c) for M+, M0, M−⊆Mand X+, X0, X−⊆X. These three parts, G+, G0and G−, are respectively called over-determined,just-determined and 24 Chapter 2. Review of Background Theory under-determined parts of the model, and can be computed from the DM- components as G+=G0(2.28a) G0=∪b k=1Gk(2.28b) G−=G∞(2.28c) It is worth remarking that the set of known variables is not required to determine these three parts. In fact, by only regarding the set of equations, the sub-graphs in (2.27) are well defined since X+= varX(M+) (2.29a) X0= varX(M0)\X+(2.29b) X−=X\{X+∪X0}(2.29c) Therefore, for the sake of notational convenience, the over-determined, the just-determined and the under-determined parts of a model, M, will be denoted by M+,M0and M−, respectively. 2.4 Testing Consistency in Structural Models In Section 2.1, it was seen that it is possible to detect and isolate faulty behaviour modes by testing consistency on different sub-models of the system. Here, it will be explained how to choose such sub-models. First, the principal properties for sub-models devoted to test consistency are defined and characterised Next, the algorithm presented in (Krysander et al., 2008) to generate this class of sub-models is described. Finally, related works on this issue are reviewed and discussed. 2.4.1 Minimal Sub-models for Testing Consistency The existence of analytical redundancy in a sub-model is a key property to test consistency, as seen in Section 2.1. Here, it will be referred to structural redundancy which can differ from the analytical redundancy if the structural model is not independent and/or compatible. Given a subset of model equations M⊆Mand its corresponding bipartite graph G= (M, X;A′), the structural redundancy can be quantified (Krysander, 2006) as ϕs(M) = |M|−ν(G) (2.30) Testing Consistency in Structural Models 25 Note that only the set of unknown variables is again considered. Any equation subset such that ϕs(M)≥1 is said to contain structural redundancy and can be therefore used to test consistency, since the model Mfulfils (2.3). According to (2.30), it is straightforward to see that ϕs(M−∪M0) = 0 for any equation subset M⊆M. In fact, it can be verified that ∀y∈Y,∃x∈X:M′(x,y) (2.31) for any M′⊆(M−∪M0). Thus, the only equations containing structural redundancy are those in the over-determined part M+, ϕs(M+) = ϕs(M) (2.32) This implies that equations in the structurally over-determined set M+are the only useful equations to test consistency. Testing the consistency of the whole set M+is not useful for distinguishing, among different behaviour modes, which are consistent and which are not (only detection task can be performed). Therefore, the strategy to follow is to derive different sub-models containing analytical redundancy so that each sub-model can test the consistency of different behaviour modes (the isolation task is accomplished). A sufficient requirement to obtain the best isolability capabilities, from a structural point of view, is to find all the minimal structurally overdetermined (MSO) sub-models. An MSO set can be seen as a set of Mequations that contains structural redundancy and no proper subset M′⊂Mhas this property. This implies that ϕs(M) = 1 which motivates the next definition (Krysander et al., 2008). Definition 2.2 (Minimal Structurally Over-determined).AMinimal Structurally Over-determined (MSO) set of equations M⊆Mis an over-determined set M=M+such that ϕs(M) = 1. Typically, the consistency of an MSO set Mk⊆Mis tested by deriving aresidual generator (Chen and Patton, 1999). A residual generator is a function rk(y) from the observations yto a non-negative scalar value. This value is compared against a threshold Jkaccording to the following binary decision: rk(y)≥Jk→Mkis not consistent with y rk(y)< Jk→Mkis consistent with y Several techniques exist to construct residuals generators, e.g. parameter estimation (Isermann, 2006), state observers (Patton et al., 1989), or parity equations (Gertler, 1998). 26 Chapter 2. Review of Background Theory In (Krysander et al., 2008) an efficient algorithm to compute all the MSO sets given a structural model was developed. This algorithm is based on a top-down search, beginning with the complete structurally over-determined part M+of the system model, and recursively constructing the search tree by removing equations until all the MSO sets are found. A version of such algorithm is depicted in Algorithm 2.1 where the first inputs are set to M=M+and R=∅. Variable Rrecords the set of equations already removed in order not to compute the same MSO set more than once. During the execution of the algorithm, the MSO sub-model ωi⊆Mis stored in Ω (i.e. Ω={ω1, ω2, ω3,···}). Algorithm 2.1 Ω = findMSO(M, R) Ω:= ∅ if ϕs(M) = 1 then Ω:= {M} else while R6⊇ Mdo Select an e∈M\R E:= M\(M\{e})+ if E∩R=∅then R:= R∪E Ω:= Ω∪findMSO(M\E, R) else R:= R∪E end if end while end if return Ω To improve efficiency, a model reduction is cleverly done in Algorithm 2.1. Instead of removing equations one by one, the equations are removed by groups such that the structural redundancy is decreased by a rate of one at every recursive call. This group of equations Eforms an equivalent class and can be easily computed (Krysander et al., 2008) as E=M\(M\{e})+(2.33) by taking any equation e∈Mas long as Mis a proper structurally overdetermined (PSO) sub-model (i.e. M=M+). The resulting model reduction Testing Consistency in Structural Models 27 ωcτ η e1× e2× × e3× e4× e5× × × Table 2.2: Structural model, (M,X, A′), of the compressor system. is therefore M\Eand it holds that ϕs(M) = ϕs(M\E) + 1 (2.34) It is worth noting that the set M\Eis still a PSO sub-model, i.e. M\E= (M\E)+. Example 2.5. Consider the structural model M={e1,...,e5}of the compressor in Example 2.2 with the set Xof unknown variables defined in Example 2.3 (the biadjacency matrix in Table 2.2). Next, how Algorithm 2.1 computes all the MSO sets is shown. First, note that M+={e1, e2, e3, e4, e5}, so the inputs to the algorithm are M={e1, e2, e3, e4, e5}and R=∅. The algorithm steps are: 1. ϕs(M) = 2. Mis not an MSO set. 2. Select e1. Then E={e1}and E∩R=∅. 3. R:= {e1}. Call findMSO(M, R) with M={e2, e3, e4, e5}and R= {e1}. 1. ϕs(M) = 1. Mis an MSO set, return Ω={M}. 4. Ω={{e2, e3, e4, e5}}. 5. Select e2. Then E={e2, e4, e5}and E∩R=∅. 6. R:= {e1, e2, e4, e5}. Call findMSO(M, R) with M={e1, e3}and R={e1, e2, e4, e5}. 1. ϕs(M) = 1. Mis an MSO set, return Ω={M}. 28 Chapter 2. Review of Background Theory 7. Ω={{e2, e3, e4, e5},{e1, e3}}. 8. Select e3. Then E={e3}and E∩R=∅. 9. R:= {e1, e2, e3, e4, e5}. Call findMSO(M, R) with M={e1, e2, e4, e5} and R={e1, e2, e3, e4, e5}. 1. ϕs(M) = 1. Mis an MSO set, return Ω={M}. 10. Ω={{e2, e3, e4, e5},{e1, e3},{e1, e2, e4, e5}}. Stop the while loop since now R=M. Return Ω. The algorithm finds all the three possible MSO sets of equations, Ω= {ω1, ω2, ω3}, within the compressor model: ω1={e2, e3, e4, e5} ω2={e1, e3} ω3={e1, e2, e4, e5} 2.4.2 Review of Algorithms to Generate MSO Sets As pointed out in Section 2.1, there are in the literature several approaches devoted to find what it could be generically called minimal redundant submodels. In some works, this issue is refereed as generating Analytical Redundancy Relations (ARR) (Blanke et al., 2006). An ARR is a relation deduced from a system sub-model which only contains observed variables.Therefore, it can be directly used as a residual generator. To obtain an ARR from a structural sub-model M, each unknown variable must be matched with one equation (i.e. there exists a complete matching of the unknown variables into the set of equations) and an extra unmatched equation must exist in the model, |M|=|varX(M)|+ 1 = |Mmax M|+ 1 (2.35) Usually, this is interpreted as each equation solving its matched unknown variable and the extra equation (named redundant equation) testing the consistency. This requirement fits with the MSO set definition. The main difference between an ARR and an MSO set is that the computation of the unknown variables must be explicitly ensured in an ARR whereas in an MSO set is not (Armengol et al., 2009). Thus, it can be concluded that an ARR is a particular case of an MSO set. Testing Consistency in Structural Models 29 One of the early algorithms to generate ARRs was proposed in (Blanke et al., 2006). This algorithm starts with a maximum matching in the set of unknown variables and subsequently a family of ARR is found by adding extra non-matched equations to the set of equations involved in the matching. However the result is not complete, i.e. not all the possible ARRs are guaranteed. Later, in (Gelso et al., 2008) the algorithm was improved such that all possible ARRs are found. This was accomplished by iteratively combining the set of ARRs computed in the former algorithm. Furthermore, the algorithm in (Blanke et al., 2006) was extended in (D¨u¸steg¨or et al., 2004), where the best possible matching according to computability criteria is used to generate the resulting family of ARRs. In (Trav´e-Massuy`es et al., 2006) another algorithm to generate all the ARRs was proposed. It first assumes that all the unknown variables are measured and thereby every equation becomes an ARR. Then, it combines these ARRs by eliminating variables and taking into account whether the eliminated variables can be computed. In (Ploix et al., 2005), another method based on variable elimination was presented. A modification of the (Krysander et al., 2008) method was presented in (Rosich et al., 2009b). The objective of this modification is to guarantee that all the unknown variables in an MSO set can be easily computed when both, linear and non-linear equations, are involved in the MSO set. This algorithm will be presented and further detailed in Section 6.7. The artificial intelligence community uses the concept of minimal conflict to test the consistency of a model. In (Cordier et al., 2004) the existence of an equivalence between ARRs and conflicts was shown. A method to compute the set of pre-compiled minimal conflicts was presented in (Pulido and Gonzalez, 2004). Its strategy is based on choosing one equation and then finding all the required equations to compute the unknown variables within the chosen equation. Another similar method based on the same strategy was also developed in (Krysander and Nyberg, 2002). A detailed comparison of some of these methods presented above was done in (Armengol et al., 2009). A general conclusion drawn from all these methods, above mentioned, is that searching for all the MSO sets (or the ARRs) has exponential time complexity. Furthermore, all the algorithms that are complete (i.e. that compute all possible MSO sets) are equivalent when unknown variable computability is not considered (all of them return the same result). However, the computation time and the memory required to achieve the same result can significantly vary from one method to another. 30 Chapter 2. Review of Background Theory Chapter 3 Introduction to Optimal Sensor Placement This chapter introduces the foundations for a proper treatment of the optimal sensor placement problem for fault diagnosis. First, some assumptions are adopted in order to simplify the framework presented in Section 2.1. The purpose of these simplifications is to facilitate the study of the sensor placement problem by only focusing on the main issues of fault diagnosis systems. Then, fault detectability and isolability are defined within the consistency based diagnosis framework when structural models are used. Once the fault diagnosis foundations used throughout this thesis are well established, the concept of sensor is introduced within the framework of fault diagnosis based on structural models. It will be shown how sensors are handled in the structural model as well as some basic properties relating the diagnosis performance with the sensors installed in the system. Furthermore, the optimal sensor placement problem for model based fault diagnosis is presented by means of a generalised formulation. Finally, a review of some related works on sensor placement for fault diagnosis is given. 3.1 Basic Assumptions for Sensor Placement As mentioned above, some assumptions are here introduced in order to simplify the consistency based diagnosis framework. These assumptions can be briefly summarised as: •There is no explicit faulty behaviour model. •Every fault is related to one model equation. 31 32 Chapter 3. Introduction to Optimal Sensor Placement •Multiple faults are not considered. First of all, it is assumed that no explicit description of a faulty behaviour is available. This implies that only equations describing the non-faulty behaviour are allowed in the system model. Therefore, given the system model equations, M, and the non-faulty behaviour mode, NF , the following expression holds MNF =M(3.1) This assumption has been proposed in several works, usually from the AI community, e.g. (De Kleer and Williams, 1987) and (Reiter, 1987). These works claim that using information of the faulty behaviour modes can be sometimes warranted but is never guaranteed. Observe that obtaining fault models from a real system implies an expert knowledge of the system, or intentionally causing faults in the system for fault model identification. However, it is worth pointing out that using fault models may improve the diagnosis capabilities of the diagnosis system, (Frisk et al., 2003). The second assumption concerns the model equations used for describing faulty behaviours modes. Given a fault fiassociated with the behaviour mode Fi∈B, the corresponding model equations describing such behaviour will henceforth assumed to be MFi=M\{efi}(3.2) for efi∈M. This means that all model equations, except efi, describe the behaviour of the system when fault fiis present. In other words, any fault is limited to only affect one equation in the model. Note that this does not hold for the non-faulty behaviour mode NF due to (3.1), or for the unknown-fault behaviour mode, UF , since MUF =∅. This second assumption directly implies that the behaviour modes assumed consistent with equation efiare assump(efi) = {NF ,F1,···,Fi−1,Fi+1,···} =B\{Fi,UF }(3.3) Therefore, when efibecomes inconsistent implies that B\{Fi,UF }are also inconsistent, i.e. either fior an unknown fault are a possible explanation of the current system behaviour. To motivate this second assumption, consider an MSO set of equations ω⊆M. Then, according to (2.6) and (3.3), the behaviour modes assumed consistent with ωare assump(ω) = \ e∈ω assump(e) = NF ∪{Fi|efi/∈ω}(3.4) Sensors for Fault Diagnosis 39 x∈Xis chosen for installation in the system, then the corresponding variable, x, becomes known. This variable is removed from the set Xof unknown variables and is added into the set Yof known variables. Nevertheless, this strategy is not desirable when handling faults in sensors since no sensor behavioural model is explicitly defined. Instead of this, an explicit sensor model will be used. Henceforth, any candidate sensor in the sensor placement analysis is modelled by means of one single equation which is called sensor equation, represented by es:x=y(3.20) for x∈Xand y∈Y. Thereby, when a sensor is chosen for installation in the original system, its corresponding sensor equation is added to the system model (i.e. M∪{es}is the new set of model equations). Usually, sensors have a signal conditioning stage that may include, for example, signal filtering, linearisation or/and digitisation. Moreover, some measurements involve more than one unknown process variables, e.g. a wattmeter, that measures the electric power which depends on the electric current and the voltage. This means that the sensor model could be generally modelled as es:y=h(x1,...,xn) (3.21) where hrepresents the signal conditioning process and x1,...,xnthe unknown process variables involved in the measurement. To handle sensor models as in (3.21) the following strategy is adopted. The sensor model is split in two equations by adding an extra unknown variable x′such that e′ s:x′=h(x1,...,xn) (3.22a) es:y=x′(3.22b) Then, the former equation e′ s(3.22a) can be fitted in the structural system model, as part of the original model, whereas equation (3.22b) is now the corresponding sensor equation. Remark that adding equation e′ sinto the model preserves the structural redundancy of the model, ϕs(M) = ϕs(M∪{e′ s}) (3.23) Furthermore, when the sensor is installed (i.e. equation esis added to the model) both equations, e′ sand es, belongs to the same DM-decomposition 40 Chapter 3. Introduction to Optimal Sensor Placement part. In fact, this can be checked by considering the surplus function in (2.20). It then holds that |varX(M∪{e′ s})|−|M∪{e′ s}| >|varX(M∪{e′ s, es})|−|M∪{e′ s, es}| (3.24) for any set M⊆M. Therefore, the set M∪{e′ s, es}is in the family of the minimizers defined in (2.21), while the set M∪{e′ s}is not (i.e. equations e′ s and esalways come together in the DM-decomposition). Summarising the above explanation, to handle a sensor for the sensor placement analysis it is only required to consider the sensor equation (3.20). Any other equations involved in the sensor model can be considered, without loss of generality, in the equation set of the structural system model, M. Now, a one-to-one correspondence between the sensor equation and the measured variable exists, which motivates the following definition. Definition 3.5 (Set of candidate sensors).The set Sof all candidate sensors is defined as a subset of unknown system variables S⊆Xsuch that each variable s∈Scan be measured by installing a sensor in the system. In the following, according to this definition, a sensor s∈Swill denote the variable to be measured, as well as the physical measuring device to be installed in the system. Now, it is clear that sensors can be handled by pointing out the unknown variables s∈Sand then adding the corresponding sensors equation esto the model. Given a set of sensors S⊆Sthe set of their corresponding sensor equations is denoted by MS, MS=[ s∈S es(3.25) Adding extra sensors in the system may improve diagnosis capabilities. To motivate this idea, the following lemma shows that the overdetermined part of the model is never reduced by adding new equations. Lemma 3.3. Let M1and M2be two arbitrary sets of equations such that M1⊆M2, then it holds that M+ 1⊆M+ 2(3.26) Proof. First recall that the overdetermined part is the minimal subset with minimum surplus function p0. Hence, since M1⊆M2, it holds that p0(M+ 2)≤p0(M+ 1∪M+ 2) (3.27) Sensors for Fault Diagnosis 41 Furthermore, the surplus function p0introduced in (2.20) is a sub-modular function (Murota, 2000) since p0(A∪B) + p0(A∩B)≤p0(A) + p0(B) (3.28) for Aand Bbeing subsets of one vertex set in the bipartite graph. By replacing Awith M+ 1and Bwith M+ 2in (3.28), the following expression is obtained p0(M+ 1∪M+ 2) + p0(M+ 1∩M+ 2)≤p0(M+ 1) + p0(M+ 2) (3.29) This, together with (3.27), implies that p0(M+ 1)≥p0(M+ 1∩M+ 2) (3.30) Next, since M+ 1is the minimal subset in M1with minimum surplus function p0(i.e. p0(M+ 1)< po(M′) for any M′⊂M+ 1), expression (3.30) is only satisfied if M+ 1⊆M+ 2. The same can be intuitively seen by regarding the structural redundancy, ϕs. In fact, adding sensor equations to the model increases the number of equations but not the number of unknown variables. Therefore the redundancy is never decreased by installing extra sensors, ϕs(M)≤ϕs(M∪MS) (3.31) for any candidate sensor S⊆S. The next corollary formalises the idea of improving the diagnosis capabilities by installing extra sensors. Corollary 3.1. Let S⊆Sbe a candidate sensor set, then it holds that M+⊆(M∪MS)+(3.32) Proof. It directly holds from Lemma 3.3. On the one hand, Corollary 3.1 can be used to show that the more sensors are installed in the system the more equations may appear in the overdetermined part of the model, i.e. diagnosis performance may be improved. On the other hand, it proves that an fault equation, efi∈M, never becomes non-detectable by installing extra sensors. Thus the diagnosis performance is never degraded by installing sensors2. 2This is only true as long as sensor faults are not considered (see next Section 3.3.2). 42 Chapter 3. Introduction to Optimal Sensor Placement 3.3.2 Faults in Sensors As mentioned before, the system consists of a set of installed components that can present several faults represented by its corresponding behaviour modes. Sensors can be considered part of such set of components. Hence, installing extra sensors to improve diagnosis can lead to an increase in the number of possible faults to be considered in the diagnosis analysis. Furthermore, a sensor fault is a special case of behaviour mode since it is only present in the model when the sensor is installed. In the following, it will be shown how to handle sensor faults in the sensor placement analysis. Let S⊆Sbe a candidate sensor set that is installed in the system, i.e. the current system model is (M∪MS). Assume that every sensor s∈Shas a faulty behaviour mode, Fs, associated to it. Then, the faulty behaviour model corresponding to sensor s∈Sis MFs=M∪(MS\es) (3.33) which coincides with equation (3.2), with the sensor equation being used instead. This can be understood as a fault in sensor s∈Saffecting equation es, which seems reasonable. Furthermore, by tracking sensor equations in the model, it is possible to known which sensor faults need to be considered (i.e. if es∈(M∪MS) then faulty behaviour mode Fsneeds to be taken into account in the analysis, otherwise not). In order to distinguish between the original faults defined before the sensor placement analysis and the faults in the extra sensors after the analysis, the former are called process faults (denoted as fp) whereas the latter are called sensor faults (denoted as fs). Remark that a process fault may refer to a sensor as long as it is installed in the original system and not considered in the sensor placement analysis as a candidate sensor (e.g. a sensor for control purposes). 3.3.3 Physical Redundant Sensors Depending on the process, it may be possible to install in the system several sensors measuring the same process variable. For instance, consider a pipe with two sensors measuring the same inside flow. The sensor that measures an already measured variable is named redundant sensor. Given a set of candidate sensors, S, the set of candidate redundant sensor will be denoted by S′, where each redundant sensor in S′measures the same unknown variable as a sensor in S. Sensors for Fault Diagnosis 43 A redundant sensor is modelled by means of its corresponding sensor equation. Let s′∈S′be the redundant sensor of s∈S. Then, the redundant sensor equation has the form es′:x=y′(3.34) where both equations, esand es′, share the same unknown variable x∈ X, but different known variables y, y′∈Y. It is important to note that sensor smust be installed in the system before s′is chosen for installation. Otherwise, s′would not behave as a true redundant sensor. This requirement should be ensured in the following. Thus, the model of a system with all candidate sensors (non-redundant as well as redundant) installed, is represented by M∪MS∪MS′(3.35) Intuitively, considering redundant sensors should improve the diagnosis performance, i.e. more observations are obtained. Next lemma shows how diagnosis is improved by adding redundant sensors in the system. Lemma 3.4. Let (M∪{es}∪{es′})be a system model with a sensors s∈S and its corresponding redundant sensor s′∈S′. Then, it holds that (M∪{es}∪{es′})+= (M∪{es})+∪{es}∪{es′}(3.36) Proof. Fist, since the sub-model {es, es′}consists of two equations and one sharing variable, it follows from (2.20) that p0((M∪{es})+∪{es}∪{es′}) = p0((M∪{es})+)−1 (3.37) Then, note that according to (2.21) and (2.22), (M∪{es})+is the smaller subset with the minimum surplus function in (M∪ {es}). From this and (3.37), it follows that (M∪{es})+∪{es}∪{es′}) is the smallest subset with the minimum surplus function in (M∪{es}∪ {es′}), which completes the proof. According to this lemma, installing redundant sensors does not improve diagnosis on process faults since no new system model equation appears in the overdetermined part. The only possible new equations appearing in the overdetermined part are the redundant sensor equations. Thus, redundant sensors can only improve diagnosis on sensor faults, which means that regarding redundant sensors for process fault diagnosis makes no sense. 44 Chapter 3. Introduction to Optimal Sensor Placement 3.3.4 Useful Sensors for Fault Diagnosis Given a set of candidate sensors, it may happen that some of them do not improve the diagnosis performance. For instance, consider a sensor that measures a variable not related with the system. Then, it is clear that such sensor can not give any useful observation for diagnosis. This section is devoted to determine which sensors can contribute to the diagnosis, so that those sensors that are not useful can be rejected. By doing this, the complexity of the sensor placement analysis can be reduced since less sensors will be considered. From the DM-decomposition introduced in Section 2.3, it can be seen that removing equations from the just-determined or under-determined parts of the model has no effect on the overdetermined part. Thus, given any set Mof model equations, it holds that M+= (M\M′)+(3.38) for any M′⊆(M0∪M−). This motivates the fact that all sensor equations appearing in the just-determined or under-determined parts can be removed since no diagnosis capability will be lost. Therefore, the set S0⊆Sof useful sensors can be defined as S0={s∈S|es∈(M∪MS)+}(3.39) According to (3.38), it holds that the overdetermined part of the system model with all the candidate sensors, S, remains unaltered when only useful sensors S0are used, (M∪MS)+= (M∪MS0)+(3.40) meaning that sensors in S\S0do not improve diagnosis capabilities. To cope with useful redundant sensors, it suffices to look for redundant sensors in the useful sensors set S0. The set S′ 0⊆S′of useful redundant sensors is therefore defined as S′ 0={s′∈S′|s′is the redundant sensor of s∈S0}(3.41) Therefore, given a set of sensors, S, and a set of redundant sensors, S′to be installed in the system, the only sensors to be considered for fault diagnosis are the sensors in S0according to (3.39) and the redundant sensors in S′ 0according to (3.41). Remark that the diagnosis performance on process faults is not degraded by choosing S0and S′ 0instead of Sand S′, M∩(M∪MS∪MS′)+=M∩(M∪MS0∪MS′ 0)+(3.42) Sensors for Fault Diagnosis 45 In fact, as proved in Lemma 3.4, useful redundant sensors in S′ 0neither contribute to improve diagnosis performance on process faults since M∩(M∪MS∪MS′)+=M∩(M∪MS0)+(3.43) However, Theorem 3.4 shows how fault detectability and isolability for sensor faults can be guaranteed by adding redundant sensors. Theorem 3.4. Consider a system Mwith a set of useful sensors, S0, installed, as well as a redundant sensor s′of s∈S0. Then, the sensor faults corresponding to sand s′are detectable and fully isolable from any other process or sensor fault. Proof. It suffice to prove that the faults in sensors sand s′are detectable and fully isolable in M∪MS0∪{es′}(3.44) According to Lemma 3.4, both sensor faults are detectable, es, es′∈(M∪MS0∪{es}∪{es′})+(3.45) Then, according to (3.39), it is straightforward to see that a fault in sis isolable from a fault in s′since es∈(M∪MS0)+(3.46) Now, a fault in sis also isolable from any other fault as long as es∈((M∪MS0∪{es′})\{e})+(3.47) for any e∈(M∪MS0)\{es}. First, note that ({es, es′})+={es, es′}. Then according to Lemma 3.3, it holds that ({es, es′})+⊆((M∪MS0∪{es′})\{e})+(3.48) which fulfils (3.47). Equations (3.46) and (3.47) prove that the fault in sare fully isolable. Since both equations, esand es′, are structurally equivalent, it suffices to swap esfor es′to prove that the fault in s′is also fully isolable. According to the above theorem, fault detectability and full isolability for a sensor s∈S0and its corresponding redundant sensor s′∈S′ 0come for free when S0and s′are installed in the system. Moreover, this also shows that there is no need to consider more than two sensors measuring 46 Chapter 3. Introduction to Optimal Sensor Placement the same variable, even though it is physically possible, since fault detection and isolation on sensors sand s′is already ensured with two sensors. In the following, for notational convenience, it will be assumed that only useful sensors have been previously selected as candidate sensors before the sensor placement analysis, S,S0(3.49) The same assumption will hold for redundant sensors, S′,S′ 0. 3.4 Maximum Diagnosis Specifications Installing all candidate sensors in the system does not guarantee that the desired diagnosis specifications will be achieved. For this reason, it is important to know beforehand all the faults that could be detectable and all the faults that could be isolable by placing extra sensors in the system. Let FPbe the set of process faults to be detected and isolated. According to Assumption 3.2, there is one model equation efp∈Mrelated to every fault fp∈FP. Therefore it is possible to characterise the faults by their corresponding fault equations. Furthermore, according to Corollary 3.1, maximum detectability specifications of process faults can be achieved when the whole set of candidate sensors, S, is installed in the system. Therefore, the set of all detectable process faults is defined as FDP={fp∈FP|efp∈(M∪MS)+)}(3.50) As mentioned in Section 3.3.2, sensor faults are directly related to their corresponding sensor equations. Furthermore, recall from (3.49) that all sensor faults can be detected since all sensors are useful for diagnosis. Then, if FSis the set of sensor faults, it directly holds that the set of detectable sensor faults is FDS=FS(3.51) The same holds for redundant sensor faults. Let FS′be the set of redundant sensor faults, then the set of detectable redundant sensor faults is FDS′=FS′(3.52) Thus, the maximum set of detectable faults, involving both process and sensor faults, is FDmax =FDP∪FDS∪FDS′(3.53) Optimal Sensor Placement for Fault Diagnosis 47 Maximum fault isolability is achieved when all candidate sensors are installed in the system. Thus, according to (3.12), a fault fiis isolable from a fault fjif efi∈(M∪MS∪MS′)\{efj})+(3.54) where efiand efjare either fault equations or sensor equations, depending on fiand fjbeing a process or a sensor fault. In the following, either F1 Imax or F2 Imax (see Section 3.2) will be used to characterise maximum fault isolability according to (3.54). Typically, maximum diagnosis specifications will be assumed (i.e. detectability of faults in FDmax and isolability of faults according to F1 Imax ). Recall that no better diagnosis specifications can be achieved. However, it is possible to define other specifications than the maximum ones. Any diagnosis specifications, FDand F1 I, will be feasible as long as FD⊆FDmax (3.55) and F′ I(f)⊆FI(f) (3.56) for all f∈FD, where F′ I(f)∈F1 Iand FI(f)∈F1 Imax . 3.5 Optimal Sensor Placement for Fault Diagnosis Usually, there are several different sensor configurations that solve the sensor placement problem when large-scale systems with many candidate sensors are considered. Nevertheless, only one of these possible solutions has to be finally chosen to design a diagnosis system. Here, in order to cope with this selection decision, the best candidate sensor configuration will be sought. Thus, the optimal sensor placement problem is addressed. This implies to consider a cost function to evaluate the best (the optimal) solution among all possible configurations. 3.5.1 Sensor Cost Function The cost of installing a sensor in the system can be motivated by many reasons and may depend on the system application. For instance, the purchase price or the mounting facilities can be good reasons for devices which are mass produced. On the other hand, for critical systems (e.g. aerospace devices) the objective may focus on reliability and error robustness. Also, for applications where the mounting space or the weight is limited, the number of sensors could be optimised. 48 Chapter 3. Introduction to Optimal Sensor Placement For a general use of the sensor cost and to not going into details in the different purposes for installing sensors, the cost of installing a sensor will be evaluated by a positive real number. This number generically evaluates the properties to place the sensor (e.g. price, reliability, weight, etc.) with respect to the other sensors. Definition 3.6 (Sensor Cost).Let s∈(S∪S′) be a sensor. Then, the cost associated to the installation of this sensor is C(s)>0. Thus, the cost of installing a set of candidate sensors is the sum of the cost of installing each sensor in the candidate set. This is formally introduced in the following definition. Definition 3.7 (Sensor Set Cost).Let S⊆(S∪S′) be a subset of sensors. Then, the cost of installing all the sensors in Sis defined by C(S),X s∈S C(s) (3.57) A key property of the cost function defined in (3.57) is that it is a strictly monotonic function since for Si, Sj⊆(S∪S′), if Si⊂Sjthen C(Si)< C(Sj). Observe that, according to Definition 3.6, two redundant sensors can have different sensor costs. 3.5.2 Optimal Sensor Placement Problem Set-up The optimal sensor placement problem for fault diagnosis is formulated in this section from a general perspective. Here, it is assumed that an algorithm (or a function), P, must be designed in order to test whether the diagnosis requirements are fulfilled for a given set of sensors. This algorithm is fed with the process information, typically represented by the model Mof the process, the set of candidate sensors Sto be installed in the system and the required diagnosis specifications, F. The algorithm returns a boolean value indicating whether the diagnosis requirements are achieved, P(M, S, F) = 1 if diagnosis specifications Fare fulfilled 0 otherwise (3.58) This algorithm is developed mainly depending on the system description, M, and the diagnosis requirements, F. For instance, the system could be described by means of linear equations or by a logic statement. In the former case the algorithm should be based on linear algebra tools and in Relation between Sensors and MSO Sets 55 indicating that both MSO sets depend on the same set of sensors. This relation is formally defined as ω∼ω′:ω∩MS=ω′∩MS(4.2) for ω, ω′∈Ω It follows from the definition that this relation is an equivalence relation. Any equivalence relation must fulfil reflexivity, symmetry and transitivity properties. Furthermore, the equivalence relation defines a partition on the set of Ω into equivalent classes. The equivalence class, [ω]S, is defined from this equivalence relation as, [ω]S={ω′∈Ω|ω∼ω′}(4.3) where the index Stells us which sensors equations are involved in each equivalent class. Thus, according to (4.2) and (4.3) it holds that MS=ω∩MS(4.4) for any MSO set ω∈[ω]S. Furthermore, if there is no MSO set that contains the sensor equations MSthen, for notational convenience, it will be assumed that [ω]S,∅. Let ΩSbe the set of all possible MSO sets when all the candidate sensors are installed in the system, i.e. the MSO sets computed from M∪MS. Then, the quotient set of ΩSis the set of all possible equivalent classes of ΩSby ∼, according to (4.3), and it is denoted as ΩS/∼={[ω]S|ω∈ΩS}(4.5) Next lemma shows that the set of MSO sets obtained from a sensor configuration S⊆Sinstalled in the system can be well defined by the elements of ΩS/∼. Lemma 4.1. Let ΩSbe the set of all possible MSO sets obtained from the model M∪MSfor S⊆S. Then, it holds that ΩS=[ Si⊆S [ω]Si(4.6) for [ω]Si∈ΩS/∼. 56 Chapter 4. Sensor Placement by Incremental MSO Sets Generation Proof. The proof is straightforward by first noting that ΩS⊆ΩSsince ΩS is the family of all the MSO sets in (M∪MS)+and ΩSis the family of all the MSO sets in (M∪MS)+, where (M∪MS)+⊆(M∪MS)+. Then, according to (4.2) and (4.3), the set defined by [ Si⊆S [ω]Si(4.7) comprises all the MSO sets in ΩSsuch that no MSO set contains other sensor equations than the ones in MS, which is the same as saying that they are all the MSO sets in (M∪MS)+, i.e. ΩS. In the following, it will be stated that the set of sensors, S, generates the set ΩSof MSO sets. Lemma 4.1 also implies that some of the MSO sets in ΩScan also be generated by a sensor set other than S. In fact, given two sensor sets, S1and S2, such that S1⊆S2, it holds that ΩS2= ( [ Si⊆S1 [ω]Si)∪([ Si∈2S2\2S1 [ω]Si) = ΩS1∪([ Si∈2S2\2S1 [ω]Si) (4.8) which implies that ΩS1can be generated from either S1or S2. This shows that generating the MSO sets in ΩScan be efficiently done by regarding the MSO sets generated by subsets of S. Due to the properties of the cost function presented in Definition 3.7, the MSO sets that can be generated by sensor sets with a smaller cost than the actual one can be determined. This is shown in the next theorem. Theorem 4.1. Let ΩS1be the family of MSO sets generated by S1⊆S. An MSO set ω∈ΩS1\[ω]S1(4.9) can be generated by a sensor set S2⊆Ssuch that C(S2)< C(S1). Proof. According to Lemma 4.1 and since two equivalent classes are disjoint sets, i.e. [ω]Si∩[ω]Sj=∅for i6=j, the set of MSO sets ΩS1\[ω]S1can be expressed as ΩS1\[ω]S1=[ S2⊂S1 [ω]S2(4.10) where regarding the strictly monotonic property of the cost functions, it holds that C(S2)< C(S1) (4.11) Algorithm for Optimal Sensor Placement 57 Now, when a sensor configuration Skis chosen to test the diagnosis specifications, if all sensor configurations with a smaller cost than C(Sk) have been previously chosen, then it can be stated, according to Theorem 4.1, that the MSO sets in ΩSk\[ω]Skhave already been generated in previous iterations. Hence, just the set [ω]Skneeds to be computed at iteration k. This motivates the fact that the sensor search strategy introduced in step 1 of the coarse description algorithm in Section 4.1 can be performed as follows: 1. Choose the minimal cost sensor configuration, Si⊆S, not previously chosen. 4.3 Algorithm for Optimal Sensor Placement In this section, the Algorithm 4.1 which solves the optimal sensor placement by incrementally generating the set of MSO sets is presented. The inputs required by the algorithm are the structural system model Mof the system, the set Sof possible sensors to be installed in the system, the cost C(s) of each sensor s∈Sas well as the diagnosis specifications Fand the extra model information Mto call the procedure P′. First, the algorithm chooses a sensor subset by solving the following combinatorial optimization problem at each kiteration, min Sk⊆S{C(Sk) : Sk∈(2S\k−1 ∪ l=1{Sl})}(4.12) Note that C(Sk) refers to the sensor configuration cost function defined in Definition (3.57). Furthermore, the argument of this optimization problem is the sensor configuration such that it has a minimal cost and it has not been chosen in the previous iterations {1,...,k−1}. After the sensor configuration, Sk, has been chosen, the MSO sets in [ω]Sk are generated. In this step, the structural model Mand the corresponding sensor equations MSkare provided to compute the required MSO sets, [ω]Sk. To compute this set of MSO sets, one can adapt any of the existing lgorithms mentioned in the introduction chapter, specifically in Section 2.4.2. Here, however, the Algorithm developed in (Krysander and Frisk, 2008) is used. As it was mentioned before, the original algorithm (see Algorithm 2.1) was based on a top-down search, starting with all the equations of the model and then removing equations step by step until an MSO set is found. Now, the difference is that we are only interested in computing those MSO sets that contain all the equations in MSk. This is accomplished by firstly ensuring 58 Chapter 4. Sensor Placement by Incremental MSO Sets Generation Algorithm 4.1 S∗= IncrementalSP(M,S, C, F,M) k:= 1 repeat Sk:= arg min Sk⊆S{C(Sk) : Sk∈(2S\k−1 ∪ l=1{Sl})}%Choose a sensor set if (M∪MSk)+⊇MSkthen [ω]Sk:= findMSO((M∪MSk)+), MSk) % Generate [ω]Sk else [ω]Sk:= ∅ end if Store [ω]Sk ΩSk:= ∪[ω]S′for S′⊆Sk%Build the ΩSk k:= k+ 1 until P′(M,ΩSk,F) = 1 or Sk=S%Verify the diagnosis specifications if P′(M,ΩSk,F) = 1 then S∗:= Sk%The optimal solution is found else print “There is no solution” end if that MSk⊆(M∪MSk)+. If this is not the case, then no MSO set containing MSkexists. Secondly setting the input variable Rof the algorithm as R:= MSk, which forces the algorithm to not remove any equation in MSkduring the MSO sets computation, i.e. all the computed MSO sets contain the MSkequations. Since the algorithm was proved to be complete (i.e. all the possible MSO sets are found), then all possible MSO sets [ω]Skcan be ensured to be found, too. Once the [ω]Skhas been generated, it is stored in memory since it might be needed in further iterations. In the next step, the set ΩSkof MSO sets is obtained from the current generated set [ω]Skand the remaining sets [ω]S′for S′⊂Sk. All the remaining MSO sets have already been generated according to Theorem 4.1 and the sensor search strategy of the algorithm. Thus, it is enough generating [ω]Sk. The following three statements are fulfilled when the algorithm is at iteration k: •All the ΩSk\[ω]SkMSO sets have been generated in previous iterations. •No sensor configuration S′such that S′⊂Skis a solution. •If the configuration Skis a solution, then it is a global optimum. Application to the compressor model 59 The algorithm continues iterating until the diagnosis specifications F are fulfilled. This implies the use of function P′according to (4.1). If no solution is found, the algorithm stops iterating after the sensor configuration Sk=Shas been tested and concludes that there is no solution. In Section 4.6, issues concerning the efficiency of this algorithm and its applicability to practical cases are discussed. 4.4 Application to the compressor model An academic example based on the compressor model (see Example 2.2) is presented. It shows how Algorithm 4.1 solves the sensor placement problem for fault diagnosis when the required MSO sets are incrementally generated. The system model used in this example consists of equations (2.13), where its corresponding structural model is represented in Table 2.1. It is assumed that all system variables are unknown, e.g. no sensors are installed in the original system. The following candidate sensors are defined: S={ωc, i, τ, W, v, pin, pout, Tin}(4.13) Note that all system variables can be measured except for the compressor efficiency η. Some of these variables are easier to measure than others, so a cost to each variable is set accordingly (see Table 4.1). sensor ωci τ W v pin pout Tin cost 100 50 200 120 30 20 20 10 Table 4.1: Compressor sensor costs. Two process faults FP={f1, f2}are defined on the system model. Fault f1refers to a mechanical fault in the electric motor and is related to expression (2.13b) (i.e. ef1=e2), whereas fault f2refers to a compressor box fault in the outlet flow. Thus, it is related to expression (2.13c) (i.e ef2=e3). The diagnosis specifications are structural detectability and isolability for all process faults in FPand all sensors faults as well. As mentioned earlier, fault detectability and isolability can be defined by means of a set of MSO sets, according to Corollaries 3.1 and 3.2. Thus, the algorithm P′should be implemented to check whether expressions (3.11) and (3.16) are fulfilled for 60 Chapter 4. Sensor Placement by Incremental MSO Sets Generation k SkCSk[ω]SkΩSk 37 {i, v, pin, pout, Tin}130 {ω1} {ω1} 67 {ωc, v, pin, pout, Tin}180 {ω2} {ω2} 70 {ωc, i, v}180 {ω3} {ω3} 75 {ωc, i, v, Tin}190 ∅ {ω3} 76 {W, v, pin, pout, Tin}200 {ω4} {ω4} 81 {ωc, i, pin, pout, Tin}200 {ω5} {ω5} 82 {ωc, i, v, pout}200 ∅ {ω3} 83 {ωc, i, v, pin}200 ∅ {ω3} 87 {ωc, i, v, pout, Tin}210 ∅ {ω3} 88 {ωc, i, v, pin, Tin}210 ∅ {ω3} 91 {i, W, pin, pout, Tin}220 {ω6} {ω6} 85 {ωc, i, v, pin, pout}220 ∅ {ω3} 99 {i, W, v, pout, Tin}230 {ω7} {ω7} 100 {i, W, v, pin, Tin}230 {ω8} {ω8} 102 {ωc, i, v, pin, pout, Tin}230 ∅ {ω1, ω2, ω3, ω5} 105 {i, W, v, pin, pout}240 {ω9} {ω9} 111 {i, W, v, pin, pout, Tin}250 {ω10, ω11} {ω1, ω4, ω6, ω7, ω8, ω9, ω10, ω11} Table 4.2: Results from Algorithm 4.1 at intermediate iterations. the set of MSO sets, ΩSk, regarding the fault equations e2and e3, as well as the sensor equations in MSk. Once the diagnosis specifications are stated, Algorithm 4.1 is solves the optimal sensor placement problem. Table 4.2 shows the results for those iterations where some MSO sets are obtained, i.e. ΩSk6=∅. The results for the sensors configurations from k= 0 to k= 111 such that [ω]Sk=∅and ΩSk=∅are not shown in the table. The computed MSO sets during the algorithm execution (see Table 4.2) are: ω1={e1, e2, e3, e4, e5, ei, ev, epin , epout , eTin } ω2={e1, e2, e3, e4, e5, eωm, ev, epin , epout , eTin } ω3={e1, eωc, ei, ev} ω4={e1, e2, e3, e4, e5, eW, ev, epin , epout , eTin } Extension to Redundant Sensors 61 ω5={e2, e3, e4, e5, eωc, ei, epin , epout , eTin } ω6={e2, e3, e4, e5, ei, eW, epin , epout , eTin } ω7={e1, e2, e3, e4, e5, ei, eW, ev, epout , eTin } ω8={e1, e2, e3, e4, e5, ei, eW, ev, epin , eTin } ω9={e1, e2, e3, e4, e5, ei, eW, ev, epin , epout } ω10 ={e1, e3, ei, eW, ev, epin , epout , eTin } ω11 ={e1, e2, e4, e5, ei, eW, ev, epin , epout , eTin }(4.14) where {eωc, ei, eτ, eW, ev, epin , epout , eTin }denotes the corresponding sensor equation set MSfor Sdefined in (4.13). Note that the generated MSO sets, [ω]Sk, only contain the sensor equations corresponding to Sk. For example, look at iteration k= 70 where S70 ={ωm, i, v}and the generated MSO sets are [ω]S70 =ω3, then the corresponding sensor equations are ω3∩MS={eωc, ei, ev}=MS70 (4.15) The algorithm stops at iteration k= 111 since a solution is found. This means that the solution, found at iteration k= 111, is the optimal solution S∗=S111 ={i, W, v, pin, pout, Tin}(4.16) and the MSO sets that generate such a solution are ΩS111 ={ω1, ω4, ω6, ω7, ω8, ω9, ω10, ω11}(4.17) that fulfil the required diagnosis specifications. To easily verify this, Table 4.3 shows, by means of a cross symbol, which fault equations (regarding both process and sensor faults) belong to each MSO set in ΩS111 . Remark that generating all the MSO sets with all the possible sensors installed in the system would require to generate 46 MSO sets. Here, the proposed algorithm generates 11 MSO sets and 8 out of these 11 are part of the solution. 4.5 Extension to Redundant Sensors The approach presented in this chapter can easily be extended to redundant sensors. However, it is worth noting that when redundant sensors are considered, the number of MSO sets to be handled grows exponentially and the problem becomes rapidly intractable. On the other hand, the MSO sets 62 Chapter 4. Sensor Placement by Incremental MSO Sets Generation e2e3eieWevepin epout eTin ω1× × × × × × × ω4× × × × × × × ω6× × × × × × × ω7× × × × × × × ω8× × × × × × × ω9× × × × × × × ω10 × × × × × × × ω11 × × × × × × × Table 4.3: Fault equations contained in the MSO sets of ΩS111 . obtained with redundant sensors can be straightforwardly deduced from previous generated MSO sets. There is no need to compute new MSO sets by means of Algorithm 2.1. Given a structural model M∪MSwith some sensors S⊆Sinstalled in the system, the structure is preserved when a sensor is replaced by its corresponding redundant sensor. This is true since both sensor equations depend on the same unknown variable (see Section 3.3.3). Thus, let ΩSbe all MSO sets generated from M∪MS. Then, replacing sensor s∈Sby its redundant sensor s′will produce the same MSO sets in ΩSbut replacing sensor equation esby its redundant sensor equation es′. This set will be denoted as ΩS|s′, indicating that sensor shas been replaced by its redundant sensor s′. Therefore, it can be stated that ΩS∪ΩS|s′⊂ΩS∪{s′}(4.18) The remaining MSO sets in ΩS∪{s′}, not deduced from the non-redundant sensors are those MSO sets that contain both sensor equations, esand es′. However, it can be verified that ({es, es′})+={es, es′}(4.19) and ϕs({es, es′}) = 1 (4.20) which shows that the equation set {es, es′}is an MSO set. In fact, this is the only MSO set that depends on both sensors. Therefore, when a redundant Extension to Redundant Sensors 63 sensor is introduced, the set of MSO sets can be deduced as: ΩS∪{s′}= ΩS∪ΩS|s′∪{es, es′}(4.21) According to (4.21), the only set to be generated (using Algorithm 2.1) when redundant sensors are handled is ΩS, the remaining MSO sets can be directly deduced from ΩS. Next example shows how it should be proceeded in the case of computing MSO sets with redundant sensors. Example 4.1. Assume the following set of sensors {s1, s2}and its corresponding redundant sensors {s′ 1, s′ 2}. The cost of each sensor is C(s1) = C(s′ 1) = 2 and C(s′ 2) = C(s2) = 5. The steps to incrementally compute the MSO sets, according to the search strategy of Algorithm 4.1 including redundant sensors should proceed as follows: 1. Choose no sensor and compute [ω]∅. Ω∅= [ω]∅ 2. Choose sensor {s1}and compute [ω]{s1}. Ω{s1}= [ω]∅∪[ω]{s1} 3. Choose sensor set {s1, s′ 1}. Ω{s1,s′ 1}= Ω{s1}∪Ω{s1}|s′ 1∪{es1, es′ 1} 4. Choose sensor {s2}and compute [ω]{s2}. Ω{s2}= [ω]∅∪[ω]{s2} 5. Choose sensor set {s1, s2}and compute [ω]{s1,s2}. Ω{s1,s2}= [ω]∅∪[ω]{s1}∪[ω]{s2}∪[ω]{s1,s2} 6. Choose sensor set {s1, s′ 1, s2}. Ω{s1,s′ 1,s2}= Ω{s1,s2}∪Ω{s1,s2}|s′ 1∪{es1, es′ 1} 7. Choose sensor set {s2, s′ 2}. Ω{s2,s′ 2}= Ω{s2}∪Ω{s2}|s′ 1∪{es2, es′ 2} 64 Chapter 4. Sensor Placement by Incremental MSO Sets Generation 8. Choose sensor set {s1, s2, s′ 2}. Ω{s1,s2,s′ 2}= Ω{s1,s2}∪Ω{s1,s2}|s′ 2∪{es2, es′ 2} 9. Choose sensor set {s1, s′ 1, s2, s′ 2}. Ω{s1,s′ 1,s2,s′ 2}= Ω{s1,s′ 1,s2}∪Ω{s1,s′ 1,s2}|s′ 2∪{es2, es′ 2} The set [ω∅], [ω{s1}], [ω{s2}] and [ω{s1,s2}] are computed with Algorithm 2.1, while the remaining MSO sets are deduced from these sets. Note also that, step 9 could be performed from s′ 1instead of s′ 2, Ω{s1,s′ 1,s2,s′ 2}= Ω{s1,s2,s′ 2}∪Ω{s1,s2,s′ 2}|s′ 1∪{es1, es′ 1} which would provide the same result. Note also that for s′ 1to be a redundant sensor, it must be ensured that s1is already installed, which means that s′ 1comes together with s1. The same holds for s′ 2and s2. 4.6 Conclusions The approach presented in this chapter can be viewed as an improvement of the work in (Trav´e-Massuy`es et al., 2006) since not all the MSO sets need to be computed. Only in the worst case, when the full set of candidate sensors Sis the optimal solution or there is no solution, all the MSO sets are computed. However, since the MSO sets are incrementally computed and no MSO set is computed more than once, it can be said that, in the worst case, Algorithm 4.1 is as efficient as the approach presented in (Trav´e-Massuy`es et al., 2006). Therefore, the efficiency is improved whenever the optimal solution is a subset of S. In fact, the time required to find the optimal solution depends on the cost of this optimal solution with respect to the other sensor configurations, i.e. the smaller the cost of the optimal solution is, the faster the solution is found. This means that large scale models can be efficiently handled as long as the optimal solution has a low cost. Of course, the cost of the optimal solution can not be known beforehand and intractable problems may be expected. Note that, both the MSO set generation and the sensor set search are time demanding procedures. On the other hand, the main advantage is that all the required MSO sets are provided for each possible solution. So, this method is suitable to handle Constraint Formulation for BIP 71 i τ W v ω1× × ω2× ω3× ω4× × ω5× × ω6× ω7× × ω8× × ω9× × ω10 × Table 5.2: Wmatrix for the compressor model. 5.2.3 Fault Detectability Constraints for BIP Process Fault Detectability To detect a process fault, at least one MSO set that contains the corresponding fault equation (see Corollary 3.1) must exist. But now, this property is restricted to valid MSO sets. Given a process fault fp j∈FDand the MSO set selector ρ,the detectability constraint for a process fault is defined as n X i=1 vijρi≥1 (5.11) This constraint ensures that the corresponding column jof matrix Vhas at least one 1 associated to a valid MSO set. In other words, there exists at least one valid MSO set that makes fault fp jdetectable. Example 5.2. Following with Example 5.1, consider now two process faults, fp 1and fp 2, which are respectively related to equations e2and e3. The corresponding matrix Vis represented in Table 5.3, from the MSO sets in (5.9). According to (5.11), the detectable constraint for fault fp 1is q1q2+q1q3+q1+q2q4+q3q4+q4≥1 (5.12) whereas for fault fp 2is q3+q2+q1+q4≥1 (5.13) 72 Chapter 5. Binary Integer Optimisation for Sensor Placement fp 1fp 2 ω1 ω2× ω3× ω4× ω5× ω6× × ω7 ω8× ω9× ω10 × × Table 5.3: Vmatrix for the compressor model. Note, for example, that fp 1becomes detectable as long as either sensor i, v ∈ Sare installed and fault fp 2becomes detectable for any candidate sensor s∈Sinstalled in the compressor. Sensor Fault Detectability Similar to process fault detectability, a sensor fault is detectable if its corresponding sensor equation appears at least in one valid MSO set. Thus, the elements of matrix Ware now used instead of those of matrix V. The main difference with respect to a process fault is that now the sensor fault detectability constraint only needs to be active when the corresponding sensor is installed. In other words, if the sensor is not installed then no sensor fault is expected. This is achieved by introducing the optimisation variable, qj, in the inequality constraint n X i=1 wijρi≥qj(5.14) Note that when the sensor sj∈Sis installed (qj= 1) the inequality constraint is equivalent to (5.11). However, when the sensor is not installed (qj= 0) the inequality holds for any value of the corresponding MSO set selector. Example 5.3. Consider the four sensors in Example 5.1, {i, τ, W, v}, and the Wmatrix depicted in Table 5.2, according to (5.9). Then, from (5.14), Constraint Formulation for BIP 73 the corresponding sensor fault constraints for detectability are respectively: q1q2+q1q3+q1+q1q4≥q1(5.15a) q2q3+q2+q1q2+q2q4≥q2(5.15b) q2q3+q3+q1q3+q3q4≥q3(5.15c) q1q4+q2q4+q3q4+q4≥q4(5.15d) 5.2.4 Fault Isolability Constraints for BIP Fault Isolability between Process Faults The fault isolability characterisation based on the set of MSO sets can be derived from Corollary 3.2. Recall that a fault f1is isolable from another fault f2, if there exists at least one MSO set that contains ef1while it does not contain ef2. Furthermore, due to the symmetric property of fault isolability (see Section 3.2), if such condition holds and the two faults f1 and f2are detectable, it can also be stated that there exist another MSO set that contains ef2and does not contain ef1(i.e. fault f2is isolable from fault f1). Therefore, since all isolable faults must be detectable according to the fault isolability specifications in (3.56), if we consider all valid MSO sets, two process faults fp j1∈Fk1and fp j2∈Fk2for Fk1, Fk2∈F2 Iand k16=k2, are isolable if n X i=1 ρi|vij1−vij2| ≥ 1 (5.16) This inequality ensures that both columns j1and j2in matrix V(corresponding to fp j1and fp j2, respectively) are at least different in one row associated to a valid MSO set. In other worlds, there exists at least one MSO set such that it contains one fault equation but not the other one. Example 5.4. Following with Example 5.2, the isolability constraint for the two process faults, fp 1and fp 2, is q3+q2+q1q2+q1q3+q2q4+q3q4≥1 (5.17) according to (5.16), matrix Vin Table 5.3 and the MSO set selectors in (5.10). 74 Chapter 5. Binary Integer Optimisation for Sensor Placement Fault Isolability between Process and Sensor Faults Similar constraints can be derived for isolability between a process fault and a sensor fault. However, the constraint only needs to be active when the corresponding sensor is installed. Therefore, given a process fault fp j1and a sensor fault fs j2, both faults are isolable as long as n X i=1 ρi|vij1−wij2| ≥ qj2(5.18) This inequality is always fulfilled when sensor sjis not installed (i.e. qj= 0). Otherwise the two faults must be isolable. Example 5.5. Consider, from Example 5.2, process fault fp 1and a sensor fault fs 3of the flowmeter measuring the air flow, W. The isolability constraint between these two faults is defined, according to (5.18), as q2q3+q3+q1q2+q1+q2q4+q4≥q3(5.19) where matrix Vis in Table 5.3, matrix Wis in Table 5.2 and the MSO set selectors are in (5.10). Fault Isolability between Sensor Faults Isolability between two sensor fault can be easily deduced from the other fault isolability constraints. In this case, the constraint needs to be active only when both sensors are installed. Let sj1and sj2be two arbitrary sensors, such that their corresponding sensor faults are isolable in F2 I. Then, sensor faults fs j1and fs j2are isolable if n X i=1 ρi|wij1−wij2| ≥ qj1qj2(5.20) Note that, only when both sensors are installed (qj1= 1 and qj2= 1), the right hand side of this inequality becomes 1, and the constraint is fulfilled as long as both faults are isolable. Otherwise, the right hand side becomes 0 and the constraint is always fulfilled. Example 5.6. From Example 5.3, consider the pair of sensor faults corresponding to Wand v(i.e. fs 3and fs 4, respectively). Therefore, from (5.20), matrix Wand matrix V(depicted in Tables 5.2 and 5.3) and the MSO set selector in (5.10), the isolability constraint for sensor faults fs 3and fs 4is q2q3+q3+q1q3+q1q4+q2q4+q4≥q3q4(5.21) BIP Optimisation for Sensor Placement 75 5.3 BIP Optimisation for Sensor Placement Now, the sensor placement problem for fault diagnosis can be formulated as a BIP problem using the constraints previously introduced. Given the diagnosis specifications FDPand F2 I, the number of constraint concerning fault detectability is equal to the number of faults in FDPplus the number of sensor faults in FDS, |FDP∪FDS|=l+k(5.22) On the other hand, fault isolability constraints are defined from pairs of faults. This means that all possible detectable faults must be combined in pairs, such that every pair of faults does not belong to the same set F∈F2 I. Assume that F2 Iis partitioned in msets, F2 I={F1, F2,···, Fm}, then the number of constraints concerning fault isolability is m−1 X i=1 |Fi| m X j=i+1 |Fj|(5.23) In order to correctly apply expressions (5.16), (5.18) or (5.20), we need to take into account whether the involved faults in each isolability constraint are process or sensor faults. A cost vector cis defined based on the cost of each sensor in S:ci= C(si), with si∈S. Then, given the cost vector c, matrices Wand V extracted from the set of MSO sets ΩSand the diagnosis specifications FDPand F2 I, the sensor placement problem for fault diagnosis based on BIP optimisation is formulated as: min qcTqsubject to: (5.24) ρi= k Y j=1 wij ·qj+ (1 −wij)i={1, . . . , n} n X i=1 vijρi≥1j={1,...,l} n X i=1 wijρi≥qjj={1, . . . , k} n X i=1 ρi|vij1−vij2| ≥ 1j1, j2∈ {1,...,l}and fp j1, fp j2are isolable in F2 I 76 Chapter 5. Binary Integer Optimisation for Sensor Placement n X i=1 ρi|vij1−wij2| ≥ qj2 j1∈ {1,...,l}, j2∈ {1,...,k} and fp j1, fs j2are isolable in F2 I n X i=1 ρi|wij1−wij2| ≥ qjqqj2 j1, j2∈ {1,...,l}and fs j1, fs j2are isolable in F2 I qi∈ {0,1}i={1,...,k} This problem can be solved, for example, by IBM ILOG CPLEX1, which is a software application for solving both, linear and non-linear, optimisation problems. Example 5.7. To show the complete formulation of the problem, consider again the compressor model presented in Examples 5.1 and 5.2. Recall that there are two process faults fp 1and fp 2and 4 possible sensors to be placed {i, τ, W, v}which can be faulty. Therefore, four sensor faults, fs 1,fs 2,fs 3and fs 4are defined. The set of MSO sets ΩS={ω1,...,ω10}was introduced in (5.9). The cost of the sensors is C(i) = 50, C(τ) = 200, C(W) = 120 and C(v) = 30, therefore the cost vector is c=50 200 120 30 T(5.25) All faults must be detectable and isolable (which coincides with the maximum diagnosis specifications). Thus, diagnosis specifications are FDP={fp 1, fp 2} FDS={fs 1, fs 2, fs 3, fs 4} F2 I={{fp 1},{fp 2},{fs 1},{fs 2},{fs 3},{fs 4}} The optimisation problem is formulated as min q50q1+ 200q2+ 120q3+ 30q4subject to: (5.26a) q1q2+q1q3+q1+q2q4+q3q4+q4≥1 (5.26b) q3+q2+q1+q4≥1 (5.26c) q1q2+q1q3+q1+q1q4≥q1(5.26d) q2q3+q2+q1q2+q2q4≥q2(5.26e) q2q3+q3+q1q3+q3q4≥q3(5.26f) q1q4+q2q4+q3q4+q4≥q4(5.26g) 1Visit www.ibm.com for further information. BIP Optimisation for Sensor Placement 77 q3+q2+q1q2+q1q3+q2q4+q3q4≥1 (5.26h) q1q4+q2q4+q3q4+q4≥q1(5.26i) q2q3+q2+q1q3+q1+q3q4+q4≥q2(5.26j) q2q3+q3+q1q2+q1+q2q4+q4≥q3(5.26k) q1q2+q1q3+q1+q1q4≥q4(5.26l) q3+q2+q1q2+q1q3+q1q4+q4≥q1(5.26m) q2q3+q3+q1q2+q1+q2q4+q4≥q2(5.26n) q2q3+q2+q1q3+q1+q3q4+q4≥q3(5.26o) q3+q2+q1+q1q4+q2q4+q3q4≥q4(5.26p) q2q3+q2+q1q3+q1+q1q4+q2q4≥q1q2(5.26q) q2q3+q3+q1q2+q1+q1q4+q3q4≥q1q3(5.26r) q1q2+q1q3+q1+q2q4+q3q4+q4≥q1q4(5.26s) q3+q2+q1q2+q1q3+q2q4+q3q4≥q2q3(5.26t) q2q3+q2+q1q2+q1q4+q3q4+q4≥q2q4(5.26u) q2q3+q3+q1q3+q1q4+q2q4+q4≥q3q4(5.26v) qi∈ {0,1}i={1,2,3,4}(5.26w) Constraints (5.26b) and (5.26c) concern detectability of process faults and constraints (5.26d)-(5.26g) concern detectability of sensor faults. Constraint (5.26h) concerns isolability between process faults, constraints (5.26i)-(5.26p) concern isolability between process and sensors faults and finally constraints (5.26q)-(5.26v) concern isolability between sensor faults. After solving this optimisation problem with ILOG OPL, the optimal solution is q∗=1 0 1 1 T which corresponds to the set of optimal sensors S∗={i, W, v}. By substituting this result into (5.10), the following MSO set selectors are obtained: ρ1= 0 ρ6= 1 ρ2= 1 ρ7= 1 ρ3= 0 ρ8= 0 ρ4= 0 ρ9= 1 ρ5= 1 ρ10 = 1 (5.27) So the MSO sets needed to fulfil the diagnosis specifications are ω2,ω5,ω6, ω7,ω9and ω10. Remark also that the selected MSO sets are indeed the set of MSO sets generated by the solution S∗(i.e. ΩS∗). Table 5.4 is built from 78 Chapter 5. Binary Integer Optimisation for Sensor Placement the selected MSO sets. Note that all process and sensor faults are detectable and isolable (i.e. the diagnosis specifications are fulfilled). e2e3eieWev ω2× × ω5× × × ω6× × × ω7× × ω9× × × ω10 × × × Table 5.4: Fault equations contained in the selected MSO sets. 5.4 Redundant Sensor Extension The formulation presented in (5.24) can be extended to also involve redundant sensors S′. First, the variable vector is extended to (qTq′T)Twhere q′= (q′ 1···q′ k)Trepresents the redundant sensors. The same sub-index indicates that q′ irepresents the redundant sensor of qi. A redundant sensor can only be installed when the non-redundant sensor is already installed. This can be formulated by the following constraint, qi−q′ i≥0 (5.28) for all redundant sensors. The only combination that does not fulfil this inequality is for qi= 0 and q′ i= 1 which is the case that must be avoided. Recalling the conclusions drawn in Section 3.3.3, it is known that redundant sensors do not improve process fault specifications. Recall also that when a redundant sensor is placed, both, the non-redundant and the redundant sensor faults, become directly detectable and isolable from the other possible faults. These properties will help to efficiently handle redundant sensors in the BIP formulation. First, since redundant sensors do not affect process faults, only those constraints that are affected by sensor faults must be redefined. Recall, from Theorem 3.4, that a non-redundant sensor fault becomes directly detectable Binary Integer Linear Programming for Sensor Placement 79 when its redundant sensor is placed. Then, constraint (5.14) is redefined as q′ j+ n X i=1 wijρi≥qj(5.29) Now, when the redundant sensor is installed (q′ j= 1), the detectability constraint is fulfilled, no matter which MSO sets are valid. Similar modifications can be applied for isolability between process and sensors faults, and for isolability between sensor faults as well. Thus, the isolability constraint (5.18) between a process and a sensor fault is redefined as q′ j2+ n X i=1 ρi(vij1−wij2)2≥qj2(5.30) and the isolability constraint (5.20) between two sensors faults is redefined as q′ j1+q′ j2+ n X i=1 ρi(wij1−wij2)2≥qj1qj2(5.31) In conclusion, dealing with redundant sensors entails: extending the optimisation vector to also include the redundant sensors in S′, adding the constraints (5.28), and modifying constrains (5.14), (5.18) and (5.20) according to (5.29), (5.30) and (5.31), respectively. Therefore, no new MSO sets are computed and the set of constraints is not significantly increased. However, the set of optimisation variables is increased, being this the main drawback, since the time required to find a solution for such problems is exponential with the number of optimisation variables. 5.5 Binary Integer Linear Programming for Sensor Placement Up to now, in this chapter, it has been seen how the sensor placement problem can be formulated as a BIP problem with non-linear constraints. This is basically due to the fact that the MSO set selector is a product of optimisation variables and therefore non-linear. Here, the same problem is transformed into a linear optimisation problem and thus refereed as Binary Integer Linear Programming (BILP). So, a standard branch and bound algorithm, which is in general more efficient than the algorithms used for a non-linear optimisation, may be used. 80 Chapter 5. Binary Integer Optimisation for Sensor Placement This section is therefore devoted to reformulate the non-linear inequalities, previously introduced, into linear inequalities. For the sake of simplicity, in the continuation it will be assumed that all detectable faults are fully isolable. This means that each set Fi∈F2 Iinvolves only one fault (i.e. |F2 I|=l+k). How to relax such an assumption will be explained at the end of this section. 5.5.1 Standard Binary Integer Linear Programming The BILP formulation (Wosley, 1998) is very similar to the well known linear programming formulation. A standard optimisation problem using BILP is formulated as a linear objective function and a set of linear inequality constraints in matrix form. This is expressed as: min xcTxsubject to: (5.32) Ax ≤b(5.33) xis binary (5.34) where xis the vector of variables, cis the vector of variable costs, Ais a matrix and bis a vector. The difference with linear programming is that the vector of variables is constrained to be binary, i.e. x∈ {0,1}for all x∈x. An standard the branch and bound algorithm developed to solve linear binary optimisation problems consists in an implicitly enumeration of all the possible combinations. Then, an upper and a lower bound are iteratively computed in order to efficiently discard combinations that are not a solution. Usually the upper and the lower bound are based on a constraint relaxation by means of linear programming, where the binary restriction x∈ {0,1}is omitted. In general, a solution is found, despite the exponential computational complexity of these algorithms. In the continuation, the Inmatrix will denote the identity matrix of order n, whereas 0n×mand 1n×mwill denote respectively a matrix of zeros and ones, of nrows and mcolumns. 5.5.2 Linear MSO Set Selector Clearly, the MSO set selector constraint presented in (5.7) is not linear and therefore it cannot be casted as a linear inequality in (5.33). However, replacing the product by a summation implies that the sum equals kwhen Binary Integer Linear Programming for Sensor Placement 87 min (q1···q4λ1···λn)T50q1+ 200q2+ 120q3+ 30q4+ 0λ1+···+ 0λ10 subject to: 0 B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B @ 0−1−10 4000000000 0 0 −10 0400000000 0−100 0040000000 −1−100 0004000000 −1 0 −10 0000400000 −1000 0000040000 −1 0 0 −1 0000004000 0−1 0 −1 0000000400 0 0 −1−1 0000000040 0 0 0 −1 0000000004 0 0 0 0 0 0 0 −1−1−1 0 −1−1−1 0 0 0 0 0 −1−1 0 0 −1 0 0 0 −1 1 0 0 0 0 0 0 −1−1−1−1000 0 1 0 0 −1 0 −1−1 0 0 0 −100 0 0 1 0 −1−100−1 0 0 0 −1 0 0 0 0 1 0 0 0 0 0 0 −1−1−1−1 0 0 0 0 0 −1−1−1−100−1−1 0 1 0 0 0 0 0 0 0 0 0 −1−1−1−1 0 1 0 0 −1 0 −1 0 −1−1 0 0 −1−1 0 0 1 0 −1−1 0 −1 0 −1 0 −1 0 −1 0 0 0 1 0 0 0 −1−1−1−1000 1 0 0 0 0 −1−1−1−1 0 −100−1 0 1 0 0 −1−1 0 −1 0 −1 0 −1 0 −1 0 0 1 0 −1 0 −1 0 −1−1 0 0 −1−1 0 0 0 1 0 −1−1 0 0 −1−1−1−1 0 1 1 0 0 −1 0 −1 0 −1−1−1−100 1 0 1 0 −1−1 0 −1 0 −1−1 0 −1 0 1 0 0 1 0 0 0 −1−1−1 0 −1−1−1 0 1 1 0 0 −1−1−1−100−1−1 0 0 1 0 1 −1 0 −1−1 0 0 −1 0 −1−1 0 0 1 1 −1−100−1 0 −1−1 0 −1 1 C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C A 0 B B B B B B B B B B B B B B B B B B B B B B @ q1 q2 q3 q4 λ1 λ2 λ3 λ4 λ5 λ6 λ7 λ8 λ9 λ10 1 C C C C C C C C C C C C C C C C C C C C C C A ≤ 0 B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B @ 2 3 3 2 2 3 2 2 2 3 −1 −1 0 0 0 0 −1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C A (5.57) `q1··· q4λ1··· λ10 ´is a binary vector (5.58) where the dashed lines show the different matrices and vectors used in this formulation. This optimisation problem can be solved, for example, by either IBM ILOG CPLEX or MATLAB. In this case the bintprog command of the Optimization Toolbox in MATLAB is used. The result returned is q=1 0 1 1 T(5.59a) 88 Chapter 5. Binary Integer Optimisation for Sensor Placement λ=0 1 0 0 0 0 1 0 1 0 T(5.59b) The result obtained is the same as in Example 5.7 (i.e. S∗={i, W, v}). The difference is that the selected MSO sets are now ω2,ω7and ω9. This is due to the one-way implication in (5.38), which ensures that a non-valid MSO set is never selected. However, not all valid MSO sets will be selected. At the beginning of this section it was assumed that any detectable fault was fully isolable from the others. If this is not the case (i.e. there are some pairs of faults that are non-isolable in the diagnosis specifications F2 I), then it suffices to remove those row-constraints in (5.55) that are related to the non-isolable pairs of faults. The linear approach presented here can be easily extended to also cover redundant sensors. In fact, the extra constraints introduced in Section 5.4 to handle redundant sensors are linear. Thus, the same constraints are also applicable to the BILP formulation. 5.5.5 Sensor Placement and MSO Set Optimisation Since the MSO set selector variable is now in the optimisation vector, it is possible to extend the optimisation to the family of MSO sets. There may exist several reasons for optimising the set of MSO sets. As an example of different criteria for optimizing the set of MSO sets, consider the following: •Minimising the number of the chosen MSO sets: set the same cost for each MSO set. •Minimising the complexity of the chosen MSO sets: set a cost proportional to the number of equations involved in each MSO set. •Maximising the isolability properties of the chosen MSO sets: set a cost proportional to the number of (process and sensor) fault equations contained in each MSO set. Now, λis not treated as dummy vector. Instead, cost for each MSO set is included in the cost vector. Hence, the optimisation problem is reformulated as min (qTλT)T(cTcT λ)q λsubject to: (5.55) and (5.56) (5.60) where vector cλ=cλ1··· cλnTis a column-vector of nelements stating the cost of the MSO sets. Binary Integer Linear Programming for Sensor Placement 89 Fault Isolability Constraints for MSO Set Optimisation A problem arises in the fault isolability constraints when both, sensors and MSO sets, are optimised at the same time (as in (5.60)). Since not all the possible MSO sets may be used (only the optimal MSO sets will be used), the symmetric property of fault isolability (see Section 3.2) is no longer ensured. This can be easily showed in the following example. Example 5.9. Example 5.8 is used, but now the cardinality of the set of selected MSO sets is also optimised (i.e. each MSO set has an associated cost of 1). The problem is formulated as min (q1···q4λ1···λ10)50q1+ 200q2+ 120q3+ 30q4+λ1+···+λ10 subject to: (5.57) and (5.58) The result is the same as in (5.59), S∗={i, W, v}and the set of optimal MSO sets Ω∗={ω2, ω7, ω9}. Table 5.5 shows which fault equations are included in each selected MSO set. In this table, it can be seen, for example, that process fault fp 2(related with e3) is not isolable from a fault in sensor Wsince there is no MSO set ωin Ω∗such that e3∈ω∧eW6∈ ω(5.61) However, a fault in sensor Wis isolable from process fault fp 2since ω9 contains eWbut not e3. e2e3eieWev ω2× × ω7× × ω9× × × Table 5.5: Fault equations contained in the optimal selected MSO sets. As the example shows, the symmetric property does not hold as long as residual exoneration (Trav´e-Massuy`es et al., 2006) is not assumed. The residual exoneration assumption is adopted when it can be guaranteed that a fault always affects the residual by exceeding its threshold. However, this 90 Chapter 5. Binary Integer Optimisation for Sensor Placement is not very realistic in practical situations, since a fault may not always exceed the residual generator threshold under noise or model uncertainty. Then, the isolability constraints must be reformulated in order to handle the isolability specification when MSO set optimisation is desired within the BILP formulation. The new isolability constraint formulation can be deduced directly from Corollary 3.2. Let fp j1and fp j2be two process faults, then fp j1is isolable from fp j2if n X i=1 vij1(1 −vij2)λi≥1 (5.62) This constraint is satisfied as long as there is at least one valid MSO set (λi= 1) such that it contains the fault fp j1equation (vij1= 1) but not the fault fp j2equation (vij2= 0). Constraint (5.62) is the counterpart of constraint (5.16). From this, it can be easily deduced the following constraints: •A process fault fp j1is isolable from a sensor fault fs j2fault if n X i=1 vij1(1 −wij2)λi≥qj2(5.63) •A sensor fault fs j1fault is isolable from a process fault fp j2if n X i=1 wij1(1 −vij2)λi≥qj1(5.64) These two constraints, (5.63) and (5.64), are the counterpart of (5.18). •A sensor fault fs j1fault is isolable from a sensor fault fs j2fault if n X i=1 wij1(1 −wij2)λi≥qj1+qj2−1 (5.65) which is the counterpart of constraint (5.20). Now, since the symmetric property does not hold, given two faults, f1 and f2, it is required to check whether f1is isolable from f2as well as f2 is isolable from f1. As a consequence, the number of constraints concerning isolability is extended to the number of permutations of two faults from the set of l+kdetectable faults, Pl+k 2. Recall that, beforehand, the number of Conclusions 91 isolability constraints was at most Cl+k 2. Now, optimising sensors and MSO sets requires at most two times more isolability constraints, Pl+k 2=(l+k)! (l+k−2)! = 2Ck+l 2(5.66) 5.5.6 BILP for MSO Set Optimisation The BILP formulation could also be used to only optimise the set of MSO sets by omitting the sensor placement problem. Given a sensor configuration, not all possible MSO sets are needed to implement a diagnosis system. Usually, a reduced set of MSO sets is sufficient. In this situation the best MSO sets can be chosen by performing such optimisation, based on a criterion as those proposed in Section 5.5.5. Given a set of nMSO sets Ω and a set of ldetectable and fully isolable faults in Ω, the optimal MSO sets are sought such that the diagnosis specifications are preserved. This problem can be easily solved by the following BILP formulation, min λcT λλsubject to: (5.67) −VT −V′ ff Tλ≤−1l×1 −1Pl 2×1(5.68) λis binary (5.69) where V′ ffis an n×Pl 2matrix, built from (5.62) by using all Pl 2fault pairs. Note that now there is no distinction between process and sensor faults. A sensor fault is regarded as a process fault since sensors are assumed already installed in the system. 5.6 Conclusions The optimal sensor placement problem for fault diagnosis has been presented as a binary integer optimisation problem. This allows us to solve the problem by means of standard algorithms included in powerful packages devoted to non-linear programming. Therefore, there is no need to cope with the optimal search since these tools apply internal heuristics in order to make the search as efficient as possible. However, the nature of the problem is combinatorial, which means that the time required to find a solution is, in general, exponential with the number of variables to optimise. 92 Chapter 5. Binary Integer Optimisation for Sensor Placement In any case, the main drawback of this approach is the need of generating all the MSO sets with all the sensors installed, i.e. the set ΩS. Note that computing ΩScan be troublesome for systems with a large set of candidate sensors, since the number nof MSO sets grows exponentially with the redundancy degree of the system. In fact, this is usually the main limitation of this approach for systems with a large number of candidate sensors, since the number of all possible MSO sets becomes extremely large. In general, it can be stated that if the set ΩScan be generated, then binary integer programing for sensor placement can be applied with no computational restriction. However, when generating all MSO sets is not feasible, the method can still be applied if only a reduced number of MSO sets is considered. The same problem has been reformulated by using linear constrains. Similar conclusions can be drawn for the linear approach. The difference is that standard algorithms developed for linear integer programming can be used. Furthermore, due to the fact that the MSO set selector variable, λ, needs to be included in the optimisation vector, the optimisation is extended to cover both sensors and MSO sets. Hence, the optimal set of sensor to be installed for a given diagnosis specifications and the optimal set of MSO sets to be implemented in the diagnosis system can be obtained in one step. However, the computational complexity is increased. Furthermore, to carry out this double optimisation, fault isolability constraints are reformulated since the symmetric property of fault isolability is lost when not all possible MSO sets are considered in the final solution. This can be avoided if residual exoneration is assumed, though Definition 3.3 is no longer valid. In the present approach, sensor redundancy is introduced without recomputing any new MSO set in both, non-linear and linear, approaches. Moreover, detectability and isolability for both, process and sensor faults, are addressed as diagnosis specifications. However, the method could be extended to other diagnosis specifications. The only requirement is that these extra specifications should be based on MSO sets and expressed as non-linear inequality constraints in the case of non-linear BIP and as linear inequality constraints in the case of BILP. Chapter 6 Sensor Placement for Causally Computable MSO Sets In this chapter, a methodology to solve a particular case of the sensor placement problem for fault detection and isolation is addressed. This particular case deals with the causal computability of unknown variables in the residual computation. The causal computability of unknown variables is a key issue when deriving residuals for complex systems. Those systems usually involve non-linear equations that must be solved when implementing residual generators. Addressing the causal computation of the unknown variables in each MSO set guarantees that a residual generator can be directly implemented from an MSO set. However, the disadvantage of this approach is that only a sub-class of MSO sets can be used for this purpose. The sensor placement problem for causally computable MSO sets is also addressed in order to find the sensors such that this required sub-class of MSO sets can be generated. 6.1 Causal Computability on Residual Generation In structural model based diagnosis, consistency may be checked by using a set of redundant sub-models (i.e. MSO sets of equations). A residual generator can be implemented from an MSO set by computing the internal unknown variables through a convenient manipulation of the equations and later checking consistency in a redundant equation. This concept is known (Blanke et al., 2006) as a causal interpretation of the computability. The re- 93 94 Chapter 6. Sensor Placement for Causally Computable MSO Sets sult is a directed bi-partite graph, named computation sequence, that shows how internal values can be computed from the equations (value propagation) in every redundant sub-model. However, to guarantee that the residual is generated by using non-linear equations, the structural model framework needs to be adapted in order to handle causal computability. Few works focus this causal assignment in the fault diagnosis field. For instance, in (Ploix et al., 2008) causality is taken into account in the computation of the set of redundant sub-models. In (Sv¨ard and Nyberg, 2008) causality is treated in derivative and integral computations by considering which solver tools are available, whereas in (de Flaugergues et al., 2009) the causality of invertible function is fitted in the structural analysis. An MSO set of equations has the property of a complete matching in the unknown variable set, plus an extra non-matched equation named the redundant equation. This redundant equation is used for checking consistency. As an example, assume the following MSO set (6.1), consisting of three equations (e1,e2and e3), where {y1, y2}are the known variable set and {x1, x2}are the unknown variable set. A possible complete matching of the unknown variable set into the equation set is {(e1, x1),(e2, x2)}, so that the redundant equation is e3. e1:x1=h1(y1) e2:x2=h2(x1, y2) e3:h3(x1, x2, y1) = 0 (6.1) As mentioned above, one way to obtain a residual from this MSO set is building the computation sequence, which tells how to compute the unknown variables. Following with the example, the matching is interpreted as e1solves x1and e2solves x2. Figure 6.1 shows the computation sequence derived from this matching. Now, the internal values can be straightforwardly propagated, according to the computation sequence, to compute the residual as r(y1, y2) = h3(h1(y1), h2(h1(y1), y2), y1) (6.2) where, r(y1, y2)≃0 means that there is consistency r(y1, y2)6≃ 0 means that there is no consistency (6.3) Using this procedure when designing residual generators in complex systems gives an intuitive idea on how the residual can be computed. However, solving a certain variable in a non-linear equation could be a hard task or even could not be possible, which ultimately poses restrictions on the residual generator design. This means that not all matchings can be used to Causal Computability on Residual Generation 95 y2 y1 e1 x1e2 x2 e3 r(y1, y2) Figure 6.1: Computation sequence. design a residual generator. For instance, now consider that the matching is {(e3, x1),(e2, x2)}in (6.1). Assume that x1cannot be expressed as an explicit variable in e3. Thus, the value of x1cannot be directly computed from x2and y1. So, other tools (e.g. numeric solvers, symbolic manipulation of formulae, etc.) should be used to compute x1. Therefore no computation sequence can be derived from this matching. Most of the previous works, that have addressed this topic, state that it suffices the existence of a computation sequence to be able to compute a residual by means of value propagation. However, these works allow the existence of loops inside the computation sequence, which does not guarantee that the computations can be performed. This is shown in next example. Consider the set of non-linear equations (6.4), where x1and x2are unknown variables and y1and y2are known variables. e1:h1(x1, x2, y1) = 0 e2:h2(x1, x2, y2) = 0 e3:h3(x1, x2) = 0 (6.4) Assume that x1can be computed by means of e1and x2can be computed by means of e2. A causal matching exists, {(e1, x1),(e2, x2)}, and therefore the corresponding computation sequence (see Figure 6.2) can be derived. This means that e1and e2can be rearranged as e′ 1:x1=g1(x2, y1) e′ 2:x2=g2(x1, y2)(6.5) Then, propagating variable x2into the first equation, x1=g1(g2(x1, y2), y1) (6.6) where x1may not be directly computable as an explicit variable. This situation arises since the computation sequence in Figure 6.2 contains the 96 Chapter 6. Sensor Placement for Causally Computable MSO Sets y2 y1 e2 e1 x2 x1e3 r(y1, y2) Figure 6.2: Computation sequence with loop. following loop, e1→x1→e2→x2→e1(6.7) which imposes that variables x1and x2should be instantiated at the same time since the value of x1depends on x2and vice versa. This kind of loops is known as algebraic loops. It is not always possible to break an algebraic loop and find an analytical expression that solves the unknown variables. An algebraic loop can be solved using other methods like numeric solvers or non-linear optimisation. However, there is no guarantee that these methods find the solution (numeric solvers might not converge and non-linear optimisation might find a local optimum) or the time needed to find the solution can be large. On the other hand, from a structural point of view, it is not possible to know if a given algebraic loop can be broken to derive an explicit analytical expression that permits to solve the unknown variables. Therefore, residual generators that depend on submodels that imply the inverse computation of non-invertible functions will be excluded. Furthermore, equation subsets that involve both, algebraic and differential, loops in the computation sequence will be excluded as well. So that, no complex solving tools will be needed and the residual computation will be ensured. On the other hand, to keep the simplicity of the approach and at the same time reduce the restrictiveness, sub-models including linear loops will not be excluded, since solving linear equations is not a complex task. In order to cope with causalities in the unknown variable computation, existing structural methods for finding sub-models and computational sequences have to be modified. The main objective of this approach is to perform diagnosis analysis and sensor placement by taking into account a class of residual generators that Detectability and Isolability with Causal Relations 103 that can not be computed in a computation sequence. Furthermore, remark that extracting the computation sequence given by sub-graph (E,X;A), (decomposed as in Figure 6.4) is straightforward since now the matchingdiagonal establishes a true interpretation of which equation solves each variable. 6.4 Detectability and Isolability with Causal Relations This section is devoted to explain how to determine the set of detectable faults and the set of isolable faults when causal computations are taken into account in the residual computation. Clearly, there exists a complete matching in the variables of the causally computable sub-model E, see Figure 6.4. Hence, there is no under-determined part in E(i.e. E−=∅). Remark that this matching is a causal matching, all the edges represent either causal relations with no loops or linear relations with possible loops. Because the matching is complete, it follows that the over-determined set of equations, E+, contains part of this matching (variables in E+are also causally computable). In fact, E+is the part of the model that is causally computable and contains redundancy. Fault diagnosis analysis based on the Dulmage-Mendelsohn decomposition can be performed on the equation set E. 6.4.1 Causal Structural Detectability According to Theorem 3.1, all fault equations in the over-determined part correspond to detectable faults. The same argument can be applied to the causally computable sub-model Eof the model Mwhen causal computations are considered. Thus, fault detectability in the causal framework is next defined. Definition 6.3 (Causally detectable fault).A fault fis causally detectable in a structural model Mif the corresponding fault equation efis in the over-determined part of the causally computable sub-model, ef∈ E+(6.18) where E= ComputableModel(M), according to Algorithm 6.3. Given a causal structural model Mand a set Fof faults, Algorithm 6.4 finds all causally detectable fault equations. The algorithm first computes 104 Chapter 6. Sensor Placement for Causally Computable MSO Sets the causally computable model Eby means of Algorithm 6.3, and then expression (6.18) is applied to find the causally detectable fault equations, MFD⊆M. Algorithm 6.4 MFD= CausalDetectability(M, MF) E:= ComputableModel(M) MFD:= E+∩MF The set of causally detectable faults FDcan be directly determined from its corresponding fault equation set, FD={f∈F|ef∈MFD}(6.19) 6.4.2 Causal Structural Isolability Isolability analysis is based on Theorem 3.2. Given a model Mand a set of detectable faults FD, a fault fi∈FDis structurally isolable from fj∈FD if fjis detectable in the sub-model M\ {fi}. The same reasoning can be applied to fault isolability when causal computations are considered. Definition 6.4 (Causally isolable fault).A fault fiis causally isolable from a fault fjin a structural model M, if fault fiis causally detectable in the causally computable sub-model of M\{efj}, efi∈ E+ fj(6.20) where Efj= ComputableModel(M\{efj}), according to Algorithm 6.3. Now, the symmetric isolability property (see Section 3.2) does not hold for causal isolability (a fault fithat is causally isolable from a fault fjdoes not imply that fjis causally isolable from fi) since the causally computable sub-model is not preserved when removing different non-isolable fault equations. Consequently, isolability characterisation F2cannot be applied in the causallythe computable framework. This is illustrated in the next example. Example 6.1. Assume the following causal structural model represented in Table 6.1 with M={e1, e2, e3, e4}, where the causally detectable faults f1and f2affect respectively equations e1and e2(ef1=e1and ef2=e2). Applying Algorithm 6.3 for M\{e1}and M\{e2}yields Ef1= ComputableModel((M\{e1}) = {e2, e3, e4} Ef2= ComputableModel((M\{e2}) = {e4} Detectability and Isolability with Causal Relations 105 x1x2 f1→e1∆ ∆ f2→e2× × e3∆× e4× Table 6.1: Non-symmetric isolability example. Then, the over-determined part of each set is computed by means of the DM-decomposition, E+ f1={e2, e3, e4} E+ f2=∅ where, according to Definition 6.4, f2is isolable from f1whereas the reverse does not hold. Thus, the symmetry property is not satisfied. Algorithm 6.5 computes the causally isolable faults for each fault in FD. First, the algorithm computes the causally computable sub-model from the equation set M\{ef}and then finds the causally isolable faults from fby applying (6.20). Algorithm 6.5 MFI= CausalIsolability(M, MF) MF1 I:= ∅ for all ef∈MFdo Ef= ComputableModel((M\{ef}) MFI(f) := E+ f∩MF end for The output of Algorithm 6.5 is a family of fault equation sets where each MFI(f) contains the fault equations corresponding to the faults that are isolable from f. Therefore, the family of isolable sets F1 I={...,FI(fi),...} can be built as FI(fi) = {f∈F|ef∈MFI(fi)}(6.21) 106 Chapter 6. Sensor Placement for Causally Computable MSO Sets 6.5 Sensor Placement based on Causal Relations Given a causal structural model, the causal detectability and isolability of the model can be computed by using Algorithms 6.4 and 6.5, respectively. In this section, a method to solve the sensor placement when causal computations are considered will be introduced. Sensors are chosen for installation by adding their corresponding sensor equation to the system equation set. Remark that now a causal relation exists between a sensor equation esand the unknown variable that becomes measured, (es,varX(es)) ∈A×(6.22) 6.5.1 Maximum Causal Detectability and Isolability Specifications According to Section 3.4, maximum detectability specification is ensured when all candidate sensors are installed in the system. Hence, causally detectable faults and causally isolable faults can be determined beforehand. However, there may be some useless sensors that do not improve diagnosis capabilities when causality is taken into account. Let ESbe the causally computable model of a structural system model Mwith all possible sensors Sinstalled in the system, (i.e. ES= ComputableModel(M∪MS)). Then the set of useful sensors S0⊆Sis determined according to S0={s∈S|es∈ E+ S}(6.23) Therefore, there is no need to consider further sensors from S\S0in the sensor placement analysis when causality is considered. Given a structural model Mof the system and the set of faults F(involving both, process faults FPand sensor faults FS, i.e. F=FP∪FS), maximum causal detectability is computed by Algorithm 6.4 when all useful sensors S0are chosen for installation, MFDmax = CausalDetectability((M∪MS0), MF) (6.24) Then, maximum causally detectable faults are determined by FDmax ={f∈F|ef∈MFDmax }(6.25) Remark that all useful sensor faults are causally detectable since E+ S⊆ MFDmax holds. Sensor Placement based on Causal Relations 107 Maximum causal isolability is also determined when all sensors S0are installed in the system. Thus, Algorithm 6.5 can be used to compute the maximum causal isolability among the maximum detectable faults, MFImax = CausalIsolability((M∪MS0), MFDmax ) (6.26) Then, maximum causal isolability F1 Imax ={...,FI(fi),...}is determined by FI(fi) = {f∈F|ef∈MFImax (fi)}(6.27) In the following, maximum causal detectability, FDmax , and maximum causal isolability, F1 Imax , will be the assumed diagnosis specifications for the sensor placement problem when causal computations are considered in the residual implementation. However, remark that lower specifications than the maximum ones could also be used in this approach. Furthermore, for notational convenience, it will be assumed that non-useful sensors have been removed before the sensor placement analysis (i.e. S,S0). 6.5.2 Sensor Placement Algorithm The main idea to solve the sensor placement problem is computing causally detectable faults and the causally isolable faults for a given sensor configuration and then test whether these faults fulfil the diagnosis specifications. Let Sk⊆Sbe a sensor configuration. Then, the causally detectable faults are computed as MFD= CausalDetectability((M∪MSk), MFDmax ) (6.28) Recall that detectable faults of the non installed sensors should not be considered. Then, causal detectability specifications are fulfilled as long as it holds that MFD=MFDmax \M¯ Sk(6.29) where M¯ Skare the sensor equations of the not installed sensors, ¯ Sk=S\Sk. Expression (6.29) is fulfilled as long as all process faults and all sensors Sk faults in MFDmax are detectable. Causal isolability can be similarly reasoned. Let MFIbe the causal isolability for sensor configuration Sk, MFI= CausalIsolability((M∪MSk), MFDmax ) (6.30) Then, the causal isolability specifications are fulfilled if MFI(f) = MFImax (f)\M¯ Sk∀f:ef∈MFD(6.31) 108 Chapter 6. Sensor Placement for Causally Computable MSO Sets A procedure Psimilar to the one introduced in (3.58) is designed. Now, the diagnosis specifications to be fulfilled are maximum causal detectability and isolability of both process and installed sensor faults. Algorithm 6.6 summarises all this procedure and returns a logic value: 1 if the diagnosis specifications are fulfilled and 0 otherwise. Algorithm 6.6 isFeasible(Sk,S,M, MFDmax , MFImax ) ¯ Sk:= S\Sk MFD= CausalDetectability((M∪MSk), MFDmax ) if MFD6=MFDmax \M¯ Skthen return 0 % Causal detectability specifications are not fulfilled end if MFI= CausalIsolability((M∪MSk), MFDmax ) for all ef∈MFDdo if MFI(f)6=MFImax (f)\M¯ Skthen return 0 % Causal isolability specifications are not fulfilled end if end for return 1 % Causal detectability and isolability specifications are fulfilled The same search strategy adopted for the incremental approach in Algorithm 4.1 is here applied but now using Algorithm 6.6 to verify the diagnosis specifications. Algorithm 6.7 performs the optimal sensor search for maximum causal detectability and isolability specifications. Algorithm 6.7 S∗= CausalSensorPlacement(M,S, C, MFDmax , MFImax ) k:= 1 repeat Sk:= arg min Sk⊆S{C(Sk) : Sk∈(2S\k−1 ∪ l=1{Sl})} k:= k+ 1 until isFeasible(Sk,S,M, MFDmax , MFImax ) = 1 S∗:= Sk The algorithm first chooses the set of sensors with the fewest cost, Sk, not previously chosen and then tests whether the set of causally detectable and isolable faults, computed for the sensor configuration Sk, satisfy the maximum causal detectability and isolability specifications. If satisfied, then the solution is found. Otherwise the algorithm continues searching for the next set of sensors until the optimal solution is found. Sensor Placement based on Causal Relations 109 It is worth noting that no MSO set is generated for this approach. Therefore the MSO set computation burden is avoided. Note also that the same algorithm can be applied when causality is not considered. This would imply modifying Algorithm 6.6 in order not to consider causality. 6.5.3 Redundant Sensor Extension Extending the approach to handle redundant sensors can be straightforwardly done by increasing the initial set of sensors to also cover the redundant sensors, i.e. S∪S′. However, as in the other approaches, considering redundant sensors increases the number of sensor combinations to test and therefore the computing time of the algorithm is, in general, exponentially increased. How redundant sensors affect the causal detectability and isolability properties of the system will be next investigated. Let ES0be the computable part of the system model when a set of useful sensors S0is installed, and let ES0∪{es′}be the causally computable part of the same model when an extra redundant sensor s′is added. Since a redundant sensor can only be used to compute an already measured variable, no new variables are computed by installing redundant sensors. This implies that ES0∪{es′}=ES0∪{es′}(6.32) From this expression, it is easy to see that installing redundant sensors does not contribute to improve the causal detectability nor the causal isolability of process faults. Furthermore, according to (6.23), MS0⊆ ES0. Thus expression (6.32) can be rewritten as ES0∪{es′}= (ES0\MS0)∪MS0∪{es′}(6.33) which is equivalent to expression (3.44). Therefore, Theorem 3.4 also holds for the causal approach. Consequently, when a sensor and its corresponding redundant sensor are installed in the system, it can be concluded that both sensor faults are causally detectable, and moreover any causally detectable fault is causally isolable from any of these two sensor faults. This means that Algorithm 6.6 does not need to verify whether the diagnosis specifications concerning a sensor and its redundant sensor faults are fulfilled, since according to the above discussion, they become automatically detectable and isolable from any other fault. 110 Chapter 6. Sensor Placement for Causally Computable MSO Sets 6.6 Optimal Sensor Search Improvement The optimal sensor search in Algorithm 6.7 is now improved by designing an ad-hoc algorithm. This algorithm uses two heuristics based on properties of sensor placement for diagnosis. The first heuristic is related with the monotonicity of the sensor cost function. The second heuristic entails a restriction on the type of faults to be considered. Heuristic 1: Given two sensor sets, S1and S2, such that S1⊂S2, then it holds that C(S1)< C(S2) (6.34) Heuristic 2: As long as only process faults are considered, if S1is not a solution for the sensor placement then any sensor set S2such that S2⊂S1neither is a solution, S1is not a solution →S2is not a solution ∀S2⊂S1(6.35) According to Definition 3.7, Heuristic 1 directly holds. On the other hand, to intuitively motivate Heuristic 2, note that the more sensors are installed in the system, the larger becomes the number of unknown variables that can be causally computed. In fact, it holds that ES2⊆ ES1(6.36) where ES1is the computable part of the system model M∪MS1(with S1 sensors chosen for installation) and ES2is the computable part of the system model M∪MS2(with S2sensors chosen for installation). Then, according to Lemma 3.3, it holds that E+ S2⊆ E+ S1(6.37) Recall that process faults are always related to system equations in M. Therefore, if a process fault is not detectable (or isolable) with S1installed in the system, then, according to (6.37), it will not be detectable (or isolable) with S2installed in the system. Heuristic 2 does not hold for sensor faults. It may happen that sensor faults fulfil the diagnosis specifications with S2installed, whereas a fault in sensor s∈S1\S2is not detectable with S1installed. For this reason, the present algorithm will only concern process faults. The search space containing all possible sensor configurations is represented by the nodes in a graph-tree. The root node represents the sensor Optimal Sensor Search Improvement 111 configuration with all candidate sensors. The tree is built from the root node by first removing sensors with a greater cost. Thereby, nodes with a smaller cost are first built. Every node in the tree consists of two sensor sets: •node.S, the sensor configuration that the node represents (i.e. a possible solution to test). •node.R, the sensors that are allowed to be removed in its sub-nodes. An upper bound, ¯ B, and a lower bound, B ¯, are defined for every node. The upper bound is the cost of the sensor configuration to test, ¯ B(node) = C(node.S) (6.38) while the lower bound is the lowest reachable cost by exploring sub-nodes. This is computed as B ¯(node) = C(node.S)−C(node.R) (6.39) Example 6.2. A small example with four sensors, S={s1, s2, s3, s4}, will be used to illustrate the proposed search algorithm. Assume the following sensor costs: C(s1) = 6, C(s2) = 5, C(s3) = 2 and C(s4) = 1. The cost of a sensor configuration follows from Definition 3.7. The corresponding graphtree is depicted in Figure 6.5. The tree building sequence is indicated in the figure by a circled number near each node. For each node, the elements contained in node.R are indicated in bold. The search strategy is based on a depth-first search by choosing first the nodes with lowest costs and back-tracking to other not already explored nodes when a branch exploration is aborted. Throughout the search, the best solution is updated in S∗, whenever a feasible solution with lower cost than the current best one is found. A branch exploration is terminated at some node when any of the following two conditions is fulfilled: Condition 1: The node is not a feasible solution for the sensor placement problem. Condition 2: The lower bound B ¯of the current node is not lower than the cost of the current best solution: B ¯(node)≥C(S∗). 112 Chapter 6. Sensor Placement for Causally Computable MSO Sets {s1,s2,s3,s4}¯ B=14 B ¯=0 0 {s2,s3,s4}¯ B=8 B ¯=0 1 {s3,s4}¯ B=3 B ¯=0 2 {s4}¯ B=1 B ¯=0 3 {}¯ B=0 B ¯=0 4 {s3}¯ B=2 B ¯=2 5 {s2,s4}¯ B=6 B ¯=5 6 {s2}¯ B=5 B ¯=5 7 {s2, s3}¯ B=7 B ¯=7 8 {s1,s3,s4}¯ B=9 B ¯=6 9 {s1,s4}¯ B=7 B ¯=6 10 {s1}¯ B=6 B ¯=6 11 {s1, s3}¯ B=8 B ¯=8 12 {s1, s2,s4}¯ B=12 B ¯=11 13 {s1, s2}¯ B=11 B ¯=11 14 {s1, s2, s3}¯ B=13 B ¯=13 15 Figure 6.5: Search tree for {s1, s2, s3, s4}. Chapter 7 Fuel Cell Stack System Application Nowadays, fuel cell systems are in increasing interest in the scientific community as an alternative to conventional production fuel-fossil based energy. The energy produced by fuel cells is included in the so-called renewable energies and has serious possibilities to be the future energy. For this reason, many works on fuel cells technology have been recently published. However, there are only few works on diagnosis applied to fuel cell systems. The aim of this chapter is double. Firstly, the sensor placement analyisis and residual generator design are performed on the Fuel Cell Stack (FCS) system. Secondly, a systematic methodology to implement residual generators for large scale systems is presented. 7.1 Fuel Cell Stack Description A brief introduction of the basic operation principles of a fuel cell stack is given in this section. For further details on fuel cells, the reader is refereed to (Barbir, 2005), (EG&G Technical Services and Corporation, 2002) and (Larminie and Dicks, 2003). A fuel cell is an electrochemical energy converter that converts the chemical energy of fuel into electrical current. A fuel cell is in some sense similar to a battery. It has an electrolyte, a negative electrode and a positive electrode, and it generates direct electrical current through an electrochemical reaction. The difference is that a fuel cell produces energy as long as reactants are supplied. Typical reactants for fuel cells are hydrogen as fuel and oxygen as oxidant. However, the ambient air is commonly used as an 119 120 Chapter 7. Fuel Cell Stack System Application Figure 7.1: Basic principle of a PEM fuel cell. oxidant since it contains enough oxygen for the reaction. Once the reaction takes place, the fuel cell generates waste heat and water, being this the main attraction of fuel cell systems as a clean power source. The basic physical structure of a fuel cell consists of an electrolyte layer in contact with a porous anode and cathode electrode plates. A schematic representation of a fuel cell sandwich structure, and its basic operation principle is shown in Figure 7.1. There are different kinds of electrolyte layers. Here a PEM (Polymer Electrolyte Membrane or Proton Exchange Membrane) fuel cell is used. The PEM has a special property: it conducts protons but is impermeable to gas (the electrons are blocked through the membrane). Hydrogen gas is continuously fed to the anode electrode and, with the help of a catalyst, it splits into electrons and hydrogen protons, 2H2→4H++ 4e− Protons travel through the membrane, whereas electrons travel through an external electrical circuit, producing electrical energy, and come back to the Review of Works on Diagnosis of FCS Systems 121 other side of the membrane, the cathode electrode. In the catalyst on the cathode side, the electrons meet the protons and the oxygen that is fed to the cathode electrode. Then, the hydrogen protons together with the electrons combine with the oxygen, producing water, O2+ 4H++ 4e−→2H2O In fact, the overall reaction that starts at the anode side and ends at the cathode side of the fuel cell stack is a combustion reaction since the hydrogen is combusted or “burnt” in a simple reaction: 2H2+O2→2H2O Typically, the voltage produced by one cell is from 0 to 1 volt, depending on the operating point and the size of the load connected to the fuel cell. To obtain a useful voltage many cells have to be connected in series. Such a collection of fuel cells in series is known as a stack. The total stack voltage is therefore the number of cells multiplied by the average cell voltage. Auxiliary devices are required to ensure the proper operation of the fuel cell stack. Typical devices are a gas compressor, filters, valves, pumps, a refrigeration subsystem, humidifiers, flow controllers, pressure and temperature sensors, etc. Thus, the term FCS system will be used to refer to the whole system comprising the fuel cell stack and its auxiliary devices. Fuel cell stack systems present high efficiency and do not create pollutants such as hydrocarbon or nitrogen oxide. Due to their properties, fuel cells may be attractive for several applications such as vehicle propulsion or remote power sources. 7.2 Review of Works on Diagnosis of FCS Systems In the literature, the works devoted to FCS system diagnosis can be roughly divided in two groups. The first group involves works coming from the fuel cell community. In this group, some cumbersome techniques such as, those based on gas chromatography,neutron imaging or magnetic resonance imaging can be found. For further details on these techniques the reader is refereed to (Wu et al., 2008b). Furthermore, in the fuel cell community, there also exist other ad-hoc techniques that use a specialised knowledge to perform diagnosis on FCS systems. Some examples of such techniques are the polarisation curve, the current interruption or the electrochemical impedance spectroscopy. The 122 Chapter 7. Fuel Cell Stack System Application polarisation curve method is a simple technique to investigate the actual behaviour of the fuel cell. It consists in plotting the fuel cell voltage against the current density under some operation conditions and then using the expert knowledge to determine how the fuel cell is behaving. The current interruption method is used to determine the voltage losses of the fuel cell by interrupting the current of the electric circuit. The electrochemical impedance spectroscopy deals with measuring the internal resistance of the fuel cell in a frequency sweep. In (Wu et al., 2008a) and (Barbir, 2005) all these techniques are described in detail. The second group of works on FCS system diagnosis are developed from the automatic control perspective. The proposed methods are based on models and thus more general. A reduced number of papers devoted to model-based diagnosis for FCS system has been found. Next, the most outstanding works are presented. In (Riascos et al., 2008), four faults related to several subsystems of the FCS system are diagnosed by using Bayesian networks. The faults concern the air-reactor blower, the refrigeration system, a fuel loss in the membrane (also known as fuel crossover) and the hydrogen pressure. In (Escobet et al., 2009), a set of relative residuals are designed to diagnose a set of fault scenarios. Residual design techniques are also used in (Ingimundarson et al., 2008), where two test quantities are developed to detect hydrogen leaks in the anode side. Finally, in (Yang et al., 2009), a set of structured residuals is obtained from a bond-graph model of a FCS system. 7.3 FCS System Benchmark Next, a benchmark based on a FCS system is presented for diagnosis purposes. First, the analytical equations involving the fuel cell stack and its auxiliary equipment are detailed. Then, the model is built, the set of faults to be diagnosed are introduced, and finally causality is defined in order to obtain a causal structural model. The model used here was first developed and implemented in Simulink by Pukrushpan in his thesis (Pukrushpan, 2003) and later further detailed in (Pukrushpan et al., 2004). The model is widely accepted in the control community as a good representation of the behaviour of a FCS system. The system model scheme is depicted in Figure 7.2. The cathode side consists of an air compressor to feed atmospheric air to the cathode, a supply manifold that connects the compressor output with the air cooler input, and an air cooler and a static humidifier, that respectively refrigerates and humid- FCS System Benchmark 123 Compressor Supply Manifold Air Cooler Static Humidifier Fuel Cell Stack Outlet Manifold Anode Flow Control Figure 7.2: Fuel Cell Stack system. ifies the air before entering the stack. The model guarantees the required stoichiometry by regulating the hydrogen, supplied from a pressurised or liquid hydrogen tank, by means of a controlled valve. The electrochemical principles of the fuel cell stack are also modelled in order to accurately evaluate the electricity production and the stack outputs. This implies specific model equations for the anode, the cathode, the membrane and the stack voltage. Finally, the cathode outlet manifold of the fuel cell is considered in the model as an external component. The model only describes the normal operation mode. Hence purges in the anode side are not considered. This means that all the hydrogen in the anode side is consumed. It is also assumed that the temperature of the fuel cell is known and constant since its dynamic behaviour is much more slower than that of the rest of the model. These two assumptions reduce the complexity of the model by not considering a discrete behaviour nor thermodynamic equations for the stack model. The model was originally developed for control purposes. So, it is necessary to first pinpoint which equations belong to each component. In order to do so, every component is modelled apart. This means that internal and external variables are considered apart for each component, and then extra equations will be defined to interconnect the different components. Following this procedure, the component behaviour can be easily modelled, as well as system faults defined. Note that, by doing this, the number of variables and equations involving the complete model is increased. However, the redundancy degree is preserved, meaning that no extra computing effort is expected. In fact, all the structural properties needed for diagnosis will remain unaltered. The resulting FCS system model is a complex and large-scale model in- 124 Chapter 7. Fuel Cell Stack System Application volving 96 equations and 96 unknown variables. Next, the analytical equations of each subsystem are detailed and later in Section 7.3.4 the causal structure of the model will be obtained. 7.3.1 FCS System Model Variable Nomenclature For a better understanding, the meaning of the system variables is shown in table 7.1. Variable Description Units vVoltage V ωcAngular speed rad/s τTorque N·m iElectrical current A φRelative humidity WMass flow kg/s TTemperature K pPressure P a,atm,Bar ηEfficiency yMole fraction mMass kg λ .Water content Table 7.1: Variable nomenclature. Variable subscripts will be used to indicate the component a variable is related to. Table 7.2 shows the subscripts denoting the system components, as well as some other useful atributes. It is also important to point out that given a variable x, in a differential equation, its derivative with respect to time will be denoted by ˙x. Basic Principles First, some equations concerning basic physic principles are detailed. From the ideal gas law, the pressure and the mass of gas are related according to pV =mRT (7.1) FCS System Benchmark 125 Subscript Meaning cp Compressor sm Supply manifold ac Air cooler sh Static humidifier afc Anode flow control st Fuel cell stack an Stack anode ca Stack cathode mStack membrane om Outlet manifold H2Hydrogen O2Oxygen vVapour atm Atmospheric Table 7.2: Variable subscription. where pis the gas pressure, Vis the volume, mis the mass of the gas, Tis the gas temperature and Ris the gas constant. The equation used to calculate the saturation pressure, at a given temperature from 0oC to 100 oC, is log10(psat) = a4T4+a3T3+a2T2+a1T+a0(7.2) where ai, for i={0,1,2,3,4}, are constant coefficients. Since this equation is frequently used in the model description, psat(T) will be used instead of the equation in (7.2), indicating that saturation pressure only depends on temperature T. The thermodynamic properties of a gas mixture are used to represent gases of different species. Specifically, when the mixture involves water vapour, the relative humidity is given by φ2=p2psat(T1)φ1 p1psat(T2)(7.3) Air Compressor The air compressor is decomposed into two main parts. One part concerns the electric motor, whereas the other part concerns the compressor box. 126 Chapter 7. Fuel Cell Stack System Application The compressor motor is modelled using a direct current electric motor model. The first equation describes the electric part of the model, where the voltage applied to the compressor vcp is transformed into an angular speed, ωcp, through a ratio parameter kv, and electrical losses through the resistance parameter Rcp and the compressor current icp: vcp =kvωcp +Rcpicp (7.4) The real motor torque τmcp is calculated by subtracting the friction torque from the theoretical motor torque. The friction torque is calculated by means of a friction coefficient B, whereas the theoretical torque is calculated by means of the torque coefficient kt: τmcp =kt·icp −B·ωcp (7.5) The variation of the angular speed is computed by the difference between the motor and the compressor torques, Jcp ˙ωcp =τmcp −τcomcp (7.6) where Jcp is the inertia coefficient of both compressor and motor. A compressor flow map is used to determine the air flow rate, Wcp, supplied by the compressor. This is done by means of a nonlinear curve fitting method named Jensen & Kristensen (Moraal and Kolmanovsky, 1999). First, the input values (temperature, angular speed and pressure) are scaled: Tcp,cor =Tatm/288 (7.7) ωcp,cor =ωcp pTcp,cor (7.8) pratio =       0 if 10−5pcp,out 1,01325patm ≤0 10−5pcp,out 1,01325patm if 0 <10−5pcp,out 1,01325patm <1000 1000 if 10−5pcp,out 1,01325patm ≥1000 (7.9) Then, the normalized compressor flow rate, Φ, is calculated as Φ = Φmax(M)(1 −eβ(M)( Ψ Ψmax(M)−1)) (7.10) where the parameters Φmax(M), β(M) and Ψmax(M) are polynomial functions of the Match number M, defined by M=Uc √γRaTatm (7.11) FCS System Benchmark 127 Rais the gas constant, γis the specific heat ratio of the air and Ucis the compressor blade tip speed calculated by Uc=π 60dcωcp,cor (7.12) with dcthe compressor diameter outlet. Parameter Ψ in (7.10) is calculated using the following expression, Ψ = CpTatm(p γ−1 γ ratio −1) 1 2U2 c (7.13) The corrected air flow rate, Wcor,cp is calculated from the normalized compressor flow rate as Wcor,cp = Φρa π 4d2 cUc(7.14) where ρais the air density. Finally, the output air flow rate can be computed as Wcp,out =Wcp,cor patm pTcp,cor (7.15) The compressor efficiency, ηcp, is determined by means of a look-up table from the corrected air flow rate and the corrected air pressure. This relation is denoted as ηcp = LookupTable(Wcp,cor, pratio) (7.16) The air temperature at the compressor exit is calculated as Tcp,out =Tatm −Tatm ηcp (p γ−1 γ ratio −1) (7.17) and the applied torque to drive the compressor is determined using the following thermodynamic equation τcomcp =Cp Tatm ηcp (p γ−1 γ ratio −1)Wcp,out (7.18) where Cpis the specific heat capacity of the air. Equation (7.3) is used to calculate the relative humidity of the compressor output gas: φcp =pcp,outpsat(Tatm)φatm patmpsat(Tcp,out)(7.19) 128 Chapter 7. Fuel Cell Stack System Application Supply Manifold Manifolds are modelled as a lumped volume in pipes or connections between different devices. The inlet supply manifold model describes the behavior of the pipe connecting the compressor output with the air cooler input. To calculate the outlet air flow, a linearised model of a nozzle is used, Wsm,out =ksm,out(psm,out −psm,ds) (7.20) where ksm,out is the supply manifold outlet flow constant. The mass conservation principle is used in a flow balance, therefore it must hold that ˙msm =Wsm,in −Wsm,out (7.21) The air temperature is expected to decrease in the supply manifold. Therefore, the following pressure dynamic equation is used ˙psm,out =γRa Vsm (Wsm,inTsm,in −Wsm,outTsm,out) (7.22) where Vis the supply manifold volume and Tsm,out is the output temperature of the air flow through the manifold, which is calculated using the ideal gas law Tsm,out =Vsmpsm,out Ramsm (7.23) As before, equation (7.3) is used to calculate the relative humidity, φsm,out, of the supply manifold output gas: φsm,out =psm,outpsat(Tsm,in)φsm,in psm,inpsat(Tsm,out)(7.24) Air Cooler To prevent any damage in the stack membrane, the cathode inlet air has to be cooled down before entering the stack. As it was mentioned, this model does not describe the heat transfer effect. Hence an ideal static air cooler model is proposed. The outlet air temperature of the air cooler, Tac,out is set to a desired value, Tac,out =Tdes (7.25) and only the effect of the humidity change is taken into account, according to (7.3): φac,out =pac,outpsat(Tac,in)φac,in pac,inpsat(Tac,out)(7.26)