fifiwfia Pg “ . 6.3; r “Rafi... .. f r): bul- . '77- ....T‘. f. .2. 1.. 1 €- . 1. fix? - I.§ :64. 2.9,) i. 7,. .I’V1.t.z kitty}?! .1. ‘ -5: . v Yo '91.!!er :. a u .l.4fi >"1'l 'IV . K..sv..a(‘l..r~)=v, ALE-thyb v ‘ .ll.‘.!"l 'F’t'hlvdo V. ,U r ‘I 12.; .1. .1. .v: A . .0:- ‘ .‘l {Overt _ x . o a . Z 1412... $2-7»? «$3- b..?... I .z. .. on.ltl.!‘lv r“. L a r? ‘11 ‘ .D b .- ululel. let v09$efilvxi ... un- :. .lPI‘L‘l‘. ' 1O ‘ . ‘11... i v) ..\v-vn..;...lo.6nv‘..r‘ I,“ ~-. n....:.. “LIBRARIES il‘lllill\\l\\\\\\ l; ‘\‘ \\\\\\\\l\\\l 131293 This is to certify that the dissertation entitled Catastrophic Fault Diagnosis in Dynamic Systems Using Bond Graph Methods presented by Tamar Yarom has been accepted towards fulfillment of the requirements for Ph.D. degreein Mechanical Engineering KW Major professor 7% Zg/Wa / MSU i: an Affirmative Action/Equal Opportunity Institution 0-12771 LIBRARY ‘Mlchigan Statei 1 University PLACE IN RETURN BOX to remove this checkout from your record. TO AVOID FINES return on or before date due. v ’ ”Fin: 1994.. 285 1‘ JT—i it MSU Is An Affirmative Action/Equal Opportunity institution cMmMatna-pd CATASTROPHIC FAULT DIAGNOSIS IN DYNAMIC SYSTEMS AUSING BOND GRAPH METHODS By Tamar Yarom A DISSERIATION Submitted to Michigan State University in partial fulfillment of the requirements for the degree of DOCTOR OF PHILOSOPHY Mechanical Engineering Department 1990 ABSTRACT CATASTROPHIC FAULT DIAGNOSIS IN DYNAMIC SYSTEMS USING BOND GRAPH METHODS By Tamar Yarom Detection and diagnosis of faults has become a critical issue in high performance engineering systems as well as in mass produced equipment. It is particularly helpful when the diagnosis can be made at the initial design level with respect to a prospective fault list. A number of powerful methods have been developed for aiding in the general fault analysis of designs. Catastrophic faults represent the limit case of complete local failure of connections or components. They result in the interruption of energy transfer between corresponding points in the system. In this work the conventional approach to fault detection and diagnosis is extended by means of bond graph methods to a wide variety of engineering systems. Attention is focussed on catastrophic fault diagnosis. A catastrophic fault dictionary is generated from the system model based on topological properties of the bond graph. The dictionary is processed by existing methods to extract a catastrophic fault report to aid the engineer in performing a design analysis. The proposed fault dictionary was found applicable for testability design. An extension of the software for constructing the fault dictionary has been developed in order to use it as a design tool for various engineering applications. ACKNOWLEDGMENTS I would like to acknowledge all those who have contributed to the success of this thesis. Special thanks are extended to my adviser, Dr. Ronald Rosenberg, not only for his expert guidance but also for his sincere friendship and encouragement. I would like to express my gratitude to the Guidance Committee, Dr. Benjamin Bachrach for his careful reading and useful suggestions, Dr. Steven Shaw, for clarifying physical definitions and Dr. Hassan Khalil for his comments concerning this dissertation. During this research I was supported, in part, By Zonta International organization and by Ford Motor Company. The support is gratefully acknowledged. But most of all, I wish to thank ny husband, Eli, and my two daughters, Orli and Michal, for their love, support and patient, without which this work would never come to end. iv TABLE OF CONTENTS LIST OF TABLES LIST OF FIGURES NOMENCLATURE 1.INTRODUCTION 2. l. l. 1 Anticipating failures in engineering systems 2 Review of literature 1.2.1 Basic conceptual terminology 1.2.2 Fault detection methods 1.2.2.1 Simulation-before-test method 1.2.2.2 Simulation-after-test method 1.2.2.3 Summary 1.3 Organization of the thesis FAILURE MODELING USING BOND GRAPHS U.) NNN WNH MN Utb wwwwww Quid-\WNH \1 Bond graphs - a modeling tool Potential advantages of bond graphs for fault diagnosis Catastrophic failures 2.3.1 Catastrophic failure modeling in bond graphs 2.3.2 Fault sources 2.3.3 Modeling considerations of connection failures Proper bond graph Graphical presentation of FDD problem CATASTROPHIC FAULT DICTIONARY System bond graph model Structural sensitivity matrix Connection between graphical presentation and SSM Definition of CFD Construction of CPD for a tree bond graph CFD for a general graph 3.6.1 The Modified Block Graph 3.6.2 Detectable and undetectable faults The partial SSM Additional properties of CFD 3.8.1 Ambiguity sets 3.8.2 Identification by dictionary lookup viii ix H \OCDCDUJUJNHH ll 11 12 13 13 14 17 21 23 26 26 27 29 30 32 34 34 35 41 42 42 43 3.8.3 Superposition 3.9 Summary . CONSTRUCTION OF THE CATASTROPHIC FAULT DICTIONARY 4.1 General description 4 2 Inputs 4.2.1 Model description 4.2.2 Input, test-node and fault variables 4.3 Special subroutines ##### uauauauaua m#wNH 5. THE FAULT 5.1 Fault 5.1.1 5.1.2 Depth-First Search labeling Finding paths in a tree-graph Block finding Generating the modified-block-graph Generating CFD for a tree graph DICTIONARY AS A DESIGN TOOL detection properties (CFDIC option 1) Fault report Initial fault list 5.2 Test-node detectability characteristics (CFDIC option 2) 5.3 Summary 6. SUMMARY AND FUTURE WORK 6. 6. .2.1 6.2.2 .3 .4 .5 .6 meG NNNN 1 Summary 2 Future work 6 Extension of the CFD approach 6.2.1.1 Non catastrophic faults 6.2.1.2 Multifaults ' Development of conventional fault dictionary using bond graph methods Further investigation of CPD as a design tool Development of SAT approach based on bond graphs Failure detection of shop replaceable units Digital system Fault diagnosis 7. BIBLIOGRAPHY APPENDICES APPENDIX A: APPENDIX B: APPENDIX C: Theorems and proofs Construction of a Modified-Block-Graph Derivation of the nominal Structural Sensitivity Matrix from system structure vi 43 34 45 45 46 46 48 48 48 49 49 50 SO 51 53 53 60 62 67 70 70 73 73 73 74 75 77 79 81 82 84 91 93 APPENDIX APPENDIX APPENDIX 000 D: E: MB!!!) F: "1'11"! .1 The Structural-Influence-Graph .2 Determination of the SSM from the SIG .3 The Depth-First-Search algorithm for finding the reachable nodes in a given digraph .4 Example User manual for the CFDIC program Implementation of the CFDIC program .1 Implementation notes .2 Calling tree structure .3 Listing Input files for a five-degree-of—freedom suspension system .1 Model description .2 Variable list - option 1 .3 Variable list - option 2 vii 93 96 98 102 106 119 119 122 123 155 155 157 158 Table Table Table Table Table Table Table Table Table Table Table UtU'iUiUIUINi-‘H U'II-‘UNi-‘HNH O‘U’lLfl H \10 LIST OF TABLES : Definition of faults : Fault dictionary defined by two test-nodes : Insertions for constructing a proper bond graph Fault list Test-node list Input list Fault report : List of faults detected by the given inputs and ' test-nodes ' Detectability of test-nodes : Cumulative detectability of test-nodes : Comparison between CFD and conventional fault dictionary viii Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure H I" U! D U’i U‘ U H UIUt Ui#w#i»t»tncncnho thJthJF‘ #~uah>h¢ox P‘hih‘U1C‘U383h‘Ut ammmm cwc:c:c:u:>’>»os F‘UDNDF‘F‘BJP‘UI Hle-‘N DON LIST OF FIGURES : Block diagram of a DC approach for the construction of the fault dictionary of an analog circuit : A simple circuit example : Robotic arm : Modeling of connection failures : Macro modeling : Abstract description of FDD problem in a bond graph model Equivalent representation of test-nodes measurements ° CFD array ° Flow diagram of the CFD tree algorithm : Construction of the Modified-Block-Graph : MBG of a mechanical system : MBG of a network : Overview of CFD : The main CFDIC flowchart ' CFD representation from fault, test-node, and input point of view : Five-degree-of—freedom vehicle model : Bond graph model of five degree-of-freedom vehicle suspension system : Modified block-graph of five degree-of-freedom vehicle suspension system : Number of detected faults as a function of the number of test-nodes : Options of CFDIC software : CFD procedure : Catastrophic failures represented by switches : Automatic structural'fault dictionary set up : Detailed flow diagram of a conventional fault dictionary Circuit fault detection by SAT approach : A catastrophic flow fault modeling : A catastrophic effort fault modeling : Modified block graph : Junction and element structures : An example illustrating an application of the DPS : A mechanical system with two velocity inputs : The Structural-Influence-Graph of a mechanical system : Electrical circuit 55 58 68 69 71 74 76 78 80 90 90 92 94 100 103 104 111 NOMENCLATURE D(l,m,n) - Fault dictionary array e(t) - effort variable Pu - Equivalent path from U to Y, f(t) - flow variable F. - The kth fault in the fault list 1 - Number of inputs m - Number of test nodes (outputs) n - Number of faults in the fault list Pu - Path from U. to Y, P(t) - Power variable; P(t)-e(t)*f(t) St, - Sensitivity of Y, with respect to Ut U. - The ith input of the system Ud - The ith constant input of the system Yl - The jth output of the system Y“, - The Jth steady-state output of the system ABBREVIATIONS BC - Bond Graph 88 - Bond Structure CI - Constant Input CF - Catastrophic Failure CFD - Catastrophic Fault Dictionary CEF — Catastrophic Effort Failure CFF - Catastrophic Flow Failure DFI - Depth First Search DFL - Detectable Fault List DFS - Depth-First Search EP - Equivalent Path FA - "Father" FD - Fault Dictionary FDD - Fault Detection and Diagnosis FL - Fault List FS - Fault Source FSE - Fault Source of Effort FSF - Fault Source of Flow IJ - Identity Junction JS - Junction Structure KCL - Kirchhoff Current Law KVL - Kirchhoff Voltage Law 151 - Large-Scale Integration MBG - Modified Block Graph PBG - Proper Bond Graph SAT SBT SJ SM SSM SRU SUT VLSI Simulation After Test Simulation Before Test Simple Junction Sensitivity Matrix Structural Sensitivity Matrix Shop Replaceable Unit System Under Test Test-Node Matrix Very-Large-Scale Integration xi 1. INTRODUCTION 1.1 Anticipating failures in engineering systems The proliferation of large engineering systems of ever-increasing complexity' makes the detection. and. diagnosis of faults in. them. an important task. The early indication of incipient failures can.help avoid major system breakdowns and catastrophes. Similarly, failure detection and isolation has become a critical issue in the operation of high- performance ships, submarines, airplanes, space vehicles, and structures, where safety, mission satisfaction, and significant material value are at stake. Quite recently, computerized diagnostic systems have been applied to such mass-produced consumer equipment as automobiles and household appliances. From the very beginning of computerized testing, most practical systems have contained some form of failure detection and diagnosis. In the majority of these systems, the detection and diagnosis function is rather simple and is based on straight limit checking. The development of computational equipment and techniques has set the scene for the general application of more sophisticated and powerful methods. 1.2 Review of literature The problem of detecting changes in dynamical systems has received growing attention during the last twenty years, as can 2 be seen from the long list of survey papers and books written about it (Willsky, 1976; Duhamel, 1979; Mironovski, 1980; Iserman, 1984; Bandler, 1985; Basseville, 1988; Gertler, 1988; Ozawa, 1988). Most of the papers deal with the subject of fault location and estimation in circuits. The applications are mainLy to analog circuits (Hochwald, 1979; Wu, 1982; Elcherif, 1983; Lin, 1982, 1985) and digital circuits (Williams, 1983; Markas 1990). Other papers give a generic approach to dynamic systems, and a few treat particular mechanical systems such as the automobile system (de Benito, 1988, 1989) and the space shuttle engine (Cikanek, 1987). 1.2.1 Basic conceptual terminology A system fault is to be understood as a deviation of a characteristic property which leads to an inability of the system to fulfill its intended purpose. The fault diagnosis process includes three steps: the alarm, isolation, and estimation of the fault. The alarm step is usually done by checking if measurable variables are within a certain tolerance of the normal value. If this check is not passed, this leads to a fault message. If necessary, this is followed by fault isolation, determining where the fault is located. The next step, the fault estimation, defines the type and extent of the fault. After the effect of the fault is known, a decision on the action to be taken can be made. Since the decision.depends upon.the system design, failure detection methods are limited to the diagnosis stage. Moreover, the problem which is mainly addressed is the fault location and identification, assuming 3 that the system has already been identified as faulty, i.e., a fault message has already been received. Failures in a system could be catastrophic (hard) failures or deviation (soft) failures. Hard failures in circuits means that the faulty element produces either a short circuit or an open circuit. Soft failure in an element occurs when the faulty element deviates from its nominal value without reaching its extreme bounds (typically zero or infinity). Field data show that short circuits and open circuits account for about 70-80% of the faults in analog equipment (Hockwald, 1979). 1.2.2 Fault detection methods Several criteria have been used for categorizing fault detection techniques. The most popular one is categorization according to the stage in the testing process at which simulation of the tested system occurs. In particular, we have simulation-before-test (SBT) and simulation-after- test (SAT). 1.2.2.1 Simulation-before-test method The SBT method (Lin, 1985), also called the fault dictionary method, is based upon pattern recognition. The first step in constructing the dictionary is fault definition, where the most likely and/or important faults are specified. This is a very critical aspect of this approach since only these faults can be identified and the number of faults defines the memory size needed for the algorithm. The system under test (SUT) is 4 then simulated for these hypothesized faulty cases, in order to develop sets of stimuli and responses which will be used to detect and isolate the faults. The signatures of the responses are stored in a dictionary for use in‘ the on-line identification of faults. At the time of testing, the faulty SUT is excited by the same stimuli that are used in constructing the dictionary. The signatures are compared to the prestored signatures using an isolation criterion, and the actual failure is detected. Various types of inputs have been proposed for the fault dictionary method. These include constant (DC) inputs (Hockwald, 1979), sinusoidal (AC) inputs (Pahwa, 1982), and piecewise constant inputs (Schreiber, 1979). Unfortunately, most of these methods either are limited to linear networks or have not progressed beyond the feasibility stage of development. At present the constant input fault dictionary is the only one used in practice. Figure 1.1 (from Hochwald, 1979) presents a block diagram of a DC approach for the construction of a fault dictionary of an analog circuit. In this work, a new approach to fault dictionary is proposed. Thus, it is necessary first to review in details the conventional approacho A numerical example (a modification of an example from Ozawa, 1988) is given to illustrate the procedure of constructing the fault dictionary and the notation. The system (circuit) is deliberately chosen to be simple so that all steps can be verified without the aid of a computer. TEST _ ENGINEER * 1 “""J L——" 1 iETVERK mu nascamnm nommm L I ’—"'—I I ‘ iiPUT gamma 4— smuu i SELECTIDN nc NUDAL vmrAGEs DEGREE [1F ISLIATIDN ADEQUATE ELIMINATE UNiECESSARY HEASUREiENT NUIES i CUNSTRUCT FAILT DICTIDNARY. AMBIGUITY SETS 1 FALLT DICTIMRY Cflfilffim Figure 1.1: Block diagram of a DC approach for the construction of a fault dictionary of an analog circuit 6 Example: Figure 1.2 shows a circuit in its normal operating condition. Suppose that the prospective faults consist of R1 shorted, R2 open, R3 open.and.R4 shorted. The circuit contains two test-nodes which measure the voltage at points A and B. The test-node measurements are defined as VA and VB respectively. R1=1.n. A R3: in B 12v —L— R2: 30. R4=1n Figure 1.2: A simple circuit example The list of prospective faults is given in Table 1.1. Note that the nominal case is just one of the nominal case is just one of the circuit conditions and is listed as case 1 in Table 1.1. Table 1.1: Definition of faults mic lawnm— N Nominal case Fl R1 shorted F2 R2 open F3 R3 open F4 R4 shorted 7 In this stage, a simulation program is used to determine the test-node measurements for each condition defined by the fault list. For our simple circuit VA and VB are calculated directly from the circuit description. The values are provided in Table 1.2. Table 1.2: Fault dictionary defined by two test-nodes Circuit Mi tion VIL VB N 6.54 3.27 Fl 12 6 F2 8 4 F3 9 0 F4 5.14 0 Table 1.2 defines the fault dictionary. Here each fault-signature consists of a vector containing VA and VB. When actual measurements of VA and VB are taken, the fault is identified by comparison to the fault dictionary. Usually a fault isolation algorithm is needed for identification (e.g., minimum sum of squared error, as in Hochwald). In general, the nominal and fault circuits are simulated under more than one input combination in order to achieve adequate separation of faults. Each input combination is also called an input vector. For multi-input multi-test nodes the corresponding fault signature is a.matrixq called the fault page. The fault-dictionary is, therefore, a three dimensional array which contains the pages for all prospective faults. 8 Simulation-before-test method in digital systems Fault dictionary, as a diagnosis method, is well known in combinatorial digital circuits (Vishnubhotla, 1980; Sugasaki, 1989; Markas 1990). Here several input sequences are applied to the network and the resultant outputs are then compared with a fault dictionary. Single stuck-type faults (faults in which one wire or gate are stuck at either 0 or 1) are usually identified in those dictionaries. Some researches have tried to extend the dictionary to multiple faults (Breuer, 1976). 1.2.2.2 Simulation-after-test method The SAT approach (Wu, 1982; Salama, 1984) is most often used in analog circuits. In this approach, also called the claim-and-check method, the system is partitioned into subsets, where some subsets are assumed faulty and the rest are assumed fault free. This claim is then checked by the test data. If it is found to be true the faulty subset is partitioned again. The procedure is continued until the faulty element is detected. 1.2.2.3 Summary It is reasonable to believe that a sound fault diagnosis strategy should incorporate both the SBT and SAT approaches. The fault dictionary is first used to locate hard failures. For some cases (for example analog circuits) this approach will be adequate. For the remaining cases of soft failures, we rely on the SAT approach or a combination of both approaches. Although FDD has received much attention from researchers in the last twenty years, there are still many important issues to be studied” A short list is offered. here: more effective and. efficient fault isolation 9 algorithms including the selection of test nodes and stimuli design; FDD of’shop replaceable units (SRU); and.investigation of the nondeterministic aspects of fault diagnosis (statistical system parameters and inputs). 1.3 ORGANIZATION OF THE DISSERTATION The main goal of this dissertation is to develop a Catastrophic- Fault-Dictionary_(CFD) of’a dynamic system. Modeling of the system is done by bond.graph techniques. Bond graph.methods and graph algorithms are used to develop the CFD, while combinatorial methods are used to apply the CFD to an engineering problem. Several examples of using CFD for mechanical and electrical systems are provided as part of the dissertation. All the software needed for constructing a CFD for a specific system is given as well as subroutines for using this information as a design tool for engineering purposes. The dissertation contains three main parts: Part 1: Theory and development of the preposed approach for fault detection and diagnosis; Part II: Construction of the catastrophic fault dictionary; Part III: Application of the CFD as a design tool. The first part, covered in chapters two and three, includes all the theory, definitions and theoretical foundations for fault modeling using bond graph techniques, sensitivity, and the principles of the proposed fault dictionary. 10 In the second part, described in chapter four, the actual CFD is constructed. Here the graphical presentation of a fault diagnosis problem, together with graph algorithms, are used in order to set up the CFD for a given system. This part also provides the computer program‘which constructs the CFD for a given system. Mechanical and electrical examples are included. The third ‘part, chapter five, develops the CFD as a "design for testability" tool. The problem of how-to design your system such that it will be testable is addressed here, by using the CFD as the input for those questions. Typical fault diagnosis problems in engineering systems are solved. Algorithms provided in this part can be used as a design-for- testability tool for choosing test nodes location, input location and detection of specific faults in the system. Chapter six summarizes the current approach and describes some additional problem areas. Certain research topics were found to be very suitable for the application of fault diagnosis using bond graph methods. Those are described in detail. Other topics are mentioned briefly as possible further research areas. The software which has been developed during this research uses the data base defined in the ENPORT software (Rosenberg, l987)1 Hence it could be imbedded into the ENPORT program. At this point of the research it can be used independently on.a personal computer. Listing of the software is done in Appendix E. 2 . FAILURE MODELING USING BOND GRAPES 2.1 Bond graphs - a modeling tool Modeling of a dynamic system can take various forms such as schematic diagrams, mathematical equations, block diagrams, signal-flow graphs or bond graphs. Bond graphs are concise pictorial system representations that are useful for systems analysis and equation formulation. The bond graph language was invented by Paynter in the early sixties. Its early methodology was developed and documented by Rosenberg and Karnopp (1983) . The advantages of bond graphs are many. First, they provide insight into the system by describing the flow of energy within the physical system. Second, they elegantly support energy transfer between different energy domains. Third, bond graph elements support nonlinear constitutive relationships involving multiple output variables. Fourth, they are easily adapted for systematic input to computers for simulation of the modeled dynamic system. Last, state equations which have physical meaning can be derived directly from the bond graph models. Bond graphs have been used in a wide variety of applications for simulation, design and analysis of mechanical systems, vibration studies, networks, hydraulic circuits and chemical systems. They have also been used in thermodynamics, heat transfer and biomedical and medical physics. A successful effort has been made in this study to adapt bond graph techniques for detection of faults in various dynamic systems. 11 12 2.2 Potential advantages of bond graph techniques for fault detection and diagnosis (FDD) FDD is done using various simulation methods and programs. Programs like INPICE (Jagdnik, 1979) , SYSCAPII (Hochwald, 1979) and HAFDIC (Elcherif, 1983) are common computer programs used for failure investigations. The bond graph technique, as a simulation tool, may 'provide some potential advantages for failure detection. An important feature of a bond graph model, from a fault detection point of view, is its graphical presentation. Graphical methods have been previously used for FDD. Ozawa (1988) solved a failure detection problem of an electrical circuit by using two graphs, the voltage graph and the current graph, and applying KCL and KVL to each. A bond graph includes both circuit graphs in the definition of the junction structure. The graphical nature of the bond graph junction structure permits easy access to every junction of the model. Associated with those junctions are flows and efforts of the physical system. In practice we associate flows with 1-junctions and efforts with O-junctions. In that sense we can say that zero and one junctions represent effort and flow variables, respectively. This property of the bond graph plays an important role in FDD, as will be shown later. Another important feature of bond graphs is the variety of systems it can model. Most conventional methods of fault diagnosis are limited to a specific energy domain, for example, analog circuit fault detection. A fault detection and diagnosis method which uses bond graphs as a modeling 13 tool is more general and widely applicable to various engineering systems. 2.3 Catastrophic failures 2.3.1 Catastrophic failure modeling in bond graphs Definition: A Catastrophic Failure (CF) in a bond graph is defined by a persistent zero power level on one of its bonds where the input set previously produced nonzero power. Since the power equals effort times flow, ( P-e * f ), zero power arises from one of the following conditions: Catastrophic Flow Failure (CFF) f - 0. Catastrophic Effort Failure (CEF) e - 0. A Catastrophic Flow Failure (CFF) is a catastrophic failure in which the flow is identically zero. A.Catastrophic Effort.Failure (CEF? is a catastrophic failure in which the effort is identically zero. Consider the physical interpretation of CF in electrical, mechanical and hydraulic systems. By catastrophic failures in.e1ectrica1 systems we refer to open circuits and short circuits. As mentioned in the literature, 70- 80% of faults in analog circuits are of this type. Since flow and effort are interpreted as current and voltage respectively, a CFF corresponds to an open circuit and a CEF corresponds to short circuit. 14 In mechanical systems flow means velocity (or relative velocity) and effort means force. Thus zero velocity (CFF) is interpreted as sticking of a component to ground (absolute velocity failure) or sticking of two components together (relative velocity failure). Zero force on a bond is interpreted as a disconnection between two elements of the system. We refer to volume flow and pressure as flow and effort, respectively, in fluidpower systems. CFF is interpreted as zero volume flow, meaning complete blocking of the flow, while CEF is interpreted as a significant leakage in the system, for example, due to a ruptured line. 2.3.2 Fault Sources Two types of catastrophic failures can occur in a.system. A component failure is associated with the component parameter or function tending to zero or infinity. A connection failure describes. a failure in the connection between two or more subsystems or components. The third type of failure, the SRU failure, is actually a combination of the other failures, i.e., it consists of all possible failures that can occur in a certain subsystem. Modeling of a component failure can be done by two approaches. In the parameter approach we set the parameter or function of the faulty element to zero or infinity without changing the bond graph model. In the fault source approach we add to the model an external input that will constrain the system to behave in the faulty mode. In bond graph terms this means we add a source of zero flow (SF) to a l-junction, or a source of zero 15 effort to a 0-junction, associated with the failure. The latter approach is adopted in the current study. Modeling of a connection failure is done in the same way, by adding an external source to the simple junction which is associated with the failure. A Fault Source of Effort (FSE) is a source of zero effort added to a O-junction in order to define a catastrophic effort failure (CEF) associated with that junction. A Fault Source of Flow (FSF) is a source of zero flow added to a l-junction in order to define a catastrophic flow failure (CFF) associated with that junction. For convenience in distinguishing fault sources from physical sources, their bonds will be drawn in dashed lines. mg_£:£;a. mp_£:fl:.. Let us illustrate the preceding ideas by an example. Refer to Figure 2.1. The longitudinal motion of a robotic arm can modeled by a set of masses, springs and dampers. For simplicity consider a schematic model as shown in Figure 2.1a, which contains three masses (ml, m2, m3), two springs (kl. k2), and two dampers (b1, b2). An input force, F, is acting on one end and the velocity, V, is measured at the other end. The system bond graph is l6 V ——> ‘fl 01 b2 , (a) L. ml \\ v SE‘—“flfl*-"NKfl-‘HH2h-WRCE-‘HM3 (b) l I l I 1 11 lRCl [3 UK? [3 .1”). A R2 C2 FSF v / / SE"“flflt-“UEfi-'HMEh-WRC2-‘HM3 ‘°’ 11111 11 MEI 12 IE}! [3 “/1. A R2 82 ‘IFTE v / 35-—‘*Dflr-“UKH-‘*flQr-‘-UK2-*~UB .., 11111 H 12 ”EB I3 fl /\ R2 CB Figure 2.1: Robotic arm: (a) Schematic diagram; (b) bond graph model; (c) modeling of a component failure; (d) modeling of a connection failure. 17 shown in Figure 2.1b. Suppose the mass m2 is stuck (i.e., the velocity of m2 is zero), which is a component failure. How do we model it in the bond graph? In the parameter approach we set the mass m2 to infinity which leaves the model graph unchanged. In the fault source approach we add a FSF to 1M2 junction (Figure 2.1c). A connection failure can be illustrated as follows: Suppose mass m2 is disconnected from the left spring and damper, i.e., there is no force between the two subsystems. This connection failure can be modeled using the fault source approach by addition of a FSE to the 0- junction that describes this force (ORCl), as shown in Figure 2.1d. Note that the causality of the bond graph, shown by the short transverse strokes on each of the bonds is changed as the fault source is added to the system" Causality' concepts, operations, and. the standard. causal assignment procedure are discussed in several references (e.g., Rosenberg and Karnopp, 1983), and will not be reviewed here. The causality change and its physical interpretation plays an important role in constructing the CFD as will be shown later. 2.3.3 Modeling considerations of connection failures Connection failures are basically defined in a similar way as component failures. It is known that there may be different bond graphs that represent the same physical system in terms of equations implied“ When.the purpose of constructing the bond graph is fault detection the situation is different. Those equivalent graphs may represent different connections between components of the system. Thus, when modeling is done for fault 18 detection, special consideration should be made when constructing the graph. Here, not only the components and the connections should be presented in the graph, but also the subassemblies of the system. In order to be able to detect connection failures beWeen subassemblies, each physical connection should be associated with a simple junction. Let us illustrate this idea by an example. Figure 2.2a represents two masses connected by two springs and a damper. From the conventional modeling point of view, all four bond graphs shown in Figure 2.2b - 2.2e describe the same dynamic system. However, when connection failures are of concern, each bond graph defines a different assembly of the system, as shown in the schematic beside each bond graph. For example, a broken connection at point A can only be modeled by using the bond graph in Figure 2.2b. This is done by setting the effort e.l to zero. This failure can not be modeled in the other bond graphs since this variable does not exist there. In order to construct an appropriate bond graph for a given system, one can a use the macro mode approach (Rosenberg, 1986). The graph should be built in steps, starting from the top level assembly. In each step the macros (or subassemblies) are defined in detail. A demonstration of the procedure is shown in Figure 2.3. The bond graph is constructed in three steps, using MACROl and MACRO2 as subassemblies. Note that the connection forces at points A, B, and D, are defined explicitly by e.2, e.3 and e.10 respectively. The fact that connection forces are defined as variables in the bond graph explicitly aids the modeling of connection failures, as (a) Rain-11: k, [Xi-.1 1 n, “i - 1 C1: K, __; , (b) “1.16;; , ,0 1,1 1.1sz ‘ C2 1 K2 1X3—'-I 1 n: Fig IXl—-I 1 n, "1 1\ M (c) K,‘ Urn—0A 03—.1 kdE b'akt i \ta K, 1X1--I = n, n, W m {1} (d) 1—0A onaca 1 K. k, ;.kz K,: Cl/ 1 . 1X2-‘~Ix n, "a le-‘I : n. n, ““770“ ““03 0‘3“” ' KI MEET]? iikz lXB-H-l =n, nz Fig. 2.2: Modeling of connection failures 20 1X1-—="l /\ k1: Cl-sf—OA MACRDI \/ 1X2-;-="l = n 1 1X1 / 11,: Cl-é—OA keCB \ 1X2 1 1\ 1:11’ :7 1\ ,1: 1X1-—=‘-I : / 1\R1b kn CIVL—DA kaCZ >on-flh1 \ 1X8 YR C3ik3 111%; Fig. 2.3: Macro modeling 21 well as other design purposes, perhaps. 2.4 Proper bond graph Every flow and effort that appears in the bond graph can be treated as a candidate for failure. Therefore each flow and effort should be associated with a simple junction in order to define that failure in the fault source approach. We may need to augment our initial bond graph model such that it will satisfy this property. A proper bond graph (P86) is a bond graph in which every flow variable is associated with a l-junction and every effort variable is associated with a 0-junction. A Bond Structure (BS) contains a specific bond together with the two nodes adjacent to it. A Simple Junction (SJ) is a O-junction or a l-junction (Rosenberg, 1979a). An Identity Junction (IJ) is a simple junction that has degree equal to two and contains one inwardly-directed bond and one outwardly-directed bond. The P36 is constructed by adding identity junctions to the original bond graph. Addition of identity junctions to a bond graph does not change the 22 behavior implied by the bond graph. The PBG and.the original graph present the same physical system. The following algorithm will construct a proper bond graph from a given bond graph. WM 1. Scan all bonds (edges) of the graph and add identity junctions and edges according to Table 2.1. N1, N2 are any nodes except simple junctions. Table 2.1: Insertions for constructing a proper bond graph bond structure equivalent bond structure Wan 1:1me o—L—o o—‘-—1-£-'—;-o 0-;—--l unchanged 1 -JL—- 0 unchanged 1—‘—-—1 1-‘—-o—‘L—1 l-—"—-—N1 , 1-E—-o-‘—“-N1 0—9—le o—‘—-1-£-N1 N1—‘—-1 Nl-L——o-§L—1 N1—‘—o N1-‘——1—"—-o N1-‘—-N2 Nl-L—o—‘L-15—3—N2 Using the definitions of a proper bond graph, a catastrophic failure and a fault source, consider the following theorem. Theorem 2.1: Every catastrophic failure in a multiport system can be modeled by addition of either a fault source of flow or a fault source of effort to the proper bond graph of the 23 system. Proof: For the sake of brevity proofs are provided in APPENDIX A. Thus, there is a group of simple junctions that are associated with a given list of faults. These junctions play a role in the graphical formulation of the failure detection problem. 2.5 Graphical presentation of FDD problem As shown before; every prospective catastrophic failure (e-O, f-O) in a dynamic system is associated with a specific simple junction. The fault list which is provided by the designer, based on his/her experience, can be translated into a list of simple junctions named the fault junctions. Physical inputs are represented in the bond graph by two types of sources: source of flow (SF) and source of effort (SE). The flow variable of a SP is associated with the l-junction adjacent to it and the effort variable is associated with the O-junction adjacent to it. These junctions will always appear in the proper bond graph and will be referred to as input junctions. For this study we restrict ourselves to test node measurements (outputs) that are flows, efforts or a function of them. This restriction covers most practical systems, since voltage measurements commonly are used in electrical systems; force, velocity, acceleration and displacement are effort, flow, and functions of them in mechanical systems; and pressure (effort variable) is common as a measured signal in hydraulic systems. 24 Since every flow and effort is associated with a simple junction of the proper bond graph, we can refer to these nodes as test-node junctions or output junctions. Test-nodes/outputs will be used as synonyms throughout this work. So far we realize that a FDD problem in a bond graph is associated with three special groups of simple junctions: the fault junctions, the input junctions and the test nodes junctions. Figure 2.4 illustrates that situation abstractly. One group of simple junctions represents the inputs and another group represents the output junctions .' In the remaining junction structure we can find the junctions that are associated with the faults of the fault list. fiote that there may be simple junctions in the graph that do not belong to any of the special groups above. Test node measurements are actually signals extracted from simple junctions. In order to preserve the structure of the graph and the duality between inputs and outputs, test node measurements are represented by either a source of zero effort extracted from a l-junction (where flow is measured) or a source of zero flow extracted from a O-junction. Figure 2.5 shows the equivalency between these signals and sources. By defining the input, fault and test node junctions we have transferred a failure detection problem into a graphical problem. Thus graphical methods are applicable for solving the problem, as will be developed in the subsequent chapters. 25 FLUV . E'FURT MSUREDENT PEASLREMENT SE SF ( e=0 ) ( F=0 ) ‘ R [INPUT T I m m + 1 1 0 o FAULT UNC I JTIUNS >[ 0..........1 :1 INPUT JUNCTIUNS ’ 0 0 1 1 SE SF Figure 2.4: Abstract description of FDD problem in a bond graph model. Signal approach bond approach Flow SE / signal 9:01? ”0" I—‘- 1 1—-.> 1——‘- 1 1—+ measurement \: \: effort SF / Signal 9 F: eFFort measurement I 0 5 ' ' 0 5 ' Figure 2.5: Equivalent representation of test-nodes measurements 3. THE CATASTROPHIC FAULT DICTIONARY The conventional fault dictionary contains a "page" of information for every fault in the fault list. This data consists, usually, of the test- node measurements. We suggest a special type of sensitivity measure to be: the entries of the dictionary. This dictionary can be directly derived from the graphical presentation. The special type of sensitivity, called Structural Sensitivity is defined in section 3.2. The procedure of deriving those entries from the graphical presentation is described in section 3.3 and following. It is first done for a tree graph and then expanded to a general connected graph. For the sake of continuity, proofs and minor cases are treated in appendices. 3.1 System bond graph model The requirements for the system bond graph model are: (l) The bond graph model contains only bonds (no signals allowed). (2) The bond graph model is a. connected graph. If the graph is unconnected, every component can be treated individually. (3) The standard bond graph elements are: C: generalized capacitance, I: generalized inertance, R: generalized resistance, SE: effort source, SF: flow source, 0: zero junction, 1: one junction. TF1 transformer, and 26 27 GY: gyrator. C, I, and R elements can have any number of ports. Constitutive equations for the C, I, and R elements, linear or nonlinear, are functions only of the local port variables (and their appropriate integrals, for C and I). Source nodes (SE and SF) are functions of time only. TF and CY nodes have constant parameters . 3.2 The Structural Sensitivity Matrix (SSH) Suppose a dynamic system contains 1 inputs and m outputs. Let Umto be the ith input and Yfit) be the jth output of the system. Yfit) is defined for given inputs and initial conditions. Let us restrict ourselves to stable systems in which a constant input defines a unique constant steady-state output . Let S" denote a sensitivity of the jth output with respect to the 1‘“ input, where there is a perturbation in a constant input and the steady state output is observed; The sensitivity, SP is 511 - Aur- ( 3.1 ) AUd where ADC, is a constant perturbation in the ith input and AY“, is the resulted change in the jth steady-state output. In the same way we can define a lxm Sensitivity Matrix, SM, of the system 8.8 28 A 00. A. avg AU" SM - : I ( 3.2 ) AI...— AL... LAU“ AUG; .1 If the output Yul does not depend on the input Ud, then the entry 8,, in the sensitivity matrix is identically zero. Starting with the SM concept we define a Structural Sensitivity Matrix, SSM. Q§£1n15193;,A.Structural Sensitivity'flatrix, SSM, is a sensitivity matrix whose entries are zero when S" is identically zero, and one otherwise. From a practical point of view, every entry of the SM (and SSM) can be found. by 'perturbing one input 'while holding the others fixed, and observing the resulting output. If a perturbation in Ud does not change the output Yap then the corresponding entry to SSM is zero; otherwise it is one. Note that the initial conditions for both cases (original and perturbed) should be the same. Some nonlinear systems may provide a zero entry in the SSM at a specific singular operating point. These situations should be avoided by determining the SSM entries at different operating points of the system. 29 A SSM whose all entries are one is a full SSM. Otherwise the matrix is partial. 3.3 Connection between graphical presentation and SSM Consider a physical system with defined inputs, outputs (test-nodes measurements) and fault-list variables. We wish to derive the CFD for this system. Let us restrict ourselves to the following: (1) The system bond graph is a tree. (2) The SSM of the nominal system is full, i.e., every output is a function of every input. I (3) The fault-list contains only single catastrophic faults (i.e., each fault corresponds to a single e-O or f-O statement). In the following discussion we treat the bond graph as an undirected graph, since power orientation is not relevant. Letifildenote a path from node i to node j in a bond graph that is a tree, where node i is an input junction node and node j is an output junction node. The path between any two nodes in a tree graph is unique. We express the path P” as the set of nodes between (and including) i and j. The following theorem is essential in deriving the CFD. 30 W Sun is identically zero if and only if there exists a catastrophic failure associated with a simple junction on P". Proof: Provided in APPENDIX A Let us demonstrate the preceding theorem in a physical system. As an example consider the robotic arm shown in Figure 2.1. Here we have one input (force, F) and one output (velocity, V). The system satisfies all the preceding restrictions. Any catastrophic failure along the path from SE to 1M3 is either a stuck mass (CFF associated with 1M1, 1M2 or 1M3) or a connection failure between two masses (CEF associated with ORCl or ORC2) . Either type of failure will cause zero transmission of input force effect to the system downstream of the fault. Thus the sensitivity of V with respect to F will be identically zero. On the other hand, if a failure of a consisting stuck damper b2 occurs, which .is a CFF associated with lRCZ, two adjacent masses will be connected into one rigid body. This will cause a change in the sensitivity but will not make it identically zero . 3.4 Definition of CFD As a result of Theorem 3.1, a zero entry in the SSM is an indication of the existence of a catastrophic fault. This is true when the system contains a full nominal SSM. Thus, we can use the SSM as a signature of a specific fault. Suppose we derive the SSM for every faulty system that contains a fault from the fault list. The‘n their collection forms the fault dictionary. For convenience, we put all these matrices in a three 31 dimensional array. The catastrophic dictionary is, therefore, a three dimensional boolean array. This array is referred to as the CFD array. Figure 3.1 shows this array symbolically, where each horizontal matrix in it is the SSM of a specific fault. Each SSM is referred to as a page of the dictionary. During testing the experimental SSM of the actual system is compared to these pages and the actual fault is defined. (fault) K Y (outputs) SSM of Fk U (Inputs) Figure 3.1: CFD array 32 3.5 Construction of CFD for a tree bond graph The CFD can be constructed directly from the bond graph of the system. Since the graph is a tree, every path P|J is unique. The procedure of constructing the CFD consists of two main steps. In the first step the FDD problem is converted to the graphical representation. In the second step we use graph algorithms to find the paths from each input to each output. Each path is checked for existence of fault-junctions along it, and the corresponding entries are put in the CFD array. The software developed for this task, referred as the CFD tree algorithm, is described in detail in the next chapter. Figure 3.2 shows its flow diagram. 3.6 CFD for a general graph Since most systems do not have a tree bond graph, we have to expand our method to a general bond graph. We still restrict ourselves to the following assumptions: (1) The system bond graph is a connected graph; (2) The SSM of the nominal system is full; (3) The fault-list contains only single catastrophic faults. In a general connected graph Pij is not unique. Our approach is to generate an equivalent graph which abstracts the relevant information and is a tree graph. Then the CFD tree algorithm can operate on it. To this end we introduce the Modified-Block-Graph, MBG. 33 Enter the system bond graph model i Convert to a proper bond graph i Read input, test-node and fault variable lists i Deflne Input, output and fault junction i For each input I: For each output 1: Find the path Pl]. For each It: Check the relation of F, to Pl]. Enter 0 0r 1 in page R for Si] l CFD completed ] Figure 3.2: Flow diagram of CFD tree algorithm 34 3.6.1 The Modified-Block-Graph War A Modified-Block-Graph, MBG(G), of a connected graph G is a graph derived from G such that every block in G is defined by a node, and the cut nodes that connect the blocks remain in the modified block graph. A block node is a node in MBG(G) which defines a block in G. A cut node is a node whose removal from a connected graph (together with its adjacent edges) results in an unconnected graph. MBG(G) is a modification form of the Block-Cut-vertex-graph, 80(6), which is known. in graph theory (Chartrand and Lesniak, 1986). The only difference between the two lies in efficiency, since in.our case we ignore the trivial blocks (blocks which contain one bond). MBG(G) and BC(G) have the same properties (proved in the above mentioned reference). The interesting properties of MBG(G) are: (1) The M36 is a tree. (2) Any path from node S to node T in G contains the same cut nodes as the path from S to T in.MBG(G), where S and T are either defined in MBG(G) or captured in the block-nodes of MBG(G). 35 The first property allows us to use the CFD algorithm developed for a tree graph, while the second helps us to convert paths from G to MBG(G). An illustration of a graph G and its corresponding M36 is shown in Figure 3.3. Note that all the cut-nodes of G remain in MBG(G), while the nodes that are inside a block disappear since the block is replaced by a block- node. A detailed procedure for constructing the MBG(G) is represented in APPENDIX B. Determination of the blocks of a given graph is a known algorithm in graph theory. It is one of the applications of the Depth-First Search method, and.is known as "The Depth-First Search for blocks algorithm" (Even, 1979; Gibbons, 1985). The subroutines that find the blocks and construct the modified-block-graph are described in detail in Chapter 4. 3.6.2 Detectable and undetectable faults In a general connected graph G all the paths from U.to Ylare reduced to one Equivalent Path, 51’”, in MBG(G). This path is defined by UI and Y1, since MBG(G) is a tree. EPij represents the original paths. It contains all cut-nodes of R“ but it does not represent nodes that were inside the blocks. Defiaitiansi A detectable fault is a fault whose existence in the system changes the SSM of the nominal system. An undetectable fault is a fault whose existence in the system does not change the SSM of the nominal system. 36 (a) (b) (c’ ' BLUCKI ;.—.J BLUCKP. _ l Figure 3.3: Construction of the Modified-Block-Graph: (a) Original graph; (b) Definition of blocks; (c) MBG completed. 37 Faults associated with junctions that disappear through the process of converting the graph to the MEG are undetectable by the current approach since they do not change the SSM entries. From a graphical point of view it can be explained as the following: If a path from point 5 to point T in the M63 contains a block-node, there is no information about the path inside the block. For example, refer to Figure 3.3:_point H is inside BLOCKZ. A path from K to E may contain H (K-J-I-H-F-E) but there exists an alternative path that does not contain.H (K-J-I-G-F-E). Cut points, on the other hand, like I or J, appear in both paths, thus they are contained in the equivalent path (Figure 3.3c, equivalent path defined by K-J-I- BLOCKZ-F-E). A fault may be undetectable for either of two reasons. Either its fault- junction disappears during the conversion of the graph to the NBC, or its fault-junction does not appear on any input-output path. The two types are defined as: (l) Structurally undetectable fault: this is a fault associated with a junction that disappears through the process of converting the graph into the M36. Such faults can not be detected by the CFD approach. Fortunately, their appearance in engineering systems is rare. (2) Undetectable fault: fault whose junction does not appear on any path PM. A change in test-node locations can change their status. A discussion about this is presented in the design-for-testability chapter (Chapter 5). 38 Two examples are discussed next to give some insight into the detectability of faults. The mechanical system of Figure 3.4a contains a thick beam with two input forces, F1 and F2. A small mass, m, is connected to the beam through a spring. The bond graph model, Figure 3.4b, contains two loops. The M86 is shown in Figure 3.4c. Since no simple junction has disappeared through the process of converting the graph into the block- graph, there are no structurally-undetected faults in the system. Note that the transformer nodes do not appear in the MEG. Nevertheless, no prospective faults were lost since they are associated with the simple junctions connected to those transformers. Suppose an accelerometer is located on the small mass, which means that the output junction is OD. Using F1 and F2 as inputs, we can observe that faults associated with 1T and lR are undetectable since they do not appear on the path from the inputs to OD. A change of output location may convert those faults into detectable faults. Thus, faults associated with IR and IT are undetectable, but not structurally undetectable. The network shown in Figure 3.5a (from Rosenberg and Karnopp, 1983) contains two inputs, a voltage source and a current source. Its bond graph is unicyclic. The corresponding M86 is shown in Figure 3.5c. Note that none of the junctions disappear during the transformation. Here, again, none of the faults is structurally-undetectable. The detectability of the faults depends on the choice of test-node location. 39 71—71 R (a) as in, .1. t in 1. fl31F30—3C-k / \TF\\ 1411-9—11 lR——->i =3: 1 (b) r TF / 'i OPE OH in la :51 sea. NIP—H 1R__a..1.__':c N3 Iv—QD AC k \ / (C) [BLUEKII \ are on in 1:2 :51 31:2 Figure 3.4: MBG of a mechanical system: (a) schematic diagram: (b) bond graph model: (c) MBG. 40 (a) | Law C 111 1 C12 1 (b) s:--1-ou/ \od—rr—1AOg-a-1—sr l 1 1 i 1 1 1:3 123/ \Oc/ \c1 92 m 1 ca 1 1 1 (C) SE—-1—v-0b\|/0d—a-Tra-1—>Og—-1A-3F BLDCKlI 1 1 1/ | \1 1 1:3 123/ 0‘ \c1 L l 11 I Figure 3.5: M86 of a network: (a) schematic diagram: (b) bond graph model; (c) MBG. 41 The only loss of fault information when a proper-bond- graph is transformed to NBC is associated with simple junctions that do not appear in the MEG. In both examples the number of simple junctions did not change when the bond graph was converted into the MEG. This situation is very common to systems whose bond graph contains l-port elements and 2-port transformers and gyrators. Thus most of the prospective faults in those systems are detectable. We note that the existence of loops (and therefore blocks) in the bond graph corresponds to multiple paths of energy in.the system. Many common dynamic engineering systems, with the notable exception of electronic circuits and reduntant mechanical structures, do not have many parallel energy paths. Therefore the number of structurally-undetectable faults in them typically is very smell. 3.7 The partial SSM So far we have dealt with a full SSM. Thus a zero entry in an experimental SSM was an indication of a fault. Most engineering systems satisfy that condition. But what if the nominal SSM contains zero entries? This is common to systems whose bond graph models are unconnected, but it occurs in.connected.bond.graphs too. Actually, the entries of the nominal SSM.can be derived directly from its bond graph representation. See details in APPENDIX C. In this section we provide a procedure for constructing the CFD for a given partial nominal SSM (i.e., the nominal system has a partial SSM whose zero locations are known). 42 Construction of the fault dictionary for partial SSM Suppose that the entry Suirta.nomina1 SSM is zero. In this case any fault along EEJis undetectable. Moreover, a zero entry in an SSM is no longer an indication of a fault. For this case we need to add the nominal SSM to the dictionary. Since every SSM of a faulty system will contain those initial zero entries, the SSM of the nominal system will be added to each SSM. Mathematically it is computed as the following: 3311,, - 3511,; @ SSMN ( 3. 3 ) where SSMN is the SSM of the nominal system; SSMH' is the SSM of the faulty system, derived from the bond graph as shown before; SSMF1 is the final page of the dictionary. The addition property ( e ) of equation 3.3 is identical to the intersection operation in boolean algebra (Goodstein, 1964). Its truth table is p a 13690 O O O O l O l O O l 1 l After the CFD has been constructed, the experimental SSM is compared to the dictionary as before, but in this case the nominal SSM is also a page in the dictionary, usually defined as FO (fault O). A fault is 43 undetectable if its fault-page equals page F0, the nominal SSM. 3.8 Additional properties of CFD 3.8.1 Ambiguity sets Sometimes different faults contain the same SSM. They create an ambiguity set and are detected as a group. This phenomenon is well known in detection of faults in analog circuits (Lin, 1985) as well as in digital systemm (Markas, 1990). If the unseparated faults are located in.the same "Shop Replaceable Unit", further isolation may not be necessary. Otherwise, if unique detection is required, more or different test-nodes are needed. This topic is also discussed in the design chapter. 3.8.2 Fault identification by dictionary lookup As mentioned earlier, actual faults are identified by comparison of the actual SSM to all SSMs of the fault dictionary. In a conventional fault dictionary this is a time consuming process, since outputs are defined as real numbers. An attempt to reduce it into a an integer coded dictionary has been made by Lin (1985). One of the main advantages of the CFD is the easy lookup, due to its binary structure. 3.8.3 Superposition A.multifault (i.e., the simultaneous occurrence of a set of single faults) is treated in conventional dictionaries as an independent fault. These dictionaries usually do not contain multifaults due to limitation of memory size. The binary structure of the CFD allows us to use superposition, i.e., the SSM of a fault defined by two or more faults from 44 the fault list is a combination (using the + operation as in section 3.7) of their SSMs. This fact allows us to detect multifaults without increasing the memory significantly. 3.9 Summary The theoretical foundations for constructing the CFD were described. A procedure for deriving the CFD directly from the graphical representation of the FDD problem was presented for a tree bond graph. A general bond graph was treated in two steps. First, the graph .is converted to a modified block graph which captures all the relevant information and is also a tree. Second, the CFD tree algorithm is applied to the MEG to obtain the CFD. Faults associated with junctions that disappear in the procedure of converting the original graph to the MEG are undetected faults. They are rare in practical engineering problems. 4. CONSTRUCTION OF THE CATASTROPHIC FAULT DICTIONARY 4.1 General description A FORTRAN computer program called CFDIC (Catastrophic Fault Dictionary) has been developed to generate the fault dictionary. The program is based on the theoretical foundations described in Chapter 3. The current chapter describes the basic features of this program. The design applications of the CFDIC software are presented in the following chapter. CFDIC program can be run independently on a personal computer using FORTRAN-77 compiler. The software is described in detail in two appendices. APPENDIX D, the user manual of CFDIC, provides directions for installing and.running CFDIC including a detailed example. APPENDIX. E contains the listing and implementation notes of the program. Figure 4.1 shows the main inputs and outputs of the program. The inputs are: (l) the model description, defined by its bond graph (i.e., node list and.incidence list); (2) input, test-node and fault variables definitions, stored in a data file. CFDIC 1-—’ CFD Figure 4.1: Overview of CFD 45 46 The program contains two main parts: 1. Conversion of the graph into a modified block-graph; 2. Construction of CFD of a tree (or a modified-block-graph). The flow diagram of the program is shown in Figure 4.2. Before starting the operation of the main parts, the computer reads the system data and checks whether or not the graph is connected. Disconnected graphs are not accepted by this program; thus a message is provided about this to the user. Then inputs, test-node and fault variables are read and.changed into input, test-node and fault junctions. If the original graph is already a tree, no extra step is needed and the tree-algorithm is activated. The tree algorithm is described in the preceding chapter. Please refer to Figure 3.2. Otherwise the graph is converted into the modified block graph. Then the tree algorithm is applied to this MBG and the fault dictionary is generated. 4.2 Inputs 4.2.1 Medel description Model structure is defined by its bond graph. The graph is introduced to the program by two lists: the node list and the incidence list. The node list defines the names of all nodes in the graph together with their type. The incidence list defines the bond names and their connection to the nodes. 47 MODEL DESCRIPTION I READ SYSTEM DATA ”9---- END IS THE GRAPH,/’ CONNECTED 1 / INPUT. OUTPUT AND yes FAULT VARIABLES 1 DEFINE INPUT, OUTPUT AND FAULT JUNCTIONS 1 yes IS THE GRAPH A TREE//’ '? no FIND BLOCKS, LEAVES AND CUT POINTS I DEFINE NBC DEFINE INPUT, OUTPUT AND FAULT JUNCTIONS FOR MBG l EXECUTE CFD-TREE I CFD COMPLETED Figure 4.2: The CFDIC main flowchart ALGORITHM __"'"—_' 48 4.2.2 Input, test-node and fault variables The special variables (i.e., input, test-node and fault variables) are defined in a data file called VAR.DAT. Input variables should be efforts or flows which are adjacent to a source node (SE, SF). A test-node variable can be any effort or flow that appears in the graph except an input variable. If there is no simple junction adjacent to the test-node variable, the program will automatically add the corresponding identity junction. Fault variables are defined by efforts or flows. For example, if a fault variable is e.i it means that it represents a catastrophic fault defined by e.i-O. Identity junctions are added to the model in the same way as for the test-node variables. The running OPTION will be discussed in Chapter 5. 4.3 Special subroutines The CFD program contains thirty one subroutines. Most of them are an integral part of the construction of the fault dictionary. Some subroutines are of more interest or can be used independently is other graphical applications. These subroutines are discussed here briefly. Implementation notes, the calling tree structure and the listing of all the subroutines in alphabetic order, are provided in APPENDIX E. 4.3.1 Depth-First Search labeling (subroutine DFSLBL) The Depth-First Search (DFS) is a well known systematic method of labeling vertices of a graph (Gibbons, 1985). Many graph algorithms are especially efficient when based on depth-first search labeling, for example, finding paths in a graph or finding blocks and strongly connected components. In 49 our program DFSLBL is used for three different applications. These are (l) to check if the graph is connected, (2) to find paths in the tree-graph, and (3) to find the blocks of the graph. The input to the subroutine includes the graph description (node list and incidence list) and.the startingynode. The subroutine provides the DFI(v), which is the Depth-First Index of every vertex v, and the "father" of v, FA(v), which defines the previsited vertex. 4.3.2 Finding paths in a tree graph (subroutine PATHFN) Finding a path is one of the direct application of the Depth-First Search algorithm. The subroutine finds the path (defined by a list of nodes) between two given nodes in a tree graph. The algorithm is executed after the graph has been labeled by DFSLBL. A path is defined directly by following the "father" of each node. It is known to be a very efficient algorithm (Even, 1979). 4.3.3 Block finding (subroutine BLCKFND) BLCKFND is executed after the graph has been labeled by DFSLBL. In this algorithm the graph is scanned and every block found is popped out from the subroutine. Blocks are defined as group of nodes. The algorithm uses the DFI and the FA of each node to find the blocks. BLCKFND uses two other subroutines, SSTACK and POPSTK, to execute the algorithm. SSTACK is used to store nodes that are in the same block. When the nodes in SSTACK define a block, the list is send to POPSTK. The procedure continues until all blocks are defined. 50 4.3.4 Generating the modified block graph (subroutine BLCKGR) Information about blocks, cut points and leaves (nodes of degree one) is captured in this subroutine. It processes all this data and converts it to a Modified Block Graph, which is stored in the place of the original graph. This information. is made available to all other subroutines (through a common block) for generating the fault dictionary. 4.3.5 Generating CFD for a tree graph (subroutine TREDIC) Subroutine TREDIC derives the CFD for a tree bond graph. The tree is either the original graph or the modified block graph. The subroutine contains the following steps: (1) Finding paths from an input to all test nodes; (2) Checking the existence of all faults, defined by fault list, on those paths and adding the corresponding entries (one or zero) to the CFD. The algorithm is run for each input until the CFD is completed. Input to TREDIC includes the system description and lists of input, test-node, and fault junctions. The output is the corresponding CFD. 5. THE FAULT DICTIONARY AS A DESIGN TOOL The fault dictionary is basically used for detecting failures byj comparison of experimental data to the FD data. From an engineering point of view, the more important and interesting problem is in the design stage, which. is known. as "Design for Testability". The design. for testability problem can be described in general as: the problem of finding, in a cost-effective way, the faulty component, module, or connections in a dynamic system (Williams, 1983). In practice, many design-for-testability problems dealt with reducing the number of test- nodes needed to detect given faults (Lin, 1982, 1985; Ozawa, 1988). The special structure of the CFD as a three dimensional boolean array is very attractive for design-for-testability. Figure 5.1 shows the CFD abstractly, from different points of view. So far we are used to think about the CFD as a collection of fault pages, as shown in Figure 5.1a, but it can also be interpreted from a test-node point of view as a collection of test-node pages (Figure 5.1b) or input pages (Figure 5.lc). Each test- node page contains all the information about the specific test-node, and the same is true for an input page. Thus the information which is kept in the CFD can be generated in various ways for solving design problems. Using this structure, the CFDIC software was extended to solve several design problems. In this chapter we present some typical applications and the software needed to solve themr.A five degreejof-freedom ground.vehicle model is used to illustrate the various design options. The design problems are imbedded.in.the CFDIC software and can be run.under different options of the same program. 51 52 F (fault) Y (outputs) (3) Fault . paint of View faultpage U (inputs) (fault) y (outputs) / (b) Test-nous point of view -— test-node page F A (fault) Y (outputs) (c) Input 1 paint ofv1ew input U (inputs) page Figure 5.1: CFD representation from fault, test-node, and input point of view 53 5.1 Fault detection properties (CFDIC option 1) 5.1.1 Fault report For given input, output and fault lists, the fault dictionary may provide additional information about the status of every fault in the system (i.e., whether the fault is uniquely detectable, undetectable and so on). CFDIC Option 1 provides this data in addition to the fault dictionary. The message about each fault in the original fault-list is one of the three categories: (1) The fault is uniquely detected. (2) The fault is detected but creates an ambiguity set with other faults. In this case the list of all faults in that ambiguity set is provided. (3) The fault is undetectable by the current inputs and test nodes. A change in either test nodes or inputs is needed in order to detect dusfmflt. Percentage of detection (number of detected faults out of total number of faults) and unique detection is also provided. Option 1 of CFDIC ‘provides the fault report. Inputs are the model description and input, output and fault variables. Example Consider the five degree-of freedom vehicle model of Figure 5.2. In the figure m1 represents the mass of the seat and driver, which is supported by spring kl and damper cl that are attached to the main body of the vehicle. The masses of the main body of the vehicle, the wheels, and the 54 Direction of travel f2(t)} * £1(c) Figure 5.2: Five degree of freedom vehicle model axles are m2, m4, and m5, respectively. The main body of the vehicle is supported by springs k2 and k3 and the dampers c2 and c3, which are attached to the axles. The parameters k4, k5, c4, and c5 represent the stiffness and damping coefficients of the tires. The functions fl(t) and f2(t) represent vertical velocities of the front and the rear tire contact patch, respectively, due to undulations in the road surface on which the vehicle is traveling. The bond graph of the system is shown in Figure 5.3- Here, SF1 and SF2 represent the input velocities of the front and rear tire contact patch, 55 IMI 1 SE1 —"9‘—=1 1M1 17 CKI SE2 1 1. (V / 111% 1M2 Hie—- 1T 1R 4;... we I 11 9 ‘1; 4 TFF TBF 7 CK3 RB 10 I \1131 -é-—1 0131 / on ,__ 1F1‘/CK2 z’13 A:§\R C2 RC3 1, 1, IMSH—L 125 124—"‘—--+ IM4 31:5 MI? l N SE4 CKS ,5 ,, c1<4 \‘113 #4 013 OF 1—a 1F< RCS/c; I I d- RC4 $2 51 _L .1. SF2 SFl Figure 5.3: Bond graph model of five-degree—of-freedom vehicle suspension system 56 the I-elements represent masses and inertia (IM4 represents m4, etc.), C- elements define springs, and R-elements represent dampers. It is interesting to observe the modified block-graph of this system, shown in Figure 5.4. Note that the tree part of the graph remains unchanged while the loops were reduced to one node (blockl). Model description, as an input file, is attached in APPENDIX Fl. Fault-list, test-nodes and inputs Suppose a catastrophic fault list contains the faults defined in Table 5.1. Table 5.1: Fault list Fault u va ’ Dggcription Fl f.c2 Stuck suspension damper of front wheel F2 e.3 suspension and body disconnected (front) F3 e.k2 Broken suspension spring (front) F4 e.2 wheel and suspension disconnected (rear) F5 f.k5 Flat rear tire In.order to detect the faults, three accelerometers and.one load-cell were located in the system. Test-node locations and.measurements are described in Table 5.2. Table 5.2: Test-node list Iggg-nodg Iggy-ngde vagiable Lgcation Megsuggmggt Y1 e.m4 Front wheel axle Vertical acceleration Y2 e.m2 Main body Vertical acceleration Y3 e.ii Seat Vertical acceleration Y4 e.k2 Suspension Spring force Velocities of front and rear wheels were used as inputs of the system. Their description is shown in Table 5.3. 57 Table 5.3: Input list Description Vertical front wheel velocity Vertical rear wheel velocity Fault, test-nodes and input variables Faults, test-nodes and input variables are defined as bond graph variables using the bond graph model shown in Figure 5.3. Table 5.1 shows the bond graph variables associated with each fault. Note that a fault is defined such that its variable is identically zero. Tables 5.2 and 5.3 show the test-node variables and the input variables respectively. Input, output and fault lists as an input file for the program are shown in.APPENDIX F2. Construction of CFD Using the preceding algorithms, the CFD is constructed. The SSM for each fault are listed below for clarity. SSM for Fl: 1 l l O l l 1 O SSM for F2: 1 O O O O 1 l O SSM for F3: 1 l l O l l l 0 SSM for F4: 1 l l l 0 0 O O SSM for F5: F‘P‘ P‘F‘ a. a. 58 IMI 1 SE1 Jill—H 1M1 *7 CKI 352 T V \ 0D Ln 1D I—gf- RC1 1M2 H—"a—- 1T\ __ /\1R-Ja-‘-l 1J2 BLOCKI 1:1<3 \13/ / ’\ CK2 1B1 42—1 0131 I 111-'1 175:. m 4 RC3 A 12 13 ' [secs 1M5 1-—"-5—- 125 1Z4 A“ IM4 my New 1 1 “<5 1.5 CK4 Id >13 4“ OB or 1—1—~— IF/ RCS '5 i i $12124 52 5] SF2 3151 Figure 5.4: Modified-Block-graph of five-degree-of-freedom vehicle suspension system 59 The fault report for this (short) fault list, as provided by CFDIC option l is: Table 5.4: Fault report FAULT DEFINED BY DIAGNOSIS Fl f.c2 -0 DETECTABLE, AMBIGUITY SET #1 F2 e.3 -0 DETECTABLE, UNIQUELY F3 ' e.k2 -0 DETECTABLE, AMBIGUITY SET #1 F4 e.2 -0 DETECTABLE, UNIQUELY F5 e.k5 -0 UNDETECTABLE TOTAL DETECTION PERCENTAGE: 80.0% UNIQUE DETECTION PERCENTAGE: 40.0% AMBIGUITY SETS ************** AMBIGUITY SET #1 CONTAINS: FAULT #1 FAULT #3 5.1.2 Initial fault list This option is a subset of the previous one. Here, inputs and outputs are given, and the user wishes to find the detectable fault list. A list of all faults that are detected by the given inputs and outputs is provided by the software. This can work as an initial fault list, since other faults are undetected by those inputs/outputs. This problem is addressed by finding all fault junctions on the paths from 60 every input to every output. Option 1 of CFDIC provides a list of faults that are detected.by known inputs and test-nodes. The input to this option includes the model description, and the lists of the known inputs and test-nodes. The detected faults Option may be helpful for the definition of the fault list, since it is the complete fault list detected by given inputs and test-nodes. This fault list can be used as an initial list from which the actual fault list is defined. The initial fault-list option is actually a default of option 1, i.e., whenever the fault list data is missing, the software provides the complete detected fault list. Example Let us assume that three accelerometers are already located in the suspension system (Figure 5.2) which measure the main body rotation, main body vertical acceleration and the seat vertical acceleration. Thus the output variables are e.j2, e.m2 and e.ii respectively. The input is the front wheel vertical velocity, f.sl. Which faults may be detected by these inputs-outputs? CFDIC option 1 (the default option) was run using this data and the following results were provided (direct copy of the printout). 6l Table 5.5: List of faults detected by the given inputs and test-nodes FAULT DEFINED ASSOCIATED DIAGNOSIS BY WITH S.J. F1 e.j2 -o * DETECTABLE, A.S. #1 F2 £.32 -0 1R DETECTABLE, A.S. #1 F3 e.3 -o 0F1 DETECTABLE, A.S. #2 F4 f.3 -o 124 DETECTABLE, A.S. #2 F5 e.l -0 OF DETECTABLE, A.S. #2 F6 e.m2 -o * DETECTABLE, A.S. #3 F7 f.m2 -0 1T DETECTABLE, A.S. #3 F8 f.m2 -0 on DETECTABLE, A.S. #3 * THE SJ ASSOCIATED WITH THIS FAULT DO NOT APPEAR IN THE ORIGINAL GRAPH ABBREVIATIONS: S.J. - SIMPLE JUNCTIONS A.S. - AMBIGUITY SET AMBIGUITY SETS ************** AMBIGUITY SET #1 CONTAINS: FAULT #1 FAULT #2 AMBIGUITY SET #2 CONTAINS: FAULT #3 FAULT #4 FAULT #5 AMBIGUITY SET #3 CONTAINS: FAULT #6 FAULT #7 62 5.2 Test-node detectability characteristics (CFDIC Option 2) The design of number and location of test-nodes, or choosing test-nodes in an efficient way, is the most important and most addressed problem in design-for-testability (Lin, 1985). Usually, an initial list of possible test-node locations with their cost is provided. We will address this problem in a simplified way, i.e., every test-node has the same installation complexity (defined as "cost"), every fault has the same importance (defined by "weight") and the inputs to the system are fixed. More complex problems can. be consider from this. approach. modified suitably. In the general case, the determination of a minimum set of test nodes to achieve the highest percentage (not always 100%) of fault detection is a very time consuming process for large systems. Lin (1985) suggested.a.more practical approach. For practical applications there is no need to obtain the theoretical minimum number of test nodes. Any near-minimum solution will serve our purpose if the solution is simple. In other words, a heuristic method might be more useful for solving practical problems. Our approach combines the CFD properties with the practical approach mentioned above. The following algorithm should address the questions: (1) Which of the test-nodes (defined in the initial list) is unnecessary? (2) Which test-nodes are equivalent (i.e., provide the same information)? (3) Which test-node detects the maximum number of faults? 63 (4) If the number of test-nodes is limited, which test-nodes should we choose in order to detect the maximum number of faults? The first two questions can be directly answered by observing the CFD. Let us define a Test-Node Matrix, TNH, for test-node #30 as: TNM(jo) - D(i,jo,k) ( 5.1 ) where i-l, ... ,l (l is number of inputs); k-l, ... ,n (n is number of faults); and D is the CFD array. Fig. 5.1 shows this matrix abstractly. A test-node is unnecessary if all its entries are l, which means that there is no prospective fault on any path from any input to this test-node. If two test-nodes have the same TNM, they are equivalent. Thus only one of these should be selected. Question 3 is solved by processing the data of the TNM for each test-node. Question 4 is addressed by the following heuristic procedure: Step 1: Select the test-node that has the largest number of detected faults. Step 2: Select next the test-node whose intersection with previously selected nodes will result in the largest number of detected faults. Step 3: Repeat step 2 till you reach m test-nodes. If we describe the number of detected faults at each step as a function of the number of picked test-nodes, we get a useful design-for-testability tool to aid the user. All the described information is provided while 64 running Option 3 of the CFD software. The input consists of the system description, list of input variables, fault variables and initial (maximal) test-node list. Example Suppose only one input, front wheel velocity, was used as an input. The fault list consists of the following variables: FHO—‘O‘U‘ O‘H O N .3 .15 .12 "hHoHIH'owHFCDCDQHI W N The initial test-node list contains the following variables: e.j2 .m2 .ii .k2 .m5 .k2 .k3 .c2 .c4 comment-how All this input data is provided by the user; see details in APPENDIX F3. Results: Below are the results, as provided by the software. TEST-NODE REPORT **************** LIST OF UNNECESSARY TEST-NODES ****************************** TEST-NODE #10 (DEFINED BY e.c4 ) 65 TEST-NODE EQUIVALENCE SETS ************************** TEST-NODE EQUIVALENCE SET #1 CONTAINS: TEST-NODE #4 (DEFINED BY f.k2 TEST¢NODE #9 (DEFINED BY e.c2 DETECTABILITY 0F TEST-NODES *************************** -TOTAL NUMBER OF FAULTS: 10 -NUMBER OF EFFECTIVE TEST-NODES: 8 * UNNECESSARY TEST-NODES WERE DELETED FROM THE LIST * AN EQUIVALENCE SET IS MARKED BY ITS FIRST T.N. VARIABLE Table 5.6: Detectability of test-nodes TEST-NODE TEST-NODE NUMBER OF NUMBER OF UNIQUELY NUMBER VARIABLE DETECTED FAULTS DETECTED FAULTS l e.j2 3 0 2 e.m2 3 0 3 e.ii 3 0 h f.k2 4 0 5 e.m5 4 0 6 e.k2 5 0 7 f.k3 3 0 8 e.c2 a 0 66 REDUCTION OF TEST-NODES *********************** Table 5.7: Cumulative detectability of test-nodes NUMBER OF INCLUDING TOTAL NUMBER OF TOTAL NUMBER OF T.N. T.N. VARIABLES D.F. U.T.F. l e.k2 5 0 2 e.m5 7 0 3 e.ii 8 l 4 e.j2 9 2 5 e.m2 10 3 6 f.k2 10 . 4 7 f.k3 10 6 8 e.c2 10 6 ABBREVIATIONS: T.N. - TEST-NODES D.F. - DETECTED FAULTS U.D.F. - UNIQUELY DETECTED FAULTS Discussion: Observing the results the designer can conclude the following: (1) e.c4 is useless as output for detecting the faults defined by the fault list. (2) Either f.k2 or e.c2 should be chosen as outputs. There is no need to choose both. (3) e.k2 is the "best" test-node variable as far as maximum detected faults are concerned (refer to Table 5.6). 67 Table 5.7, whose information is abstracted graphically in Fig. 5.5, provides a design tool for a limited number of test nodes. For example, if only four test-nodes are allowed, one can see from the graph that nine faults will be detected, two of them uniquely. From Table 5.7 we can find which test nodes should be chosen. For this example the first four variables, i.e., e.k2, e.m5, e.ii and e.jZ, are the optimal test-node variables . In this option, the algorithm has been developed to detect maximum faults, ignoring uniqueness considerations. Other algorithms may be developed taking into account other design considerations, as specified by the designer of the system. 5.3 Summary The chapter described two, out of many, families of design problems, that may be addressed by the CFD approach. These are the fault detection properties and the test-node detectability characteristics. The procedures needed to solve those problems are imbedded in CFDIC software. Figure 5.6 summarizes these design options of CFDIC software. Further design problems are left for future work (refer to Chapter 6). detected nunner or‘ A faults 10- 68 detettion unique detection 3 4 S 6 7 number 0F test-nodes Figure 5.5: Number of detected faults as a function of the number of test- nodes 69 W... FAULT —-- CFD CFDIC m... ANALYSIS W crummy. , .... FAULT FAULT LIST . REPORT Option 1: Fault detection properties of system design maximum... TEST-NOD! TEST-NOD! CFDIC __§ED__ DETECTABILITY -l-DETECTABILITY GENERATOR REPORT INITIAL OUTPUT LIST Option 2: Test-node detectability characteristics Fig. 5.6: Options of CFDIC software 6. SUMMARY AND FUTURE WORK 6.1 Summary A new approach to constructing the catastrophic fault dictionary for engineering systems was introduced and developed. The CFD is derived directly from the topological structure of the system and the resulting fault dictionary is a three-dimensional boolean array. The procedure of deriving the CFD and addressing design problems contains three main steps. Please refer to Figure 6.1. Every step has a well defined input, output and associated mathematical tool. In step 1 bond graph methods convert the catastrophic fault diagnosis problem into a graphical one. In step 2 Graph algorithms are used to generate the CFD from the graphical presentation. The CFD, as an output of step 2 and an input of step 3, is then processed by boolean algebra methods to address testability-design engineering problems. Comparison of CFD to a conventional fault dictionary is summarized in Table 6.1. The major advantage of the proposed approach is that it is derived directly from the model structure. The binary structure of the CFD is attractive due to the limited size of storage needed and the simple look up (when the CFD is compared to experimental data). It also allows one to detect multifault without increasing the dictionary size due to its superposition property. The CFD has been demonstrated to be a useful tool for testability design. 70 71 CATASTRO PHIC FAULT DIAGNOSIS PROBLEM BOND GRAPH MODELING l GRAPHI CAL PRESENTATION L GRAPH ALGORITHMS CFD BOOLEAN ALGEBRA METHODS DESIGN FOR TESTABILITY Figure 6.1: CFD procedure —- Step 1 JL -— Step 2 l L —— Step 3 72 Table 6.1: Comparison between conventional fault dictionary and CFD W Convensignal FD CFD FD three dimensional three dimensional structure array array FD outputs, real structural sensitivities entries numbers of outputs with respect to inputs, zeros or ones Type of catastrophic catastrophic, single detected and/or soft, and multiple faults usually single - Ambiguity defined by defined automatically sets the designer by the computer Advantages 1. Straight forward 1. Derived directly from the 2. Applicable for bond graph model analog and digital 2. Most general, handles systems various types of systems 3. Appropriate for hard 3. easy look up - due to and soft failures boolean structure 4. based on system structure, parameter change does not change the dictionary 5. Handles nonlinearities 6. efficient in memory size 7. handles multifaults easily Disadvantages 1. limited by memory 1. handles catastrophic size 2. calculations needed to detect faults 3. limited to piecewise linear functions (current version) faults only 2. efficiency depend on model structure 73 The disadvantages of this method also lie in the structural procedure of constructing the CFD. At this stage of development faults are limited to catastrophic ones. The practical problem of identifying parameters that are drifted from nominal is not addressed. 6.2 Future work Although the task of constructing a catastrophic fault dictionary has been completed, many additional areas of worthy research were found while performing this work. Described below are several topics considered as important for future studies. 6.2.1 Extension of the structural approach 6.2.1.1 Non catastrophic faults The current approach is limited to catastrophic faults only. Although those are critical in engineering systems, non-catastrophic failures are important too. It is suggested to extend the family of detectable faults by modeling non-catastrophic failures as catastrophic. Lin (1985) modeled a fixed change in a parameter value (resistance in an analog circuit) by a "fault switch" which is similar to our fault source. Since soft failures are actually changes in system parameters, they can be theoretically modeled as catastrophic failures. Figure 6.2 (from Lin, 1985) shows open circuit, shorted circuit and fixed change in a parameter value, modeled by switches. In practice, modeling of every soft failure this way is not reasonable. Nevertheless, some non- catastrophic faults may fall into this category. With some complication of the bond graph, which can be handled by the software, various types 74 of non-catastrophic failures may be detected by the structural approach. Further investigation of those faults, their appearance in real systems and their diagnosis techniques is recommended. N-C- NI]. R2 NI]. R3 Figure 6.2: Catastrophic failures represented by switches 6.2.1.2 Multifaults The superposition property, as described in section 3.7.3, has not seen use in this study. A further development of the software is needed to include this feature in the CFD. This property is very attractive to fault detection since there is no need to increase the memory size for including this feature. 75 6.2.2 Development of conventional fault dictionary using bond graph methods As mentioned in the literature review, a conventional fault dictionary is constructed by running the nominal and faulty systems, obtaining the test nodes' output and comparing them..A program that accepts bond graph models and simulates their dynamic response is a logical basis for development an automated FD set up procedure. The ENPORT software is a suitable computational tool (Rosenberg 1987), in the process of designing an automated procedure for setting a FD. A procedural diagram for the construction of a fault dictionary is shown in Figure 6.3. Once the bond graph model is built, one can define the list of failures (component failures and connection failures) which is translated into a list of faulty junctions. After. inputs and output locations are defined, the computer runs the nominal and the set up of faulted simulations in order to construct the FD. So far most of the fault dictionaries developed (Elcherif, 1983; Lin, 1985; Schreiber, 1979) dealt with nonlinear analog circuits, where the nonlinearities were assumed to be piecewise linear functions and the inputs were constant. Hochwald (1979) suggested to expand this do approach to be able to cover also dynamic failures. This can be done by including small signal periodic stimuli. Under the assumption that both nominal and faulty models are stable at the point of interest, the proposed approach is to use two types of inputs : a constant input (CI) which will respond as a constant steady state output, and a small signal sinusoidal input, which will assure a periodic response (due to linearization) in order to 76 Enter the system bond graph model 1 Specify fault list 1 Define test-nodes Run nominal simulation 1 Run fault simulation 1 Construct fault dictionary 1 Reduce number of test-nodes Figure 6.3: Automated structural fault dictionary set up 77 detect dynamic failures. No special assumptions should be made about the nonlinearities of the system. Since modeling of catastrophic failures can be done in bond graph language and bond graph software can handle nonlinearities in a general system, a fault dictionary based on this technique will be suitable for a variety of dynamic systems. It should be noted that at present the CI fault dictionary is the only one that is used in practice, while others have not progressed beyond the feasibility study stage (Ozawa, 1988). A detailed diagram for automated construction of a fault dictionary is given in Figure 6.4. It contains five major subroutines. Some of them are straightforward; others need some development. 6.2.3 Further investigation of CFD-as a design tool The CFD has been found to be very attractive for testability-design. So far we have dealt with simplified design problems, in which all faults were equal in their importance and every test-node has the same price (i.e., complexity in installation). In practice this is not the case. The current approach. may be extended to solve engineering ‘problems by processing the data of the CFD array in.a more complicated.way. A complete design problem defined by the user may be solved by the software. By that we mean, for example, that the user defines the constraint of this design, such as: number of faults to be detected, importance of specific faults and price or weight for each test-node. The software should address this problem and provide the best design under the constraints. The binary 78 mm! 1153:21an TEST MODES mum IL summmus 1: 1 cunsmuc' 13—99mm BM] cam FAULT LIST 1; 'y SUBRDUTINE 22 PREPARE THE FMLTY mm: b i SUHEIHDEII Rm SWLATIUN 0F HIM SYSTEM AND FALLTY MODELS. OBSERVE EWIUBRRH l . POINTS. m 33:! . (SHNU.SHBUA.SDISDHMI. T WPUT) :; t BUM CI (CONSTANT INPUD . mama: MSWTWG’ WWW , + runmms DESERVEPERIUIIIC SILUTIIN Mi 1 manna muons: (INTENT FALLT DICTIONARY Figure 6.4: Detailed flow diagram of a conventional fault dictionary 79 data base of the CFD array is attractive for solving such problems due to the easy processing of this type of data. 6.2.4 Development of SAT approach using bond graph techniques As an alternative approach to the fault dictionary approach, which was widely discussed in this work, a number of researchers proposed the Simulation-After-Test (SAT) algorithms (Ozawa, 1988; Wu,1984; Salama, 1982). This method, which is mostly used in analog circuits, are useful when hard or soft faults need to be located up to the level a specific replaceable subsystem. In this approach, as mentioned in the literature review, the system under test is decomposed into subnetworks using nodes at which outputs have been measured. It is recommended to extend the SAT approach to various types of systems by using bond graph modeling. As shown in the fault-dictionary approach, output are usually associated with simple junctions. Thus the constitutive equations for those junctions can be used to check the consistency of the system. An efficient algorithm may be developed in order to isolate faulty replaceable units. The bond graph model can also be used for design purposes, i.e., based on the topology of the system, optimal test-nodes could be chosen to detect specific faulty units. Example: The nominal circuit and its bond graph model are shown in Figure 6.5a and Figure 6.5b respectively. Nodes of decomposition are A, B, and E. Then each subcircuit consists of one element (Figure 6.5c). The faulty circuit is shown in Figure 6.5d. Resistor r3 is faulty and is now 3:). (a) (b) (C) (d) (e) 80 12V -: thr‘l Rare R3Ir‘3 111 BEL-1‘0!) ‘1 ‘0B ‘R4r4 WW P P 12v -::- r8 r4 12v -.: RlIrl Rama R3Ir‘3 1 SELl—>OA ‘1 ‘UB ‘R4r4 4 4 av/ Zv/ / SE SE / Figure 6.5: Circuit fault detection by SAT approach 81 instead of its nominal value of 112.The measured node voltages will be Va-BV, IVE-2V. Using these voltages and nominal value elements, we get The experimental data is then constrained on the nominal system by addition of sources of effort at points A and B (Figure 6.5e). The currents (flow'variables) of these "artificial sources" are then observed. If the system is fault free, all those flows would be zero, since KCL is satisfied at each O-junction. However, if a subsystem is faulty, KCL is not satisfied on its connections and a nonzero flow will be observed in the corresponding "artificial source". A nonzero current is associated with junctions 0A and OB, thus the subsystem which lies between those junctions is faulty. For this case it is the resistor rl 6.2.5 Failure detection of shop replaceable units The development of sophisticated systems has increased both the importance of Shop-Replaceable-Units (SRU) and the demand of more efficient methods for detecting failures associated with those units. The development of macro-models (Vlach, 1983; Rosenberg, 1986) enables us to improve modeling of such systems. Two types of failures can occur in a SRU: a macro failure or a connection failure. The former is defined by any failure that occurs inside the SRU while the latter describes a failure that occurs in the connection between SRUs or between SRUs and other components. Faults inside an SRU do not have to be detected uniquely, which can result in the reduction of the number of test nodes. 82 In our opinion, failures inside a SRU can be handled better by the SAT approach while connection failures should be detected better by the fault dictionary (SBT) approach. Both approaches (or a combination of them) should be investigated in order to find efficient methods to detect SRU failures . 6.2.6 Digital systems fault diagnosis Although bond graphs were originally developed for physical dynamic systems (i.e. , systems in which there is a power transmission within the system), the current approach of a boolean array as a fault dictionary is similar in principle to fault diagnosis approaches used in digital systems . As a result of the development of LSI and VLSI, many researches are seeking for new approaches for detecting (in an efficient way) manufacturing faults. Common type of faults in digital systems are fixed faults . These faults remain in the system from the time they occur until they are replaced (Vishnubhotla, 1980). The most common ones occur when one or more wires are stuck at either 0 or 1 value. A survey done on this subject (Williams and Parker, 1983) describes different diagnosis techniques and their applications for design-for - testability. Among the approaches mentioned there, as well as in other papers, two are close to our approach. These are the digital fault dictionary and the cause-effect analysis. The former approach, mentioned 83 in early papers (Kautz, 1968; Brown, 1975) is similar to the conventional fault dictionary used for analog circuits. In more recent papers an attempt is made to handle large scale systems by improving the simulation process (Markas, 1990) or by generating the dictionary automatically from the structural description of the system (Sugasaki, 1989), which has the same goal as our research. The cause-effect analysis, proposed by Breuer in 1976 and followed by Abramovici (1980), does not require a fault dictionary and it is not based on.comparing the Obtained response with the expected response. Effect-cause analysis directly processes the actual response of the system-under-test (SUT) to the applied test (the effect) to determine the possible fault situations (the causes) which can generate that response. Several similarities can be found between fault diagnosis in digital systems and the current approach. (1) Both approaches focus on catastrophic faults where in digital systems those faults are defined as stuck-at faults. (2) Fault dictionary is defined by a boolean array. (3) Attempt is made to generate the dictionary on system structure, mainly by using the graphical representation of the system, and observing input-output paths. (4) Detectable, undetectable faults and ambiguity sets are defined in the same way. The similarities between the fault diagnosis in digital system and the CFD approach suggest further investigation in combining the two methods. 7. BIBLIOGRAPHY Abramovici, M., 1980, Fault diagnosis in logic circuits based on effect- cause analysis, Ph.D Thesis, University of Southern California. Bandler, J. W. and Salama, A. E., 1985, Fault diagnosis of analog circuits, IEEE Proc., Vol. 73, No. 8, pp. 1279-1325. Basseville, M., 1987, Detecting changes in signals and systems - a survey, Proceeding of the and IFAC'Workshop on.Adaptive Systems in Control and Signal Processing,Lund, Sweden. Breuer, M. A. and Chang, S. and Su, S. Y. E., 1976, Identification of multiple stuck-type faults in combinatorical networks, IEEE Trans. on Comp., Vol. C-25, No. 1, pp. 44-54. Brown, F. M., 1975, Test vector generation for internode and input diode short faults, 2nd USA-Japan Computer Conference Proceedings, August 26- 28. Brown, F. T., 1972, Direct application of the loop rule to bond graphs, ASME Journal of Dynamic Systems, Measurement, and Control, Vol. 94, No. 3, pp 253-261. ' Carre, B., 1979, Graphs and networks, Clarndon Press, Oxford. Chartrand, G. and Lesniak, L., 1986, Graphs and diagraphs, Wadsworth and Brooks, Monterey, Calif. Chen, C. T., 1984, Linear system theory and design, Holt, Rinehart and Winston, New York. Christofides, N., 1975, Graph theory - an algorithm approach, Academic Press, Inc. New York. Cikanek, H. A., 1986, Space shuttle main engine failure detection, IEEE Cont. Syst. Mag., June, pp. 13-18. de Benito, C. D., 1988, On-board, real-time failure detection and diagnosis of automotive systems, Proceeding of the 1988 American Control Conference. de Benito, C. D. 1990, Central of an active suspension system subject to random component failures, Journal of Dynamic Systems, Measurement, and Control, Vol. 112, pp 95- 99. Duhamel, P and Rault, J. C., 1979, Automatic test generation techniques for analog circuits and systems: A review, IEEE Trans. Circuits Syst., Vol. CAS-26, pp. 411-440. 84 85 Elcherif, Y. S. and Lin, P. M., 1983, Fault diagnosis of nonlinear analog circuits, Volume V, HAFDIG: A program for generating a hard fault dictionary, School of Electrical Engineering, Purdue Univ., Tech. Rep. to office of Naval Research. Even, S., 1979, Graph algorithms, Computer Science Press, Rockville, MD. Gertler, J. J., 1988, Survey of model-based detection and isolation in complex plants, IEEE Control Syst. Mag., Vol. 8, No. 6, pp 3-11. Gibbons, A., 1985, Algorithmic graph theory, Cambridge University Press, Cambridge. Goodstein, R. L., 1964, Boolean algebra, Pergamon Press, London Harrary, F., 1972, Graph theory, Addison-Wesley, MA. Hochwald, W. and Bastain, J. D., 1979, A DC approach for analogue fault dictionary determination, IEEE‘Trans. Circuits Syst., Vol. OAS-26, pp.523- 529. Iserman, R., 1984, Process fault detection based on modeling and estimation methods - a survey, Automatica, Vol. 20, No. 4, pp. 387-404. Jagodnik, J. E. and Wolfson, M. S., 1979, Systematic fault simulation in an analog circuit simulator, IEEE Trans. Circuits Syst., Vol. CAB-26, NO. 7. Kaurz, W. R., 1968, Fault testing and diagnosis in combinatorical digital circuits, IEEE Trans. on computers, April. Lin, P. M. and Elcherif, Y. S., 1982, Fault diagnosis of nonlinear analog circuits, Volume I: DO diagnosis of hard failures, School of Electrical Engineering, Purdue Univ., Tech. Rep. to office of Naval Research. Lin, P. M. and Elcherif, Y. S.,°1985, Analogue circuit fault dictionary - new approaches and implementations, Int. J. Circuit Theory Appi., pp. 149-172. Ozawa, T., 1988, Analog methods for computer-aided circuit analysis and diagnosis, Marcel Dekker, Inc., New York. Pahwa, A. and Rohrer, R. A., 1982, Band faults: Efficient approximations to fault bands for the simulation before fault diagnosis of linear circuits, IEEE Trans. Circuits Syst., Vol.CAS-29, pp. 82-88. Markas, T. and Royals, M. and Kanapoulus, N., 1990, On distributed fault simulation, Computer, Vol. 23, No.1, pp 40 - 52. Mironovski, L. A., 1980, Functional diagnosis of dynamic systems - a urvey, Automn Remote Control, 41, 1122 - 1143. 86 Paynter, H. M., 1961, Analysis and design of engineering systems, M.I.T., Press, Cambridge, MA. Rapisarda, L. and Decarlo, R. A., 1983, Analog multifrequency fault diagnosis, IEEE Trans. Circuits Syst., Vol. OAS-30, No. 4. Rosenberg, R. C. and Karnopp, D. C., 1972, A definition of the bond graph language, Trans. ASME, JDSMC, Vol. 94, No. 3, pp. 179-182. Rosenberg, R. C., 1979a, Essential gyrators and reciprocity in junction structure, JFI, Vol. 308, No. 3, pp. 343-352. Rosenberg, R. C. and Andry, A. N., Jr., 1979b, A controllability test for linear systems using a graphical Technique, IFACSymposium on Computer Aided Design of Control Systems, Zurich, pp. 143-147. Rosenberg, R. C. and Karnopp, D. C., 1983, Introduction to physical system dynamics, McGraw Hill Inc., New York. Rosenberg, R. C. and Zalewiski, 2., 1986, Macro modeling of engineering sytems, ASME Paper 86-WA/DSC-12, Winter Annual Meeting. Rosenberg, R. C., 1987a, Exploiting bond graph causality in physical system models, Trans. ASME, JDSMC, Vol. 109, No. 4, pp. 378-383. Rosenberg, R. C., 1987b, ENPORT-7 Reference manual, Rosencode Assoc., Inc., Lansing, MI. Salama, A. E. and Starzyk, J. A., 1984, A unified decomposition approach for fault location in large analog circuits, IEEE Trans. Circuits Syst., Vol. CAS-31, No. 7, pp. 609-621. Schreiber, H. M., 1979, Fault dictionary based upon stimulus design, IEEE Trans. Circuits Syst., Vol. GAS-26, pp. 529-537. Seshu, S. and Waxman R., 1966, Fault isolation in conventional linear systems - a feasibility study, IEEE‘Trans. Reliability, Vol. R-15, pp. 11- 16. Sussman, G. J. and Stalman, R. M., 1975, Heuristic techniques in computer-aided circuit analysis, IEEE Trans. Circuits Syst., Vol. GAS-22. pp. 857-869. Sugasaki, I. and Tanaka, H. and Kawai, M., 1989, Fault dictionary generation to improve system level diagnostic, NEC Res. Dev., No. 93, pp. 114-120. Vishnubhotla, S. R. and Altan O. D., 1980, A structured based procedure to build test sequences for the diagnosis of synchronous sequential circuits, Proceedings of the Midwest Symposium on Circuits and Systems, August, pp. 165-169 87 Vlach, J. and Singhal, R., 1983, computer methods for circuit analysis and design, Van Nostrand-Reinhold, New York. Williams, T. W., 1983, Design for testability - a survey, Proceeding of the IEEE, Vol. 71, No. 1. Willsky, A. S., 1976, A survey of design methods for failure detection systems, Automatica, Vol. 12, pp. 601-611. Willsky, A. 8., 1980, Failure detection in dynamic systems. AGARD No. 109. Wu, C. C. and Nakajima, K., 1982. Analog fault diagnosis with failure bounds. IEEE Trans. Circuits Syst., Vol. GAS-29, No. 5. APPENDICS APPENDIX A: Theorems and proofs W Every catastrophic failure in a multiport system can be modeled by addition of either a fault source of flow or a fault source of effort to the proper bond graph of the system. Proof: (by construction) By the PEG definition every effort or flow variable is associated with a simple junction. On the. other hand, catastrophic faults are defined by zero flow or zero effort, thus zero flow or effort can be constrained by adding a F8 to its associated junction. W Sij is identically zero if and only if there exists a catastrophic failure associated with a simple junction on P“. Proof: ->' (if) Suppose there exists a catastrophic fault in the system. We define two cases: Case 1: A CFF associated with a 1-junction on P". Case 2: A CEF associated with a 0- junction on P”. Proof of case 1: Please refer to Figure A.1. ‘Let U1 be an input-junction and Y1 an output- junction, where 1A is a 1- junction associated with the fault. 1A is on a unique path from U1 to Y1. Based on Theorem 2.1, modeling of the CFF associated with 1A is done by adding a zero source of flow to this junction, as shown in Figure A.1a. The causality strokes are added to the graph in Figure A.1b. From causality considerations (Rosenberg and Karnopp, 1983), assuming the directions as shown in the figure, we get £,-£,-....-f,-f-o (1) 88 89 and e .. e1-+ e?-+ .... + en ( 2 ) 3 Since es is the output of eq. 2 and it only appears in this equation, we can say that it is adjusted such that eq. 2 will always hold. This implies that en does not depend on e,. Since there exists only one causal path between Ui and Yj, the output associated with Yj does not depend on the input associated with U1, thus Sij is identically zero. Proof of case 2: Using the same arguments for a zero faulty junction 0A (refer to Figure A.2) we obtain e1-e2-....-en-es-0 (3) and f,-f,+f1,+....+fn (4) which implies, in the same way, that Sij is identically zero. <- (only if): Let us assume that the only change that may occur in the nominal system is a catastrophic fault. Since there exists a zero entry in the SSM, and the only change allowed is a CF, then a FS has been added to some SJ of the system bond graph model. Define two cases: Case 1: A FS has been added to a SJ on Rfi Case 2: A FS has been added to a SJ outside Er If case 1 holds then Sij is identically zero by the first part of the proof. If case 2 holds then there exist a causal path between Ui and Yj, which implies that Sij is not zero. Since S” is zero, only case 1 holds, i.e., there exists a CF on PW 90 (a) -, 1A <-”-— — — —Y1 / tsp [s \ (b) { 0A 1e“— .n-l Figure A.l: A catastrophic flow fault modeling u1————>\ n _ __ __ (a) ‘. DA (- Y1 (b) Figure A.2: A catastrophic effort fault modeling APPENDIX 8: Construction of a Modified-Block-Craph The construction of the MEG of a connected graph G is done by the following steps: Step 1: Expand the original graph by duplicating its cut nodes. Step 2: Define all blocks of more than two nodes. Step 3: Reduce each block ihto one node. Step 4: Delete unneeded duplicate cut nodes. The procedure is demonstrated on the graph shown in Figure B.1. 91 92 (a) (b) (C) (a) ' BLUCKI' E r Burke 1 J j\ L K _—_—i—e————+< BLUCKE (e) ‘ BLUCKI. E F I J \. L Figure 8.1: Modified-Block-Graph: (a) Original graph: (b) Duplication of cut nodes; (c) Definition of blocks: ((1) Reduction of blocks to nodes: (e) MEG completed APPENDIX C Derivation of the nominal Structural-Sensitivity-Matrix . from system structure The bond graph represents the system equations in a structured way. Since ' the Structural-Sensitivity-Matrix (SSM) is concerned only with the influence of the inputs on outputs, the bond graph augmented with causality is a useful tool for the determination of the SSM. The SSM of a nominal system can be derived from the causally augmented bond graph by ‘a series of steps, described next. First, the bond graph is converted into a.Structural-Influence-Graph (SIG) that represents the input-output relationships in the system. Then graph algorithms are applied to the SIG to determine the entries of the SSM of the nominal system. Section C.1 defines the SIG and the procedure for constructing it. In Section C.2 the connection between the SIG and.the SSM is described. The graph algorithm presented in Section 0.3 provides the directed paths of the SIG. Section 0.4 provides a detailed example of the whole procedure. C.1 The Structural-Influence-Graph The following procedure is used to construct the SIG from a given bond graph. The bond graph requirements are as defined in section 3.1. Please refer to Figure C.1. Step 1: Define the bond graph model and assign causality using the Sequential Causal Assignment Procedure, SCAP (Rosenberg and Karnopp, 1983). 93 Sources Simple Junctions TronsForner Gyhutor Elements Multlport elements 94 —'—>lTF——z->-l }__J__:s. TFl-£-=“ .__l__=.q GYl-JL-==- F—LAGY-J-é-l .__A__=aq I }__i__:a.1 ...J7_:=-.C..:=BL___ I = R n Figure C.1: Junction and element structures 95 Step 2: Write the input-output equations for each node of the graph. For C and I nodes ignore the state variables and use the condensed equation form indicated below. The equations for the standard bond graph nodes are: SE: e, - Mt) SF: fl - D(t) 0: IM, - f,+f,+. . .+£ e1 - e n n+1 en - en-H 1: erm - e1+e2+. . .+en 1 - fm-l fn - fn+1 TF: f1 -m,*f2 or f2-m2'4l’f1 62-m1*e1 81-m2*82 GY: f,-r,*e2 or ez-r2*f, fz-r1’l’e1 e1-r2'kf2 I: f, - we.) or e, - Mr.) I(mu1tiport): f, - 0,(e1,...,en) or e, - O,(f,,...,fn) i-1,...,n C: a - ¢(fi) or E - 0(60 C(multiport): el - O,(f., . . . ,fn) or f, - 0,(e,, . . . ,en) i-1,...,n R: e - 0(f0 or E - 0(ep R(multiport): eI - O,(f,,...,fn) or fI - 0,(e,,...,en) i-1,...,n where 0 represents a general function. Note that the equations contain only effort and flow variables (and time for the source equations). Equations for C and I nodes are not written in the conventional way (using the state). The modification indicates our 96 need to keep track of the efforts and flows only. Since our concern is with which inputs define which outputs, no explicit equations are needed. It is sufficient to use the functional forms as written above. Step 3: Construct the SIG from the system equations. In the SIG every equation is represented by a node. The node is labeled by its output variable (effort or flow) while the edges are labeled arbitrarily. Each edge arises from an input variable to an equation. Step 4: Augment the SIG by adding nodes (and corresponding edges) that define the given outputs. The SIG is a directed graph. Remarks: A SIG input-node is defined by a zero in-degree node, and a SIG output node is defined by a zero out-degree node. The input-nodes are defined directly by the bond graph, but some of them may be of no interest to the user (for example, weight). On the other hand, outputs (test-node locations) are specified.by the user and added to the SIG as shown in step 4. Some outputs that already exist in the graph may be of no interest. C.2 Determination of the SSM from the SIG The SIG contains each effort and flow of the bond graph as a node. Let U,...Um be the input variables of the system and Y,...Y,, the output variables. Since inputs and outputs were restricted to efforts and flows, every input and output appear in the SIG as a node. The existence of a 97 directed path from a specific input to a specific output is an indication of an influence (or nonzero sensitivity) of that input on that output. With the aid of standard graph algorithms, we can determine the relationship between inputs and outputs. There are three possible cases: (a) There is no directed path from Ulto Yfi (b) There is a unique directed path from Ulto Yfi (c) There are more than one directed path from U.to Yr It can be shown mathematically that an addition of cycles along a path do not change the three basic cases (i.e., a unique directed path with a cycle is treated as a unique path, and a multi-path which contains cycles is treated as a multi-path). Let us treat every case separately. Case (a). Clearly Su-O. Case (b). Provided 0 along Riobey the proper conditions defined below, then Su-l. Ezgpg: gogditiggs for 0; (1) Continuous function for all its input variables; (2) Single-valued function for all its input variables; (3) g3; not identically zero for each input variables. Case (c). In addition to the previous restrictions on 0 (Case b) the following assumption should be made: For the part of the path which are multiple (including cycles) there is no cancellation of input/output effect due to functional symmetry. Under these assumption case (c) is treated as case (b), i.e., SW-l. 98 The case of multipath is more complicated since there may be cases of cancellation of sensitivity. Here, explicit system equations are needed to determine the SSM entries. For this study we assume that there is no cancellation of sensitivity due to the multipath. In this work single- path and multi-path are treated identically. Our next goal is to determine if there exists a directed path from each input to each output in the given SIG. Graph algorithms, in particular the Depth-First-Search algorithm, is used for this task. C.3 The Depth-First-Search algorithm for finding the reachable nodes in a given digraph The.Depth-First-Search (DFS) is a‘well known.systematic method of labeling vertices of a graph (Even, 1979; Gibbons,1985). It is used for a variety of graph theory problems. In our application we use the DFS labeling in directed graph to find directed paths between two given vertices. Here we use the fact that when a digraph is subjected to the algorithm, the edges which are Tree-type form a spanning out-forest of the graph. That forest contains an out-tree CPU rooted at U“ so that the only reachable outputs (nodes) are the ones that are included in this tree. The following algorithm constructs T” from a given digraph G, therefore it provides the essential information about reachability of different outputs. 99 Step 1: Label the graph using the DFS algorithm staring in the node UP In the process of labeling define the edge type for each edge as either a tree edge or a non-tree edge. Step 2: Delete all non-tree edges from the graph. Step 3: If the resulting graph is connected go to Step 4; else delete all the components that do not contain UP Step 4: Stop, the resulting graph (T3 is an out-tree rooted at UP The existence of a directed path from U to a specific output (defined by a node) is determined by Theorem C.1. Theorem C.1: An output Ylis reachable from U,if and only if it is in T1 By.reachable we mean that there exists at least one directed path from U, to Yr Under the assumption of no cancellation, single path and.multi path can be treated in the same way. The procedure of constructing the reachable-tree (T') is illustrated by the following example. Example: The digraph shown in Figure C.2a is labeled by the DPS algorithm, starting from node A. The corresponding labels (defined as Depth-First- Index, DFI) are: 100 (a) b 0 (b) Figure C.2: An example illustrating an application of the DFS 101 The edge-types are: T - Tree edge NT - Non-tree edge After deleting all the non-tree edges we are left with a out-forest which includes two out-trees, as shown in Figure C.2b. The out-tree that contains node A is If. Thus the reachable nodes are B, C, D, E and F. The procedure illustrated by this example does not distinguish between unique-path and multi-path. If further investigation is needed, all directed paths from the source to the target should be found. Algorithms that find all those paths exist in basic graph theory references (e.g., an algorithm based on Breadth-First-Search in Carre, 1979). 102 0.4 Example A simple mechanical system, shown in Figure C.3a, consists of two masses, m1 and m2, connected by two springs, k1 and k2. The system bond graph model is provided in Figure C.3b. The system contains two inputs: a.moving support, associated with SF1, and a constraint of velocity on the mass m2 (associated with SF2). For simplicity, gravity is ignored. The observed outputs are the velocity of m2, and the force in the spring kl. In bond graph term we define the inputs as f1 and f4, and the outputs as fa and e2. Sixteen equation are derived from the system bond graph. SH: 5, - 01(t) e3" 82 e11- e2 “HI llll {'1 SF2: f4 - 02(t) 11: e, - M5,) e6" e7 33" 97 Cl: e2 - 04(f2) CZ: e7 - 05(f7) A defined general functions, including integrals and derivatives. The SIG, constructed from these equations is shown in Figure C.4. 103 (a) 5% (input 1) V1 3 J's. VVVU k1 JAAA 12 \ C8~.—’—l 0B 11 xi—l 1A vi—lgFe (b) a Clv—la 0A 1 Inputs: F,, F. SH Outputs: e,, F, Figure C.3: A mechanical system with two velocity inputs: (a) schematic diagram; (b) bond graph model. 104 l | . I l l l l 5 5 l l l I l . 9 e . l 7 l l l l 9 _ In 11 l (U2) {:4 '12 F: 95 I l l l B I e .3 I l a I I 0 . I I 14 16 I l l l l l l l l l ‘3 I l I I Q I l w I l I Q I l l | I l mputs I I Figure C.4: The Structural-Influence-Graph of the mechanical system of FigueCL3 105 Observing the graph we get: (1) There exists a unique directed path from f1 to e2; (2) There is no direct path from f1 to fa; (3) There exists a unique directed path from f, to e2. (4) There exists a directed path (including a cycle) from f4 to £8; The corresponding SSM is, therefore: 511 512 1 0 SSM - - 521 8.22 l l where U-[u1,u2]-[f1,f,] and Y-[y1,y2]-[e2,fa] APPENDIX D P OG Written by Tamar Yarom Department of Mechanical Engineering Michigan State University E. Lansing, Michigan 48824 June 20, 1990 1 . Introduction This manual provides the information necessary to use program CFDIC (Catastrophic Fault Dictionary). The program is used to derive the catastrophic fault dictionary for a known system. The physical system is described using bond graph with linear or nonlinear constitutive elements. This program only derives the CFD for systems which satisfy two conditions; (1) their bond graph is a connected graph, (2) systems which are completely sensitive (i.e. , every output of the system is a function of every input). The program checks connectedness before starting any computations; a fault message is provided to the user when the system bond graph is not connected. The second condition is not checked by the software, since causality is needed for checking it (see details in'APPENDIX C). It is assumed that the system is completely sensitive. The current version of this program at Michigan State is run on a personal computer using FORTRAN-77 compiler. This computer program was developed as a part of the doctoral work of the author. 106 107 The author assumes that the reader is familiar with the bond graph method and terminology. 2. Installation notes This program was written in FORTRAN 77. To install this program, compile it and correct any syntax errors, link it and correct unsatisfied external references, and run it. 3. Bond graph requirements 3.1 The bond graph model contains only bonds (no signals allowed) 3.2 The bond graph model is a connected graph. 3.3. The standard bond graph elements are: C: generalized capacitance, . I: generalized inertance, R: generalized resistance, SE: effort source, SF: flow source, 0: zero junction, 1: one junction, TF: transformer, and GY: gyrator. ‘C, I, and R elements can have any number of ports. Constitutive equations for the C, I, and R elements, linear or nonlinear, are functions only of the local port variables (and their appropriate integrals, for C and I). Source (SE and SF) are function of time only. TF and CY elements have constant parameters. 108 4. Row to use the program The normal processing procedure for Program CFDIC is as follows: 4.1 As the first step, the user must create a bond graph model of the 4.2 4.3 4.4 particular physical system of interest. The system data is provided to the program by a file called SYS.DAT which contains two lists: (1) node list, which contains nodes name and type, (2) incident list, which contains bonds name and type, and their connection to the nodes. This file can be created directly (by the software) when using ENPORT software, or directly by the user (practical only for small systems). The format of SYS.DAT should be exactly as defined in the example since the program is reading the data according to that format. The input, output and fault variables are provided by a file name VAR.DAT which contains these variables in a list. The program provides several running options. The options are specified by the user at the beginning of VAR.DAT file. The options are: Option 0: Derivation of CFD, information is stored in an array, D. Option 1: Fault report. In addition to the CFD (stored the same as in Option 0) the software provides information about each fault, if it is detected or undetected, and if detected uniquely or not. Option 1 has a default option as the following: if the fault list is not specified.by the user, the software provides the complete list of the detected faults and treated it as a fault list. 109 Option 2: Test-node report. This option provides a design-for- testability tool. It reports about unnecessary test nodes, equivalence sets of test-nodes and detectability tables for each and cumulative test-nodes. 4.5 Output: The output, for each option is written into a file name A.DAT. 110 5. Example Consider the circuit shown in Figure D.1a It contains two inputs, a voltage source (SE) and a current source (SF). The bond graph of the circuit is defined in Figure D.1b. The system file (SYS.DAT) is: READING FILE ELECSYS.ENP: ELECTRICAL CIRCUIT SYSTEM GRAPH DESCRIPTION NODE TYPE SF9 EFG OB EOG lBC ElG 0C EOG R6 ERG C7 ECG C5 ECG 1B EIG I4 EIG 0A EOG lSA ElG 0D EOG C2 ECG R3 ERG 1A E16 I1 EIG SE EEG CONNECTOR TYPE FROM TO 1 BE 13A 11 2 BE 1A C2 3 BE lA 0D 4 BE 1B 14 5 BE lBC C5 6 BE 0C R6 7 BE 0C C7 8 BE SE8 15A 9 BE SF9 OB 10 BE OB lBC 11 BE lBC 0C 12 BE 1B 0B 13 BE 0A 1B 14 BE 0A 1A 15 BE lSA 0A 16 BE OD R3 111 (a) SE8 u 14 1 1 SE-8—*HSAl--g-‘-0A LlBl—‘L-OB‘J-ISW (b) 1 18 1A 13c V x V n /\on c2 cs /\oc\ 16 7 6 R3 c7 R6 1” IC Figure 0.1: Electrical circuit: (a) schematic diagram; (b) bond graph model. 112 System file is common to all running options, while the variable file has to be specified for each option. Option 0 Suppose test nodes are located at points C and D, measuring the potential of those points. faults: _EaulL_ F1 ‘ F2 F3 F4 F5 Fault list is defined by the following prospective F6 Input data file for option 0 is: OPTION 0 INPUT VARIABLES e.8 f.9 OUTPUT VARIABLES e.7 e.3 FAULT VARIABLES HICDHIWH'IH‘I WIP‘O\UJUJ$‘ _D_efinition Fauluatiahlshifl). L4 open f.4 R3 open f.3 R3 shorted e.3 R6 open f.6 Point A shorted to ground e.15 Current source disconnected f.9 The print out results (beside the CFD stored in the array, D) from file A.DAT is: 113 FAULT DICTIONARY, DEFINED BY PAGES ********************************** FOR FAULT DEFINED BY f.4 -0: 0 l 1 0 FOR FAULT DEFINED BY f.3 -0: 1 0 l 0 FOR FAULT DEFINED BY e.3 -O: 1 O 1 0 FOR FAULT DEFINED BY f.6 -0: 1 l l 1 FOR FAULT DEFINED BY e.15 -0: O 0 l 0 FOR FAULT DEFINED BY f.9 -O: 1 l O 0 Fault pages print out is limited to two inputs and two outputs. Option 1 Variable data file (VAR.DAT) is similar to the previous file: OPTION 1 INPUT VARIABLES e.8 f.9 OUTPUT VARIABLES e.7 e.3 FAULT VARIABLES H10 Him HI": xor-Imwwb 114 The results file (A.DAT): FAULT REPORT W FAULT DEFINED BY DIAGNOSIS F 1 f.4 -O DETECTABLE, UNIQUELY F 2 f.3 -o DETECTABLE, AMBIGUITY SET # 1 F 3 e.6 -O DETECTABLE, AMBIGUITY SET # 1 F 4 f.6 -O UNDETECTABLE F 5 e.15 -O DETECTABLE, UNIQUELY ‘ F 6 f.9 -0 DETECTABLE, UNIQUELY TOTAL DETECTION PERCENTAGE: 83.3% UNIQUE DETECTION PERCENTAGE: 50.0% AMBIGUITY SETS ************** AMBIGUITY SET # 1 CONTAINS: FAULT # 2 FAULT # 3 Option 1 (default option) In the default Option, fault variables are missing in the VAR.DAT file, thus the software provides a list of all detected faults and.their report. Input file VAR.DAT: OPTION 1 INPUT VARIABLES e.8 OUTPUT VARIABLES e.7 e.3 115 The results file (A.DAT): LIST OF FAULTS DETECTED BY THE GIVEN INPUTS AND OUTPUTS **************************** DIAGNOSIS DETECTABLE, DETECTABLE, DETECTABLE, DETECTABLE, DETECTABLE, DETECTABLE, DETECTABLE, DETECTABLE, FAULT DEFINED ASSOCIATED BY WITH S.J. F 1 e.1l -0 OC F 2 f.11 -0 1BC F 3 e.10 -0 OB F 4 f.12 -0 1B F 5 e.13 -0 0A F 6 f.15 -0 15A F 7 e.3 -0 OD F 8 f.3 -0 1A ABBREVIATIONS: S.J. - SIMPLE JUNCTION A.S. - AMBIGUITY SET AMBIGUITY SETS ************** AMBIGUITY SET # 1 CONTAINS: FAULT # 1 FAULT # 2 FAULT # 3 FAULT # 4 AMBIGUITY SET # 2 CONTAINS: FAULT # 5 FAULT # 6 AMBIGUITY SET # 3 CONTAINS: FAULT # FAULT # 8 \l 116 Option 2 Variables data file (VAR.DAT): OPTION 2 INPUT VARIABLES e.8 OUTPUT VARIABLES e.7 .3 .10 .3 .1 (DH’IH’ICD FAULT VARIABLES Him H'DID NH, \OHChWWb Results file (A.DAT): TEST-NODES REPORT ***************** LIST OF UNNECESSARY TEST-NODES ****************************** TEST-NODE # 5 (DEFINED BY e.l ) TEST-NODES EQUIVALENCE SETS *************************** TEST-NODE EQUIVALENCE SET # l CONTAINS: TEST-NODE # l (DEFINED BY e.7 ) TEST-NODE # 2 (DEFINED BY f.10 ) DETECTABILITY OF TEST-NODES *************************** -TOTAL NUMBER OF FAULTS: 6 -NUMBER OF EFFECTIVE TEST-NODES: 3 * UNNECESSARY TEST-NODES WERE DELETED FROM THE LIST * AN EQUIVALENCE SET IS MARKED BY ITS FIRST T.N. VARIABLE 117 TEST-NODE TEST-NODE NUMBER OF NUMBER OF UNIQUELY NUMBER VARIABLE DETECTED FAULTS DETECTED FAULTS 1 e.7 2 0 2 e.3 3 ' 0 3 f.3 2 0 REDUCTION OF TEST-NODES *********************** NUMBER OF INCLUDING TOTAL NUMBER OF TOTAL NUMBER OF T.N. T.N. VARIABLES D.F. U.D.F. 1 e.3 3 0 2 e.7 4 2 3 f.3 4 4 ABBREVIATIONS: T.N. - TEST NODES D.F. - DETECTED FAULTS U.D.F. - UNIQUELY DETECTED FAULTS The information of the last table (reduction of test-nodes) is described graphically in Figure D.2. This graph is not provided by the current software, but can be easily added to it. 118 number OF detected 1 Faults detecton number OF test-nodes Figure 0.2: Number of detected faults as a function of number of test-nodes APPENDIX E: Implementation of the CFDIC PROGRAM E.l Implementation notes These implementation notes attend to assist a user of CFDIC, or one who wishes to develop this software further. It includes efficiency matters, limitations of the program and other relevant information concern the software. 1. Input-junctions: Based on the graphical presentation.of the FDD problem (section 2.5), an input-junction should be a simple junction associated with an input variable. Two types of sources are allowed in bond graphs, a source of effort, SE, and a source of flow, SF. Hence, an input-junction is either a 0-junction adjacent to SE or a 1-junction adjacent to SF. From efficiency point of view, we can define the input-junctions as the source-ports, SE or SF, without changing the basic principles of paths between inputs and outputs. This is true since the sources are always leaves (nodes of 1-degree), thus a path from SE or SF to any output contains the theoretical path with addition of the source port, which is never associated with a fault. Source ports are easy to find (by the software) from the input variable data (provided by the user), and no extra junctions need to be added to the graph. 2. Partial proper bond graph: Following the procedure shown in Fig. 3.2, the first step, after reading in the bond graph, is to convert it into the proper bond graph. This process is associated with addition of many identity-junctions, that may be defined later as out put junction or fault-junctions. Practically, many identity-junctions are later unused, 119 120 while increasing the memory size for no reason. In order to avoid this situation, Knowing the output variables and fault variables, which are provided by the user, identity-junctions are only added to the graph when needed, i.e., When.they are defined as output-junctions or fault-junctions and they do not exist in the original graph (input-junctions are defined as the sources themselves). The missing identity junctions do not change the paths form input to outputs, since, by definition, they are two-degree junctions. Two-degree junctions, added to a graph can only lengthen existing paths without changing their topology. 3. Software limitation: The current version of CFDIC, used by a PC is limited to the following: 100 nodes 100 bonds 20 inputs 20 test-nodes 20 faults 4. The bond graph is assumed to have no signals. A slight improvement of the reader would ignore signals when reading the input file. 5. Basic subroutines were written independently, such that they could be used for various applications. For example, the depth-first-search labeling (subroutine DFSLBL) is used for three purposes: checks connectedness of the graph, finds paths, and defines the blocks. 121 6. Unnecessary information is destroyed. After a block is defined and is changed into a block-node, the contents of that block is destroyed. If this software will extended. to detect faults inside a 'block, this information should be kept in a separate file. 7. In the current software the MEG description, i.e., its node list and its incident list, are stored in the place as the original graph. Hence, after the MEG has been defined, including the correspdnding input, output and fault junctions, the original graph no longer exists and the software relates to the MEG as the basic bond graph. This procedure should be change if the software is used also for other applications. 122 E.2 Calling tree structure CFDIC —T FREAD DFSLBL —-—-EDEGA READVR INPUTJ NAMNO CON TESTJ NAMNO CON NAME ADNODE FAULTJ NAMNO CON NAME ADNODE BLCKFD SSTACK AJN figNDLST POPSTK BLCKGR NAMNO CUTPNT BNDFND NAME FLTLST 1_NAMNO BNDFND __FSTACK.-—-——-{:FAULTJ TREDIC 1"DFSLDL —-EDEGA NAMNO PATHFN FLTEXT b FAULT TNODE RTNODE CHANGE - FAULT 123 E.3 Listing 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 124 SUBROUTINE CFDIC ---DESCRIPTION: CFDIC (CATASTROPHIC FAULT DICTIONARY) PROGRAM PROVIDES. BASICALLY. THE CFD FOR A GIVEN SYSTEM. THE SYSTEM IS DEFINED BY ITS BOND GRAPH MODEL.INPUTS AND TEST -NODE LOCATIONS ARE SPECIFIED BY THE USER. ALSO FAULT-LIST IS PROVIDED BY THE USER. THE CFD IS STORED IN AN ARRAY (D). DESIGN-FOR- TESTABILITY OPTIONS ARE INCLUDED IN THIS SUBROUTINE (SEE DETAIIJB IN IJUflILflOUFTflIT). --INPUTS: SYSTEM DESCRIPTION. FILE: SYS.DAT. DEFINED BY TWO LISTS: ---OUTPUTS: FOR INDX-O: * D - FAULT DICTIONARY ARRAY 1. NODE-LIST. CONTAINING NODE NAMES AND TYPES: 2. INCIDENT-LIST. CONTAINING BOND NAMES AND THEIR CONNECTIONS. INPUT. OUTPUT AND FAULT VARIABLES. PROVIDED IN THREE LISTS IN FILE; \UUl.DAT. INDX - SPECIFY RUNNING OPTION. SEE OUTPUT. FOR INDXpl: * D - FAULT DICTIONARY ARRAY * FAULT REPORT default option: if fault list is not specified by the user the software provides the complete list of detected faults and the fault report. FOR INDX-Z: * TEST-NODE DETECTABILITY REPORT o-LIMITATIONS: 100 NODES 100 BONDS 20 INPUTS 20 TEST-NODES 20 FAULTS ---INTERNAL VARIABLES: osgamacgzgzzr number of inputs number of test-nodes number of prospective faults input variables test-node variables fault variables input ports test-node junctions (SJ) fault junctions (SJ) Depth-First-Index. defined for each node “father“ of each node. defined as the node number visited before list of cut points of the graph catastrophic fault dictionary array - - -DECIARATIONS : CHARACTER*10 UV(20).TV(20).FV(20) CHARACTERSB ELNAM(100).BDNAM(lOO),STACK(100).BLOCK(100) CHARACTER*8 U(20),T(20),F(20.2),CUTP(100),NODEB(100).BONDB(100) 125 CHARACTER*8 NOTE(100).PATH(100) CHARACTER*4 NBXTP(100).NBXTPB(100).BDTP(100) CHARACTER*3 OPT(20) INTEGER IELSBD(100.2).IELSBB(100.2),IBDPTR(100),IBDSEL(100) INTEGER D(20.20.20).DFI(100).FA(100),ICUT(100).CO COMMON INELS . INBDS . ELNAM, BDNAM. IBDPTR. IELSBD . IBDSEL.NBXTP , BDTP COMMON/A/STACK.IO.DFI.FA COMMON/BLOCK/INODE.IBOND.NODEB,BONDB,IELSBB COMMON/BLGRPH/IBLCK.IEXTB.NEXT COMMON/C/CUTP.ICUT,IC,CO.Ill COMMON/DD/D COMMON/INDEX/INDX COMMON/FNOTES/NOTE COMMON/V/ UV.TV,FV,L,M,N.U.T.F,OPT c ......................... OPEN(8.FILE-'A.DAT'.STATUS-‘NEW') C---Reads and stores system data WRITE(8,106) 1 CALL FREAD C C---Checks if the graph is connected 2 ICON-0 CALL DFSLBL(ELNAM( 1)) DO 10 I-l.INELS IF (DPI(I).EQ.O) THEN WRITE (8,107) GOTO 99 ENDIF 10 CONTINUE C C---Reads input. output. and fault-list variables C IF (INDX.EQ.2) INDX-3 3 CALL READVR C C---Finds input. output . and fault-list junctions associated with C the input. output. and fault-list variables 4 WRITE (8,100) DO 15 I-1.L CALL INPUTJ(UV(I).U(I)) WRITE (8.101) UV(I) 15 CONTINUE IF (INDX.EQ.2) WRITE (8,110) IF (INDX.NE.2) WRITE (8,102) NEXT-O IEXTB-O DO 20 J-1.M CALL TESTNJ(TV(J),T(J)) WRITE (8.101) TV(J) 20 CONTINUE DO 85 I-1.INELS NOTE(I)-' ' 85 CONTINUE IF (INDX.EQ.11) COTO 5 WRITE (8.103) DO 25 K-1.N CALL FAULTJ(FV(K).F(K.l).F(K42).OPT(K)) WRITE (8.101) FV(K) 25 CONTINUE 126 C---Checks if the graph is a tree 5 IF ((INELS-INBDS).EQ.1) GOTO 8 C C---Deternines the blocks of the graph 6 CALL BLCKFD(1) C C---Finds cut nodes of the graph I-O CO-O ll I-I+1 IF (I.EQ.IC+1) GOTO 12 IF (ICUT(I).EQ.1) THEN CO—CO+1 CUTF(CO)-CUTP(I) ENDIF GOTO 11 C Co-Creates block-graph C C---Initializes 12 INODE-O IBOND-O IBLCKPO DO 30 I-1.INELS NODEB(I)-' ' 3O CONTINUE DO 35 I-1.INBDS DONDB(I)-' ' IELSBB(I.1)-O IELSBB(I.2)-O 35 CONTINUE C C---Collects data for the block graph C C--—Finds all nodes with degree one and put then on block graph C node list. add bonds that are adjacent to these nodes to C block graph. DO 70 I-1,INELS NEXTPB(I)-'HBG ' NN—IBDPTR(I+l)-IBDPTR(I) IF (NN.EQ.1) THEN INODE-INODE+1 NODEB( INODE)-ELNAH( I) NEXTPB(INODE)-NBXTP(I) ENDIF 7O CONTINUE Ill-INODE C C---Adds all out nodes to block-graph node list DO 90 I-INODE+1.INODE+CO NODED(I)-CUT?(I-INODE) CALL NANNO(CUTP(I-INODE).'N'.JO) NINTPB(I)-NBXTP(JO) 9O CONTINUE INODE-INODE+CO C C---Adds block—graph nodes, bond list and incident list CALL BLCKFD(2) C C---Conpletes block-graph data base 127 INELS-INODE INBDS-IBOND DO 45 I-l.INELS ELNAH(I)-NODEB(I) NBXTP(I)-NBXTPB(I) 45 CONTINUE DO 55 I-1.IBOND BDNAH(I)-BONDB(I) IELSBD(I.1)-IELSBB(I.1) IELSBD(I.2)-IELSBB(I.2) 55 CONTINUE IBDPTR(1)-1 LED-0 DO 75 I-1.INELS IBDPTR(I+l)-IBDPTR(I) DO 65 J-1.INEDS IF (IELSBD(J.1).EQ.I.OR.IELSBD(J,2).EQ.I) THEN IBDPTR(I+l)-IBDPTR(I+1)+1 L3D-LBD+1 IEDSEL(LBD)-J ENDIF 65 CONTINUE 75 CONTINUE C WRITE(8.109) 8 IF (INDX.NE.11) GOTO 9 C C---£ind the detected faults (only for default of option 1) WRITE (8.104) WRITE (8.105) DO #0 I-1.L CALL DFSL3L(U(I)) DO 50 J-1.h CALL NANNO(T(J).'N',JO) CALL PATHFND(JO.PATH.KO) CALL FLTLST(PATN.KO) SO CONTINUE 40 CONTINUE DO 95 K-1.N CALL FAULTJ(FV(K),F(K.1).F(K.2).OPT(K)) 95 CONTINUE C C---Finds the fault dictionary for a tree graph 9 IF (INDX.EQ.O) WRITE (8.123) CALL TREDIC C C---Process Faults/Test-Nodes Report IF (INDX.E0.0) GOTO 99 IF (INDX.EQ.1.0R.INDX.EQ.11) CALL FAULT(D,O.ND.NI.INDX) IF (INDX.EQ.2) THEN CALL TNODE CALL RTNODE ENDIF lOO FORNAT(//.' INPUT VARIABLES',/,3X.15('*')) 101 FOR!AT(6X.A10) 102 FORKAT(/.' OUTPUT VARIABLES',/.3X.l6('*‘)) 128 103 FORHAT(/.' FAULT VARIABLES'./.3X.15('*')) 104 FORMAT(/.' LIST OF FAULTS, DETECTED BY') 105 FORMAT(' THE GIVEN INPUTS AND TEST NODES'./.1X.3l('*')) 106 FORNAT(//.'1. D A T A'./.20('-').//) 107 FORNAT(/.' THE GRAPH Is A DISCONNECTED GRAPH') 109 EDEHAT(///.'2. R E s U L T s'./.20('-'),/) 110 FORMAT(/.' INITIAL TEST-NODE VARIABLES'./.3X.27('*')) 112 FORMAT(10X.A8) 121 FORHAT(1X.A8.5X.A8.5X.A8) 122 FORMAT(1X.A10.12X.A8) 123 FORMAT(/.' FAULT DICTIONARY. DEFINED BY PACES',/,3X.34('*')) 12a EonuAT(/.' FAULT INFORMATION',/.18('*')) 99 CLOSE(8) RETURN END c D>>>>>>>>>>>>>>>>>>>>>>>>>>> ADNODE <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< C SUEROUTINE ADNODE(VAR.JCN) C C---DESCRIPTION: THE SUEROUTINE ADDS AN IDENTITY JUNCTION TO C THE MODEL WHEN NECESSARY. C C---INPUT: VAR - EFFORT OR FLO" VARIABLE C C---OUTPUT: JCN - JUNCTION ADDED TO THE GRAPH AND THE CORRESPONDING BONDS C C- - -DECLARATIONS: CHARACTERfllo VAR CHARACTERfl8 ELNAN(100).BDNAN(IOO).EOND.NNAH1.NNAN2.JCN CHARACTERfih NEXT?(IOO) CHARACTER TYP1.TYP2.V INTEGER IELSBD(IOO.2).IBDPTR(lOO).IEDSEL(lOO) COMMON INELS,INBDS.ELNAN.BDNAN.IEDPTR.IELSBD.IEDSEL.NEXTP citeee************************ JCN-' ' VHNAR(1:1) BOND-VAR(3:10) CALL NANNO(BOND.'B'.I) CALL CON(BOND.NNAN1.NNAH2.TYP1.TYPZ) INELS-INELS+1 CALL NAHE('O' ,ELNAIKINELSH JCN-ELNAN(INELS) INBDS-INBDS+1 CALL NANE('D'.BDNAH(INEDS)) IELSBD(I.2)-INELS IELSED(INEDS.1)-INELS CALL NAHNO(NNAN2.'N'.K) IELSBD(INEDS.2)-K IBDPTR(1)-l LED-0 DO 20 II-1.INELS IEDPTR(II+l)-IBDPTR(II) DO 10 J-1,INBDS IF (IELSED(J.1).EQ.II.OR.IELSBD(J.2).EQ.II) THEN IEDPTR(II+l)-IBDPTR(II+1)+1 L3D-LED+1 IBDSEL(LBD)-J ENDIF 129 10 CONTINUE 20 CONTINUE IF (V.EQ.'e') NBXTP(INELS)-' 0 ' IF (V.EQ.'£') N8XTP(INELS)-' l ' 99 RETURN END C C>>>>>>>>>>>>>>>>>>>>>> AJN <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< C SUBROUTINE AJN(JO.J1) C C---DESCRIPTION: AJN PROVIDES A I'FREE" NODE THAT IS ADJACENT C TO NODE #JO. C C---INPUTS: JO - THE SOURCE NODE NUMBER C C---OUTPUTS: J1 - NUMBER OF AN ADJACENT NODE. IF Jl-O -> THERE C IS NO ADJACENT NODE AVAILABLE C C - - - DECLARATIONS : CHARACTERfla ELNAM(100). BDNAH(IOO) INTEGER IELSBD(IOO.2).IBDPTR(IOO).IBDSEL(IOO) COHHON INELS.INBDS.ELNAM.BDNAM.IBDPTR.IELSBD.IBDSEL cteeeeeeeeeeeeeeeeeeeweeeeeee JI-O N-IBDPTR(JO+1)-IBDPTR(JO) DO 10 I-IBDPTR(JO).IBDPTR(JO)+N-l J-IEDSEL(I) CALL BNDLST(BDNAM(J).INDEX) IF (INDEX.EQ.O) GOTO 10 IF (IELSBD(J.1).EQ.JO) J1-IELSBD(J.2) IF (IELSBD(J.1).NE.JO) J1-IELSBD(J.1) IF (J1.NE.O) GOTO 88 IO CONTINUE 88 RETURN END C C>>>>>>>>>>>>>>>>>>>>>> BLCKFD <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< C SUEROUTINE BLCKFD(INDEX) C C-—-DESCRIPTION: THIS SUEROUTINE FINDS THE BLOCKS OF A GIVEN GRAPH. THE BLOCKS ARE DEFINED BY NODE LIST. EACH BLOCK IS SENT OUTSIDE THE SUEROUTINE AS SOON AS IT IS FOUND. THE METHOD IS BASED ON DEPTH-FIRST-SEARCH ALGORITHM. THE SUEROUTINE IS USED TO FIND CUT-NODES (OPTION 1) AND TO DEFINE THE BLOCK-GRAPH (OPTION 2). ---INFUTS: graph description. indirectly INDEX - DEFINES THE OPTION: INDEX-l -> FINDS CUT-NODES INDEE-Z -> FINDS BLOCK-GRAPH ---OUTFUT: DEFINITION OF EVERY BLOCK BY A LIST OF NODES DFI (DEPTH FIRST SEARCH) - a list of labels for every node in the graph FA - A LIST OF 'FATHER' NODE NUMBER FOR EACH NODE OOOOOOOOOOOOOOOOO 130 C---DECLARATIONS: integer IBDFTR(100).IELSBD(100.2),IBDSEL(100) INTEGER DFI(100).DF.FA(100).P(100).ICUT(100).CO character*8 BDNAN(100).ELNAM(100).STACK(100).BLDCK(100) CHARACTER*8 8DNAHL(100).CUTF(100) cannon INELS.INBDS.ELNAH.BDNAH,IBDPTR.IELSBD.IBDSEL.NEXTP COHHON/A/ STACK.IO.DFI.FA COHHON/B/BDNAHL COHHON/C/ CUTF.ICUT.IC.CO.Ill COHMON/P/IND cee*****e***********eeeeeee IND-INDEX C---Put all edges on the unused list 1 DO 86 I-1.INEDS 8A 8DNAHL(I)-DDNAM(I) G C---Enpty the stack and initialize DO 83 I-1.INELS STACK(I)-' ' IF (INDEX.EQ.1) CUTP(I)-' ' DFI(I)-O ICUT(I)-O 83 CONTINUE 2 ID-ID+1 DFI(JO)-ID P(JO)-ID CALL SSTACK(ELNAM(J0)) 3 CALL AJN(JO.J1) IF (J1.EQ.O) GOTO 5 4 IF (DFI(J1).NE.O) THEN P(JO)-HIN(F(JO).DFI(J1)) GOTO 3 ENDIF IF (DFI(J1).EQ.O) THEN 'EA(Jl)-JO JO-Jl GOTO 2 ENDIF 5 IF (DFI(FA(JO)).EO.1) GOTO 9 6 IF (P(JO).LT.DFI(FA(JO))) THEN P(FA(JO))-HIN(P(FA(JO)).P(JO)) GOTO 8 ENDIF 7 CALL POPSTK(ELNAM(JO).ELNAH(FA(JO)).KO.BLOCK) a JO-FA(JO) ' GOTO 3 9 CALL POPSTK(ELNAH(JO).ELNAH(FA(JO)),KO.8LOCK) 10 CALL AJN(1.J1) IF (Jl.EQ.O) GOTO 99 IF (J1.NE.O) THEN 99 C D>>>>>>>>>>>>>>>>>>>> BLCKGR <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< C C C C C C C C C C C C C C C C- C C C C C «onmrr: --OUTPUT: 131 JO-l GOTO a ENDIF RETURN END SUBROUTINE BLCKGR(KO.BLOCK) ---DESCRIPTION: THE SUBROUTINE DOES THE FOLLOWING: l. PROVIDES THE BLOCK- GRAPH NODE LIST 2. PROVIDES THE BLOCK- GRAPH BOND LIST 3. PROVIDES THE BLOCK GRAPH INCIDENT LIST 4. UP-TO-DATES THE OUTPUT JUNCTIONS THAT WILL FIT THE BLOCK GRAPH . GRAPH DESCRIPTION (COMON) . INPUT. OUTPUT AND FAULTY JUNCTION LISTS (COMMON/V/) . KO - NUMBER OF NODES IN THE CURRENT BLOCK . BLOCK - LIST OF NODES IN THE CURRENT BLOCK 1 2 3. CUT POINTS LIST (COMMON/C/) a 5 1. BLOCK-GRAPH NODE LIST 2. BLOCK-GRAPH BOND LIST 3. BLOCK-GRAPH INCIDENT LIST 4. UP-TO-DATE OUTPUT JUNCTIONS FOR THE BLOCK-GRAPH -ALL OUTPUTS ARE STORED IN COMMON BLOCKS ---DECLARATIONS: INTEGER IBDPTR(IOO). IELSBD(IOO. 2). IELSBB(IOO. 2). IBDSEL(100) INTEGER ICUT(IOO). CO CHARACTER*10 UV(20). TV(20),FV(20) CHARACTERfl8 ELNAM(IOO).NODEB(IOO).BDNAM(IOO).BONDB(100) CHARACTER*8 BOND.BLOCK(100).CUTP(IOO) CHARACTER*8 U(20).T(20).F(ZO.2) CHARACTER*3 OPT(20) COMMON INELS.INBDS.ELNAM.BDNAM.IBDPTR.IELSBD.IBDSEL COMMON/BLOCK/INODE.IBOND.NODEB.BONDB.IELSBB COMMON/C/CUTP.ICUT.IC.CO.I11 COMMON/V/UV.TV.FV.L.M.N.U,T.F.OPT CW 10 IF (KO.EQ.2) THEN IBOND-IBOND+1 CALL NAMNO(BLOCK(I).'N',JO) CALL NAMNO(BLOCK(2).'N'.JI) CALL BNDFND(JO.J1.BOND) BONDB(IBOND)-BOND DO 10 I-1.INODE IF (NODEB(I).EQ.BLOCK(1)) JO-I IF (NODEB(I).EO.BLOCK(2)) Jl-I CONTINUE IELSBB(IBOND.1)-JO IELSBB(IBOND.2)-Jl ELSE INODE-INODE+1 CALL NAME('N'.NODEB(INODE)) DO 20 IB-1.KO JJ-O DO 30 I-1.CO IF (BLOCK(IB).EQ.CUTP(I)) JJ-I 132 30 CONTINUE IF (JJ.NE.0) THEN IBOND-IBOND+1 CALL NAME('B'.BONDB(IBOND)) IELSBB(IBOND.1)-INODE IELSBB(IBOND.2)-JJ+111 ENDIF 20 CONTINUE C C---Up to dates output junctions J S JJ-O J-J+1 IF (J.GT.M) GOTO 6 IF (T(J)(1:4).EQ.'BLCK') GOTO 5 DO 40 I-1.CO IF (T(J).EQ.CUTP(I)) JJ-l hO CONTINUE IF (JJ.EQ.1) GOTO 5 DO 50 IB—1.KO IF (T(J).EQ.BLOCK(IB)) THEN T(J)-NODEB(INODE) GOTO 5 ENDIF SO CONTINUE 6 ENDIF 99 RETURN END C O>>>>>>>>>>>>>>>>>>>>>>>>>>>> BNDFND <<<<<<<<<<<<<<<<<<<<<<<<<<<<< C SUERDUTINE BNDFND(JO.J1.DOND) c . C---DESCRIPTION: THIS SUBROUTINE FINDS THE BOND WHICH CONNNECTS C TWO GIVEN NODES. C C---INPUT: JO - FIRST NODE NUMBER C J1 - SECOND NODE NUMBER C C---OUTPUT: BOND - BOND NAME WHICH CONNECTS NODE #JO TO NODE #Jl. C IF BOND REMAINS BLANK. JO OR J1 OR BOTH DONT C EXIST IN THE GRAPH C C--~DECLARATIONS: CHARACTERra ELNAM(100).8DNAM(IOO).BOND INTEGER IELSBD(100.2).IBDPTR(100).IBDSEL(100) COMMON INELS.INBDS.ELNAH,8DNAH.IBDPTR.IELSED.IBDSEL CW BOND-' ' Rpo DO 10 I-I.INEDs IF (IELSDD(I.1).EQ.JO.AND.IELSBD(I.2).EQ.J1) K—I IF (IELSDD(I.1).EQ.J1.AND.IELSBD(I.2).EQ.JO) K-I 10 CONTINUE IF (K.NE.O) 80ND-8DNAM(K) RETURN END c C<>>>>>>>>>>>>>>>>>>>>>>>>> BNDLST <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< c 133 SUBROUTINE BNDLST(BOND.INDEX) C C---DESCRIPTION: BNDLST CHECKS IF “BOND" IS AN UNUSED EDGE. C C«--INPUTS: BOND - BOND NAME C BDNAML - UP TO DATE LIST OF UNUSED EDGES (STORED C AND UP-TO-DATE INSIDE THE SUBROUTINE) C---OUTPUTS: INDEX - IF I'BOND" IS AN UNUSED EDGE THEN INDEX-1. C OTHERWISE INDEXFO C c---DECLARATIONS: CHARACTER*8 ELNAH(IOO), BDNAN(100), BDNAHL(100).BOND INTEGER IELSDD(100.2).IBDPTR(100).IBDSEL(IOO) COHHON INELS.INBDS.ELNAM.8DNAH.IBDPTR.IELSBD.IBDSEL CONNON/B/BDNAHL ceeeAe************************ INDEX-O DO 10 I-1.IN8DS IF (8DNANL(I).EO.BOND) THEN INDEX-1 EDNAHL(I)-' ' ENDIF 10 CONTINUE RETURN :1.“ C c>>>>>>>>>>>>>>>>>>>>>>>>>>> CHANGE <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< C SURROUTINE CHANGE(D.JO.J1) C C---DESCRIPTION: THE SUBROUTINE CHANGES ROWS IN CFD. TEST-NODE #JO C IS REPLACED BY TEST-NODE #Jl AND VISA VERSA. C C-o-DECLARATIONS: CHARACTER*1O UV(20).TV(20).FV(20).TTV CHARACTER*8 U(20).T(20).F(20.2) CHARACTER*3 OPT(20) INTEGER D(20.20.20),DD(20.20) COMMON/V/UV.TV,FV.L.M.N.U.T.F.OPT cterte*ew******e****w***u***** DO 10 I-1.L DO 10 K-1.N DD(I,K)-D(I.J1.K) IO CONTINUE TTV-TV(J1) DO 20 I-1.L DO 20 KPI.N D(I.J1.K)-D(I.JO.K) D(I.JO.K)-DD(I.K) 20 CONTINUE TV(J1)-TV(JO) TV(JO)-TTV RETURN END C C>>>>>>>>>>>>>>>>>>>>>>> CON <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< C SUBROUTINE CON(BDNAME.NNAM1.NNAM2.TYP1.TYPZ) C C---DESCRIPTION: THE SUBROUTINE FINDS THE ADJACENT NODES AND C C 134 THEIR TYPE. FOR A GIVEN BOND NAME. C---INPUT: BDNAME - BOND NAME C C---OUTPUTS: NNAMI - NODE NAME. ADJACENT TO THE BOND C C C C NNAM2 NODE NAME. ADJACENT TO THE BOND TYPI TYPE OF NNAMl TYP2 - TYPE OF NNAMZ C---DECLARATIONS: CHARACTER*8 BDNAME. NNAMI. NNAM2. ELNAM(100).BDNAM(IOO) CHARACTER*6 NB!TP(100). CLASSl. CLASSZ CHARACTER TYP1,TYP2 INTEGER IELSBD(100.2). IBDPTR(IOO). IBDSEL(100) COMMON INELS.INBDS.ELNAM.BDNAM.IBDPTR.IELSBD.IBDSEL.NBKTP CW 100 99 C CALL NAMNO(BDNAME.'B'.I) IF (I.EQ.O) THEN WRITE(*.lOO) BDNAME GOTO 99 ENDIF N1-IELSBD(I.1) N2-IELSBD(I.2) NNAMl-ELNAM(N1) NNAM2-ELNAM(N2) CLASSI-NBXTP(N1) CLASSZ-NBXTP(N2) TYPl-GLASSI(2:2) TYP2-CLASSZ(2:2) FORMAT(/.' THE BOND NAME: ',A8.' DOES NOT EXIST ON THE GRAPH') RETURN END D>>>>>>>>>>>>>>>>>>>>>>> CUTPNT <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< C SUBROUTINE CUTPNT(KO.BLOCK) C C---DESCRIPTION: THE SUBROUTINE DEFINES THE LIST OF CUT NODES OF THE 000000000000 GRAPH. THIS IS DONE BY COLLECTING BLOCK DATA. ANY NODE THAT APPEAR IN MORE THAN ONE BLOCK IS A CUT NODE. THE LIST OF CUT NODES AND THEIR NUMBER IS PROVIDED. THE BLOCKS ARE PROVIDED ONE BY ONE TO THE SUBROUTINE WHICH COLLECTS THEIR DATA. ---INPUTS: BLOCK - THE NODE LIST OF THE CURRENT BLOCK KO - NUMBER OF NODES IN THE CURRENT BLOCK ---OUTPUTS: CUTP - A LIST OF THE CUT-NODES OF THE GRAPH (IN COMMON/C/) CO - NUMBER OF CUT-NODES C- - -DECLARATIONS: CHARACTER*8 BLOCK(100).CUTP(IOO) INTEGER ICUT(IOO).CO COMMON INELS COMMON/Cl CUTP.ICUT.IC,CO,I11 CW C IF (IC.EQ.O) THEN DO 10 I-1.KO CUTP(I)-BLOCK(I) 135 10 CONTINUE IC-KO ELSE DO 20 I-1.KO DO 30 J-1.IC IF (BLOCK(I).EQ.CUTP(J)) THEN ICUT(J)-1 . GOTO 20 ENDIF 3O CONTINUE Ic-IC+1 CUTP(IC)-BLOCR(I) 20 CONTINUE ENDIF 99 RETURN END C C>>>>>>>>>>>>>>>>>>>>>> DEGA <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< C SUBROUTINE DEGA(JO.DFI.DF.J1) C C--°DESCRIPTION: DEGA PROVIDES THE NEXT NODE (IN NODE NUMBER) FOR C THE DEPTH-FIRST-SEARGH. AND NOTIFY ABOUT ADDITIONAL C NODES. IF THE PATH IS LOCKED. SPECIAL MESSAGE IS C PROVIDED. C C---INPUTS: JO - THE SOURCE NODE NUMBER C DFI - THE CURRENT DEPTH-FIRST-INDEX FOR ALL NODES C C---OUTPUTS: J1 - NEXT NODE ON PATH (IF THERE IS NO NODE LEFT C J1-0. C DF - A MESSAGE ABOUT JO. IF ALL PATHS OF JO ARE DONE - C DF-O; OTHERNISE JO-l ' C C---DECLARATIONS: CHARACTER*8 ELNAM(100). BDNAM(IOO) INTEGER IELSBD(100.2).IBDPTR(IOO). IBDSEL(100).DFI(lOO).DF COMMON INELS.INBDS.ELNAM.BDNAM.IBDPTR.IELSBD.IBDSEL c*et*w************************ ‘ IN-O Jl-O DF-O N-IBDPTR(JO+1)-IBDPTR(JO) DO 10 I-IBDPTR(JO).IBDPTR(JO)+N-1 J-IBDSEL(I) IF (IELSBD(J.1).EQ.JO) K-IELSBD(J.2) IF (IELSBD(J.1).NE.JO) KPIELSBD(J.1) IF (IN.EQ.1) GOTO 2 IF (DFI(K).EQ.O) THEN Jl-K IN-l GOTO 10 ENDIF 2 IF (DFI(K).EQ.O) THEN DF-l GOTO 99 ENDIF 10 CONTINUE 99 RETURN END 136 C C>>>>>>>>>>>>>>>>>>>>>> DFSLBL <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< C SUBROUTINE DFSLBL(S) C C---DESCRIPTION: THIS SUBROUTINE LABELS THE GRAPH FROM NODE C 8 AS ITS SOURCE. DFI(S)-1. LABELING IS DONE C BY DFS METHOD. FOR EVERY NODE. THE 'FATHER' C IS DEFINED. C C---INPUTS: graph description. indirectly G S - the source elenent of the graph (node nale) C C---OUTPUT: DFI (DEPTH FIRST SEARCH) - a list of labels for every C node in the graph (IN COMMON/A/) C FA - A LIST OF 'FATHER' NODE NUMBER FOR EACH NODE C (IN COMMON/Al) C C---DECLARATIONS: integer IBDPTR(100).IELSBD(lOO.2).IBDSEL(100) INTEGER DFI(IOO).DF.FA(IOO) character*8 BDNAM(100).ELNAM(100).STACK(100),S CHARACTER WL(100)*8. V. VI colnon INELS.INBDS.ELNAH.BDNAM.IBDPTR.IELSBD.IBDSEL.NBXTP COMMON/A/ STACK.IO.DFI.FA ceweee*eeeeeeeeeeeeeteeeeeewee IWL—O ID-l JO-O DO 10 I-l.INELS DFI(I)-O EA(I)-O IF (ELNAM(I).EQ.S) JO-I 10 CONTINUE IF (JO.EQ.O) THEN WRITE (*.100) S GOTO 99 ENDIF DFI(JO)-l 1 CALL DEGA(JO.DFI.DF.J1) IF (DF.EQ.1) THEN IWL-IWL+1 WL(IWL)-JO ENDIF IF (J1.NE.0) THEN ID-ID+1 FA(J1)-JO DFI(J1)-ID JO-Jl GOTO 1 ENDIF IF (J1.EQ.O) THEN IF (IWL.EQ.O) GOTO 99 JO-WL(IWL) IWLPIWL-l GOTO 1 ENDIF 100 FORMAT(' NODE '.A8.'DOES NOT EXIST ON THE GRAPH'./) 99 RETURN 137 END C C>>>>>>>>>>>>>>>>>>>>>>>>> FAULT <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< C SUBROUTINE FAULT(D.M.ND.NI.INDEX) C C---DESCRIPTION: THE SUBROUTINE PROVIDES INFORMATION ABOUT THE C FAULTS IN THE FAULT LIST. C C---INPUTS: D - CFD ARRAY C C---OUTPUTS: ND - NUMBER OF DETECTED FAULTS C NI - NUMBER OF UNIQUELY DETECTED FAULTS C M - NUMBER OF TEST-NODES TAKEN INTO ACCOUNT (IF M-O C ALL TEST-NODES IN THE LIST ARE COUNTED) C INDEX - DEFINES IF THE INFORMATION SHOULD BE PRINTED C INDEX-1 -> PRINTED INFORMATION. ELSE NO C - DATA ABOUT DETECTIBILITY OF EACH FAULT IN THE C FAULT LIST. C - AMBIGUITY SETS' CONTENTS. C C---DECLARATIONS: CHARACTER*IO UV(20),TV(20).FV(20) CHARACTER*8 U(20).T(20).F(20.2) CHARACTER*3 OPT(20) INTEGER D(ZO.20.20)-DD(20.20).AM(100) COMMON/V/UV.TV.FV.L.MO.N.U.T,F,OPT c*itee************************ IF (M.EQ.O) M-MO IF (INDEX.EQ.1) THEN WRITE(8.IOO) WRITE(8.101) WRITE(8.102) WRITE(8.101) ENDIF IF (INDEX.EQ.11) THEN WRITE(8.101) WRITE(8.112) WRITE(8.115) WRITE(8.101) ENDIF ISET-l DO 90 KPL.N AM(K)-O 9O CONTINUE 1 DO 10 KD-1,N IF (AM(KO).NE.O) GOTO 10 IN-O DO 20 I-l.L DO 20 J-l.M IF (D(I.J.KO).EQ.O) GOTO 2 20 CONTINUE AM(KO)-111 GOTO 10 2 DO 30 K-KO+1.N IF (AM(K).NE.O) GOTO 30 DO 40 I-1.L DO 40 J-1.M DD(I.J)-D(I.J.K)-D(I.J.KO) IF (ABS(DD(I.J)).EO.1) GOTO 30 138 no CONTINUE IN-l AM(KO)-ISET AM(K)-ISET 3O CONTINUE IE (IN.EQ.1) ISET-ISET+1 lO CONTINUE DO so x-I.N IF (AM(K).EQ.O) AM(K)-999 IE (AN(R).EQ.III.AND.INDEx.NE.o) WRITE(8.103) K.FV(K) IF (AH(K).EQ.999) THEN IF (INDEX.EQ.1) WRITE(8.104) K.FV(K) IF (INDEx.EQ.II) WRITE(8.113) K.FV(K).F(K.1) ENDIF IF (AN(K).LT.100) THEN IE (INDEx.NE.0) WRITE(8.111) IE (INDEx.Eo.I) WRITE(8.105) K.FV(K).AM(K) IE (INDEx.Eo.II) THEN IE (F(K,l)(l:4).EQ.'EXTN') F(K.1)-’* ' WRITE(8.114) K.FV(K).F(K.1).AH(K) ENDIF ENDIE so CONTINUE IE (INDEx.NE.0) WRITE(8.101) ND-o NI-o DO so K-1.N IF(AH(K).EQ.999) NI-NI+1 IF(AM(K).EQ.111) ND-ND+1 so CONTINUE ND-N-ND IE (INDEx.Eo.1) THEN WRITE(8.106) ND*IOO./N WRITE(8.107) NI*100./N ENDIF IE (INDEX.EQ.11) THEN WRITE(8.116) WRITE(8.117) WRITE(8.118) WRITE(8.119) ENDIF IF (INDEX.NE.O) WRITE(8.108) DO 70 KO-l.N IF (AM(KO).LT.IOO) THEN IF (INDEX.NE.O) THEN WRITE(8.109) AM(KO) WRITE(8.110) KO ENDIF 'DO 80 KPKO+1.N IF(AM(K).EQ.AM(KO)) THEN IF (INDEX.NE.O) WRITE(8.110) K AM(K)-222 ENDIF 8O CONTINUE ENDIF 7O CONTINUE lOO FORMAT(/.' FAULT REPORT'./.' ************'/) 101 FORMAT(1X.66('_')) 139 102 FORMAT(/.3X.' FAULT'.9X.'DEFINED BY'.8X.'DIAGNOSIS'./) 103 FORMAT(/.7X.'F'.IZ.9X.A6.'-O'.8X.'UNDETECTABLE') 104 FORMAT(/.7X.'F'.IZ.9X.A6.'-O'.8X.'DETECTABLE. UNIQUELY') 105 FORMAT(7X.'F'.IZ.9X.A6.'-O'.8X.'DETECTABLE. AMBIGUITY SET #'.IZ) 106 FORMAT(l.’ TOTAL DETECTION PERCENTAGE: '.F5.1.'2') 107 FORMAT(/.' UNIQUE DETECTION PERCENTAGE: '.F5.1.'Z') 108 FORMAT(//.' AMBIGUITY SETS'./.3X.14('*')) 109 FORMAT(/.' AMBIGUITY SET #‘.IZ.' CONTAINS:') 110 FORMAT(3OX.'FAULT #'.I2) 111 FORMAT(' ') 112 FORMAT(/.' FAULT DEFINED ASSOCIATED DIAGNOSIS') 115 FORMAT(ZX.’ BY WITH S.J.'/) 113 FORMAT(/.3X.'F'.IZ.5X.A6.'-0'.9X.A8.7X.'DETECTED. UNIQUELY') 114 FORMAT(3X.'F'.I2.5X.A6.'-O'.9X.A8,7X.'DETECTABLE. A.S. #'.IZ) 116 FORMAT(IX.'* THE S.J. ASSOCIATED WITH THIS FAULT DOES NOT') 117 FORMAT(3X.'APPEAR IN THE ORIGINAL GRAPH') 118 FORMAT(/.' ABBREVATIONS:'./.' S.J. - SIMPLE JUNCTION') 119 FORMAT(ZX.'A.S. - AMBIGUITY SET') 99 RETURN END C C)>>>>>>>>>>>>>>>>>>>>>>>>>>>> FAULTJ <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< C SUBROUTINE FAULTJ(VAR.JCN1.JCN2.0PT) C C---DESCRIPTION: THIS SUBROUTINE DEFINES THE FAULT JUNCTION C FOR A GIVEN VARIABLE. C C-o-INPUT: VAR - VARIABLE NAME. ONLY FLOW OR EFFORT ALLOWED. WRITTEN C AS: e.BOND-NAME OR f.BOND-NAME C C---OUTPUT: JCNI - THE FIRST (OR ONLY) FAULT~LIST JUNCTION NAME C JCN2 - THE SECOND FAULT-LIST JUNCTION NAME C OPT - INDICATES THE EXISTANCE OF TWO ADJACENT C ZERO-JUNCTIONS OR TWO ADJACENT l-JUNCTIONS C C---DECLARATIONS: CHARACTER VARN10.JCN1*8.JCN2*8 CHARACTER*8 ELNAM(IOO).BDNAM(IOO).BOND.NNAM1.NNAM2.NOTE(100) CHARACTER*a NBXTP(100) CHARACTERE3 OPT CHARACTER TYP1.TYP2.V INTEGER IELSBD(100.2).IBDPTR(100).IBDSEL(100) COMMON INELS.INBDS.ELNAM.BDNAM.IBDPTR.IELSBD.IBDSEL.NBXTP COMMON/FNOTES/NOTE ceeeee*eeeeeeeeeeeeeeeeeeeeeee C---initializes OPT-' ' JCN1-' JCN2-' VHNAR(1:1) BOND-VAR(3:10) C C---Checks whether the bond appear on the graph CALL NAMNO(BOND.'B'.I) IF (I.EQ.0) THEN WRITE (8.100) BOND GOTO 99 ENDIF 140 IF (V.EQ.'e'.OR.V.EQ.’f') COTO l WRITE (8.101) VAR GOTO 99 1 CALL CON(BOND.NNAM1.NNAM2.TYP1.TYP2) IF (V.EQ.'e') THEN IF (TYF1.EQ.'O') THEN JCNI-NNAMI CALL NAMNO(NNAM1.'N'.II) IF (NOTE(II).EQ.' ') GOTO 8 JCNZ-NOTE(II) OFT-' OR ' 8 IF (TYP2.EQ.'O') THEN OFT-'OR ' JCNZ-NNAMZ ENDIF GOTO 99 ENDIF IF (TYP2.EQ.'O') THEN JCNl-NNAMZ GOTO 99 ENDIF CALL ADNODE(VAR.JCN1) CALL NAMNO(NNAM1.'N'.IO) NOTE(IO)-NNAM2 GOTO 99 5 ELSEIF (V.EQ.'£') THEN IF (T!P1.EQ.'1') THEN JCNl-NNAMI CALL NAMNO(NNAM1.'N',II) IF (NOTE(II).EQ.' ') GOTO 9 JCN2-NOTE(II) OPT-'OR ' 9 IF (TYP2.EQ.'1') THEN OPT-'OR ' JCNZ-NNAMZ ENDIF GOTO 99 ENDIF IF (TYP2.EQ.'1') THEN JCNI-NNAMZ GOTO 99 ENDIF CALL ADNODE(VAR.JCN1) CALL NAMNO(NNAM1.'N'.IO) NOTE(IO)-NNAM2 GOTO 99 ELSE WRITE (8,101) VAR ENDIF 100 FORMAT(/.' BOND NAMED: '.A8.' DOES NOT EXIST ON THE GRAFH') 101 FORMAT(/.ZXFA10.' IS NOT AN EXCEFTAELE FAULT VARIABLE') 99 RETURN END C C>>>>>>>>>>>>>>>>>>>>>> FLTExT <<<<<<<<<<<<<<<<<<<<<<<<<< C SUEROUTINE FLTEXT(FATH.K0.F1.F2.0PT.IN) C C-o-DESCRIPTION: FLTEXT (FauLT-EXIaT) finde out if the fault F C (defined by an eleeent(e) naee) exists on the 141 C path defined by PATH. C C---INPUTS: PATH - a list of elements C INELS - number of elements in the graph (common) C F1 - the first element name which defines a fault C F2 - the second element which defines a fault. if C the fault is defined by one element - F2 will C be empty C K0 - NUMBER OF NODES IN THE PATH C OPT - a special indication of existance of two C edjacent junctions or junctions as faulty junctions. C C-o-OUTPUT: in - index which defines the existence of F on PAth C if IN-O then the fault (F1. F2) is on PATH C if IN-l then the fault (F1. F2) is not on PATH C C---DECLARATIONS: character*8 PATH(IOO).F1.F2 CHARACTER*3 OPT CW C IN—I INT-1 INZ-l IF (OPT.EQ.' ') THEN DO 10 I-I.KO IF (F1.EQ.PATH(I)) IN-O 10 CONTINUE ELSE DO 20 I-1.KO IF (F1.EQ.PATH(I)) INT-0 IF (F2.EQ.PATH(I)) INZ-O 20 CONTINUE IF (OPT.EQ.'AND') THEN IF (INI.EQ.O.AND.IN2.EQ.O) INho ENDIF IF (OPT.EQ.'OR ') THEN IF (INI.EQ.0.0R.IN2.EQ.O) IN—O ENDIF ENDIF RETURN ENE C C>>>>>>>>>>>>>>>>>>>>>>>>> FLTLST <<<<<<<<<<<<<<<<<<<<<<<<< C SURROUTINE FLTLST(PATH.KO) C C---DESCRIPTION: THE SUEROUTINE COLLECTS THE DETECTABLE FAULTS C THAT ARE ASSICIATED WITH A GIVEN PATH (DEFINED C BY NODE LIST) AND STACK THEM. C C---INPUTS: SYSTEM DESCRIPTION (IN COMMON) C PATH - A PATH DEFINED BY NODE LIST C KO - PATH LENGTH (NUMBER OF NODES) C Co--OUTPUTS: FAULT/S ASSOCIATED WITH A GIVEN PATH C (COLLECTED BY SUEROUTINE FSTACK) C C---DECLARATIONS: INTEGER IBDPTR(100).IELSED(100.2).IBDSEL(100) 142 CHARACTER*IO VAR1.VAR2 CHARACTER*8 BDNAM(100).ELNAN(100).PATH(100).A.B,BOND CHARACTER*A NBXTP(100) INTEGER IN(100) COMMON INELS.INBDS.ELNAM.BDNAM.IEDPTR.IELSBD.IBDSEL.NBXTP cte*teet************************ INDEX-O DO 10 K-I.KO-1 IN(K)-O APPATH(K) B-PATH(K+1) CALL NAMNO(A.'N',IO) CALL NAMNO(D.'N'.J0) CALL BNDFND(IO.J0.BOND) IF (K.EQ.K0-1) THEN VAR1(3:10)-BOND IF (NEXTP(JO)(2:2).EQ.'E') VAR1(1:2)-'f.' IF (NEXTP(JO)(2:2).EQ.'F’) VAR1(1:2)-'e CALL FSTACK(VAR1) GOTO 10 ENDIF IF (K.EQ.1.AND.BOND(1:3).EQ.'EXT') THEN CALL NAMNO(A.'N'.J0) NN-IBDPTR(JO+1)-IBDPTR(JO) DO 20 I-IBDPTRIJO).IBDPTR(JO)+NN-1 BOND-BDNAM(IBDSEL(I)) IF(BOND(I:3).EQ.'EXT') GOTO 20 VAR1(3:10)-BOND IF (NRXTP(IO)(2: 2). BO. '0' ) VAR1(1: 2)-'e.' IF (NEETP(IO)(2: 2). E0. '1' ) VARI(1: 2)-'f. ' CALL FSTACK(VAR1) GOTO 10 20 CONTINUE ENDIF IF (BOND(1:3).EQ.'EXT') THEN IN(K)~1 IF (K.CT.1.AND.IN(K-1).EQ.1) THEN IF (NBHTP(IO)(2:2).EQ.'O') WRITE(8.100) A IF (NBXTP(IO)(2:2).EQ.'1') WRITE(8.100) A ENDIF GOTO 10 ENDIF IF (NEXTP(IO)(2: 2). EQ. 'T'. OR. NBETP(IO)(2: 2). BO. '6' ) THEN INDEX-1 GOTO 10 ENDIF VARI(1:2)-'e.' VARI(3:10)-BOND VAR2(1:2)-'f.' VAR2(3:10)-BOND IF (INDEX.EQ.1) THEN IF (NEXTP(IO)(2: 2). EQ. '0' ) CALL FSTACK(VAR2) IF (NEXTP(IO)(2: 2). E0. '1' ) CALL FSTACK(VAR1) INDEX-0 GOTO 10 ENDIF CALL FSTACK(VAR1) CALL FSTACK(VAR2) 143 10 CONTINUE 100 FORMAT (' VARIABLE ASSOCIATED WITH JUNCTION: '.A6) RETURN END C>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> END FLTLST <<<<<<<<<<<<<<<<<<<<<<<<<< C CFILE:FREAD ------------- FREAD ------------------------------------ C C--- PURPOSE: Reads the header segment and graph data segment from C ENPORT file, and adds node and connector data to the C work space SUIROUTINE FREAD CHARACTERflh STRING*80.H*5.NE*1,NBXTP(100).CLASS.BDTP(100).BTP CHARACTER*8 NDNAM.ELNAN(100).BDNAM(100).ENAM.FRN.TON.NNN(100.2) INTEGER IELSBD(100.2). IBDPTR(100). IBDSEL(100) COMMON INELS.INEDS.ELNAM.BDNAM.IEDPTR.IELSBD.IBDSEL.NEXTP.BDTP OPEN (14.FILE-'SYS.DAT'.STATUS-‘OLD') 5 READ(14.100) STRING H-STRING(1:5) IF (H.NE.' HEAD') GOTO S 6 READ (16.100) STRING H-STRING(1:5) IF (H.NE.' FI') GOTO 6 READ(1¢.100) STRING C C-o-Writes file nane on the screen WRITE(8.101) STRING 7 READ(1a.100) STRING H-STRING(1:5) IF (H.NE.' NO') GOTO 7 C--- Initializes INELS-0 INBDS-0 NELPO NED-0 C--—Adds node data to the workspace. as read from file 8 READ(14.100) STRING READ (STRING.102) NDNAH.CLASS IF (NDNAH.EQ.' ') GOTO 9 INELS-INELS+1 IF (CLASS(1:1).EQ.'H') NEL-NEL+1 IF (INELS.LT.100) THEN ELNAM(INELS)-NDNAH NBETP(INEL8)-CLASS GOTO 8 ENDIF 9 READ (14.100) STRING H-STRING(1:5) IF (H.NE.’ CO') GOTO 9 C Coo-Adds connector data to workspace. as read from file 11 READ(16.100) STRING C C---Get connector name. type. from-node. to-node READ (STRING.103) BNAM.BTP.FRN.TON C C---See if this is a continuation line for current connector 144. IF (BNAH.EQ.' ') GOTO 10 INBDS-INBDS+1 IF (BTP(1:1).EQ.'B') NBD—NBD+1 IF (INBDS.LT.100) THEN BDNAH(INBDS)-BNAM BDTP(INBDS)-BTP NNN(INBDS.1)-FRN NNN(INBDS.2)-TON GOTO 11 ENDIF 10 DO 30 I-1.INBDS CALL NAMNO(NNN(I.1).'N'.NO) IELSBD(I.1)-NO CALL NAMNO(NNN(I.2).'N'.NO) IELSBD(I.2)-NO 30 CONTINUE C--- Complete the GREDBK data base IBDPTR(1)-1 LED-O DO 90 I-1.INELS IBDPTR(I+1)-IBDPTR(I) DO 80 J-1.INEDS IF (IELSBD(J.1).EQ.I.OR.IELSBD(J.2).EQ.I) THEN IBDPTR(I+1)-IBDPTR(I+I)+1 LBD-LBD+1 IBDSEL(LBD)-J ENDIF 80 CONTINUE 90 CONTINUE 99 CLOSE(14) 100 FORMAT(ASO) 101 FORMAT(' FILE NAME:'.AAO) 102 FORMAT(SX.A8.1X.AA)) 103 FORHAT(5X.A8.1X.Ak.2x.A8.1X.A8.2X) RETURN END c c>>>>>>>>>>>>>>>>>>>>>>>>>>>>> FSTACK <<<<<<<<<<<<<<<<<<<<<<<<<<<< C SUEROUTINE FSTACK(FVAR) c c---Dsscaxr:xon: :un SUEROUTINE ADDS FAULT VARIABLES :o.:nz FAULT LIST. c FAULT ARE ADDED :0 :n3 :0: or :32 LIST ONLY IF :33: c 00 no: 2x15: :uznz ALREADY. NUMBER or FAULTS IN :33 c FAULT LIST IS UP-TO-DATED. C . C---INPUTS: FVAR - FAULT VARIABLE TO BE ADDED :o :32 FAULT LIST c FV - OLD FAULT LIST (STORED IN COMMON/V/) c c---ou:ru:s: FV - UP-TO-DATE FAULT L13: (STORED IN cameos/vy) c N - nausea or FAULTS IN :uz FAULT LIST (STORED IN couuou/vx) c C---DECLARATIONS: CHARACTER*IO UV(20)3TV(20).FV(20).FVAR CHARACTEREB’U(20).T(20).F(20.2).FVAR1.FVAR2 CHARACTER*8 ELNAM(100).BDNAM(IOO) CHARACTER*h NEXTP(IOO) CHARACTER*3 0PT(20).0PTVAR INTEGER IELSBD(100.2).IDDPTR(100).IBDSEL(100) COMMON INELS.INBDS.ELNAN.DDNAM.IBDPTR.IELSBD.IBDSEL.NEETP 145 COMMON/V/ UV.TV.FV.L.M.N.U.T.F.0PT c**********e*****e********* IF (FVAR(3:10).EQ.' ') GOTO 99 INDEX-0 IF (N.EQ.0) GOTO 5 CALL FAULTJ(FVAR.FVAR1.FVAR2.0PTVAR) DO 10 I-1.N IF (FV(I).EQ.FVAR) THEN INDEX-1 GOTO 10 ENDIF CALL FAULTJ(FV(I).F(I.1).F(I.2).0PT(I)) IF (F(I.l).EQ.FVAR1.AND.F(I.2).EQ.FVAR2) INDEX-1 10 CONTINUE 5 IF (INDEE.EQ.0) THEN N-N+1 FV(N)-FVAR ENDIF 99 RETURN END C C>>>>>>>>>>>>>>>>>>>>>>>>>>>>> INPUTJ <<<<<<<<<<<<<<<<<<<<<<<<<<<< C SUDROUTINE INPUTJ(VAR.JCN) C C---DESCRIPTION: THIS SUEROUTINE DEFINES THE INPUT JUNCTION FOR A C GIVEN INPUT VARIABLE. C Coo-INPUT: VAR - VARIABLE NAME. ONLY FLOW OR EFFORT ALLOWED. WRITTEN C AS: e.30ND-NAME OR f.30ND-NAME C C---OUTPUT: JCN - THE INPUT JUNCTION NAME (TYPE SE OR SF C C---DECLARATIONS: CHARACTER*IO VAR . CHARACTER*8 EINAH(IOO).BDNAM(100).BOND.NNAH1.NNAMLJCN CHARACTER*h NBXTP(100) CHARACTER TYP1.TYP2.V INTEGER IELSBD(100.2).IBDPTR(100).IEDSEL(100) COMMON INELS.INBDS.ELNAH.BDNAH.IBDPTR.IELSBD.IBDSEL.NBXTP c*eee*eeeeeeeeeeeeeeeeeeeeeee ' JCN-' ' VhVAR(1:1) BOND-VAR(3:10) CALL NAMNO(BOND.'B'.I) IF (I.EQ.0) THEN WRITE (8,100) BOND GOTO 99 ENDIF CALL CON(BOND.NNAM1.NNAM2.TYP1.TYPZ) IF (V.EQ.'e') THEN IF (TYP1.EQ.'E') THEN JCN-NNAMI GOTO 99 ENDIF IF (TYP2.EQ.'E') THEN JCN-NNAHZ GOTO 99 ENDIF ENDIF 146 IF (V.EQ.'f') THEN IF (TYP1.EQ.'F') THEN JCN-NNAMI GOTO 99 ENDIF IF (TYP2.EQ.'F') THEN JCN-NNAMZ GOTO 99 ENDIF ENDIF . WRITE(8.101) VAR 100 FORMAT(/.' BOND NAMED: '.AB.' DOES NOT EXIST ON THE GRAPH') 101 FORMAT(/.2X.AIO.' IS NOT AN EXCEPTABLE INPUT VARIABLE') 99 RETURN ' END C D>>>>>>>>>>>>>>>>>>>>> NAME <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< C SUBROUTINE NAME(TYPE.STRING) C C---DESCRIPTION: THE SUBROUTINE NAMES A BLOCK. AN EXTRA.NODE OR AN C EXTRA BOND C C-e-DECLARATIONS: CHARACTER TYPE. STRING*8 COMMON/BLGRPH/IBLCE.IEET3.NEET CW IF (TYPE.EQ.'N') THEN STRING(1:h)-'BLCK' IBLCKPIBLCK+1 WRITE(STRING(5:6).'(IZ.2)') IBLCK ENDIF IF (TYPE.EQ.'B') THEN STRING(1:4)-'EXTB' IEETB-IEXTB+1 WRITE(STRING(5:6).'(IZ.2)') IEXTB ENDIF IF (TYPE.EO.'0') THEN STRING(1:h)-'EXTN' NEXT-NEXT+1 WRITE(STRING(5:6).'(IZ.2)') NEXT ENDIF RETURN END C 0>>>>>>>>>>>>>>>>>>>>>>>>>>> NAMNO <<<<<<<<<<<<<<<<<<<<<<<<<<<<< C SUEROUTINE NAMNO(NAME.NB.NO) C C---DESCRIPTION: THE SUEROUTINE PROVIDES THE NODE/BOND NUMBER C (IN THE NODE/BOND LIST) FOR A GIVEN NAME C C---INPUTS: NAME - NODE/BOND NAME C NB - DEFINED THE NEEDED INFORMATION: C NB-‘N' -> NODE NUMBER REQUIRED C NI-'B' -> BOND NUMBER REQUIRED C C---0UTPUT: NO - NODE/BOND NUMBER. IF NO-O, THE NODE/BOND IS C NOT ON THE LIST. C 147 C---DECLARATIONS: CHARACTER*8 ELNAM(100). BDNAM(100). NAME. NB*1 COMMON INELS. INBDS. ELNAM. BDNAM cieee*****************ee***** NO-O IF (NB.EQ.'B') GOTO 2 DO 10 I-1.INELS IF (ELNAM(I).EQ.NAME) NO-I 10 CONTINUE IF (NB.EQ.'N') GOTO 99 2 DO 20 I-1.INBDS IF (BDNAM(I).EO.NAME) NO-I 20 CONTINUE 99 RETURN END C C>>>>>>>>>>>>>>>>>>>>>>>>> PATHFN <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< C SUEROUTINE PATHFN(jO.PATH.KO) C C---DESCRIPTION: PATHFN (PATH-FiNd) finds the path froe node #10 C back to the source node ,after all nodes has been C labeled. The path is defined by a list of node naees. C C---INPUTS: jO - 'sink' node nueber C DFI - LABELING OF THE GRAPH (IN COMMON/A/) C FA - LIST OF “FATHER" FOR EACH NODE (IN COMMON/A/) C C---OUTPUTS: PATH - PATH DEFINED BY NODE NAMES (ARRAY) C K0 - NUMBER OF NODES IN THE PATH C C---DECLARATIONS: INTEGER IBDPTR(100). IELSBD(100.2). IBDSEL(100)- INTEGER DFI(100).FA(IOO) CHARACTER*8 BDNAM(100). ELNAM(100). PATH(IOO).STACK(IOO) COMMON INELS.INBDS.ELNAH.BDNAM.IBDPTR.IELSBD.IBDSEL.NBETP COMMON/A/ STACE.IO.DFI.FA CW I-I PATH(1)-ELNAM(JO) J-JO KO-I 5 IF (DFI(J).EQ.1) GOTO 99 I-I+1 PATH(I)-ELNAN(FA(J)) KO-KO+1 J-FA(J) GOTO S 99 RETURN END C D>>>>>>>>>>>>>>>>>>>>>>>>>>>> POPS“ <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< C SUIROUTINE POPSTK(NODE.NODE1.KO.BLOCK) C C---DESCRIPTION: THIS SUEROUTINE POPS AND OUTPUT THE STACK UP TO AND INCLUDING 'NODE'. THE POPED STACK IS A BLOCK AND IS THE OUTPUT OF THE SUBROUTINE. THE SUBROUTINE ALSO REARRANGED THE REMAINING STACK. 0000 148 C---INPUT: NODE - NODE NAME. THE LAST ONE IN THE DEFINED BLOCK C NODEl - THE NAME OF THE 'FATHER' OF "NODE“ C STACK - OLD STACK (STORED IN COMMON/A/) - C IO - # OF NODES IN OLD STACK (STORED IN COMMON/A/) C C---OUTPUT: BLOCK - LIST OF NODES THAT ARE IN THE SAME BLOCK C KO - # OF NODES IN THE BLOCK C STACK - UP TO DATE STACK (STORED IN COMMON/A/) C I0 - # OF NODES IN UP TO DATE STACK C C---DECLARATIONS: CHARACTER*8 STACK(100).BLOCK(IOO).NODE.NODE1 INTEGER DFI(100).FA(100) COMMON/A/ STACK.IO.DFI.EA C(IIMON/P/INDEE CW K-0 00 10 I-l.IO IF (STACK(I).EQ.NODE) K-I 10 CONTINUE IF (K.EQ.0) GOTO 99 Do 20 I-1.IO-K+1 BLOC!“ I )-STACK( I+K- 1) 20 CONTINUE KO-IO-K-u-Z mam-Nomi IO-K-I IF (INDEE.EQ.1) CALL CUTPNT(XD.BLOCR) IF (INDEX.EO.2) CALL BLCKGNRDJLOCK) 99 m It‘ll c @111:me -------------- READVR -------------------------------- c c-«most: READS :33 INPUT. 0mm AND FAULT-LIST VARIABLES. c COUNTS NUMBER OF INPU'rs, ems AND PAUL: VARIABLES. c cmmszva ------------------------------------------------------ SUBROUTINE READVR CHARACTER*IO STRING*80.H*IO.UV(20).TV(20).FV(20) CHARACTER*8 U(20).T(20).F(20.2) CHARACTER*3 OPT(20) COMMON/INDEX/INDK COMMON/V/UV.TV,FV.L,M.N.U.T.F.OPT C OPEN(15.FILE-'VARIDAT'.STATUS-‘OLD') L-O M-O N-O C 10 READ(15.100) STRING IF (STRING(1:6).NE.'OPTION') GOTO 10 READ(15.101) INDX 1 READ(15.100) STRING H-STRING(1:10) IF (H.NE.'INPUT VARI') GOTO 1 2 READ(15.100) STRING H-STRING(1:10) IF (H.EQ.' ') GOTO 3 L-L+1 149 UV(L)-H GOTO 2 C 3 READ(15.100) STRING H-STRING(1:10) IF (H.NE.'OUTPUT VAR') GOTO 3 4 READ(15.100) STRING H-STRING(1:10) IF (H.EO.' ') GOTO 8 M-M+1 TV(M)-H GOTO 4 C 8 READ(15.100) STRING H-STRING(1:10) IF (H.NE.' ') GOTO 9 INDE-ll GOTO 7 C S READ(15.100) STRING H-STRING(1:10) 9 IF (H.NE.'FAULT VARI') GOTO 5 6 READ(15 .100) STRING H-STRING(1:10) IF (H.EQ.' ') GOTO 7 N-N+1 FV(N)-H GOTO 6 C 7 CLOSE(15) 100 FORMAT(ABO) 101 FORMAT(II) RETURN END C C>>>>>>>>>>>>>>>>>>>>>>>>>> RTNODE <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< C SUBROUTINE RTNODE c C---DESCRIPTION: RTNODE (REDUCTION OF TEST-NODES) PROVIDES THE 0523 c INFORMATION ABOUT THE DETECTIBILITY OF EACH TEST-NODE. c A DESIGN :OOL FOR cnoostc TEST-NODES IS ALSO PROVIDED. c C---INPUTS: D - CFD ARRAY (STORED IN COMMON/DD/) c c---ou:ru:s: 1. LIST OF UNNECESARY TEST-NODES c . 2. TEST-NODE EQUIVALENT sn:s c 3. DETECTIBILITT OP TEST-NODES (TWO TABLES) c C---DECLARATIONS: CHARACTER*IO UV(20),TV(20).FV(ZO) CHARACTER*8 U(20),T(20),F(20.2) CHARACTER*B OPT(20) INTEGER D(20.20.20) COMMON/DD/D COMMON/V/UV,TV,FV.L.M.N.U.T.F,OPT ce*eeeneeeeeeeeeeeeeenneee WRITE(8.100) WRITE(8.105) N WRITE(8.106) M 150 WRITE(8.114) WRITE(8.115) WRITE(8.101) WRITE(8.102) WRITE(8.103) WRITE(8.101) DO 10 J-1.M CALL CHANGE(D.J.1) CALL FAULT(D.1,ND.NI,0) m1m(a.104) J,TV(1),ND.NI CALL CHANGE(D.J.1) 10 CONTINUE WRITE(8.101) WRITE(8.110) WRITE(8.101) WRITE(8.107) WRITE(8.108) WRITE(8.101) Do no J0-0.H-1 NDNAxpO Do 50 J-J0+1.M CALL CHANGE(D.J.J0+1) CALL FAULT(D.J0+1.ND.NI.0) IF (ND.c:.NDNAX) THEN NDNAxpND NIO-NI ELSE CALL CHANGE(D.J.JO+1) ENDIF so CONTINUE wa1:z(a.109) J0+1.TV(J0+1),NDMAX.NIO ao CONTINUE WRITE(8.101) WRITE(8.111) WRITE(8.112) WRITE(8.113) 100 FORMAT(///.3x.'DETECTIBILITY OP TEST-NODES'./.3X.27('*')) 101 FORMAT(/.1X.75('-')) 102 FORHAT(/.2x.2(4x.'TEST-NODE').1X.2(7X.'NUMBER 0F ').'UNIQUELY') 103 FORMAT(6X.'NUMBER'.7X.'VARIABLE ',2(6X.'DETECTED FAULTS')) 104 FORMAT(/.7X.IZ.12X.A6.13X.12.17X.12) 105 FORMAT(/.' -TOTAL NUMBER OP FAULTS: ',12) 106 FORMAT(/.' - NUMBER OP EFFECTIVE TEST-NODES: '.12) 107 FORMAT(/.3X.'NUMBER OF'.8X.'INCLUDING '.2(7X.'TOTAL NUMBER OF')) 108 FORMAT(6X.'T.N.'.8X.'T.N. VARIABLES',1lx.'D.F.'.17X.'U.T.F.') 109 FORMAT(/.7X.IZ.13X.A6.14E.12.18X.12) 110 FORMAT(////,3X.'REDUCTION OP TEST-NODES',/.3X.23('*')) 111 FORMAT(/.3X.'ABBREVIATIONS:',/.4X.'T.N. - :zs: NODES') 112 FORMAT(4X.'D.F. - DETECTED FAULTS') 113 FORMAT(4X.'U.D.F. - UNIQUELY DETECTED FAULTS') 114 FORMAT(' *UNNECESSART TEST-NODES WERE DELETED FROM :32 LIST') 115 FORMAT(' *T.N. EQUIVALENCE SETS ARE REPRESENTED BY ONE T.N.') 99 RETURN END C C>>>>>>>>>>>>>>>>>>>>>>>>>>>>> SSTACK <<<<<<<<<<<<<<<<<<<<<<<<<< C SUBROUTINE SSTACK(NODE) C Coo-DESCRIPTION: THIS SUDROUTINE ADDS NODES TO THE TOP OF THE STACK. 151 C ONLY IF THIS NODE DOES NOT EXIST THERE ALREADY. C . C---INPUT: NODE - NODE NAME TO BE ADDED TO THE STACK C STACK - OLD STACK (STORED IN COMMON/A/) C C---OUTPUT: STACK - UP-TO-DATE STACK (STORED IN COMMON/Al) C IO - # OF NODES IN THE UP TO DATE STACK (STORED IN COMMON/A/) C C- - -DECLARATIONS: CHARACTER*8 STACK(IOO).NODE INTEGER DFI(IOO).FA(IOO) COMMON INELS.INBDS COMMON/A/ STACK.IO.DFI.FA cieeee*eeee****ee****ee*e*etee INDEXhO IF (IO.EQ.0) GOTO 5 DO 10 I-1.IO IF (STACK(I).EQ.NODE) INDEX-1 10 CONTINUE 5 IF (INDEX.EQ.0) THEN IO-IO+1 STACK(IO)-NODE ENDIF 99 RETURN 'JIli C C>>>>>>>>»»»>>»>»»>>»» TESTNJ <<<<<<<<<<<<<<<<<<<<<<<<<<< C SUIROUTINE TESTNJ(VAR.JCN) C C---DESCRIPTION: THIS SUIROUTINE DEFINES THE TEST-NODE (OUTPUT) C JUNCTION FOR A GIVEN VARIABLE. c . C---INPUT: VAR - VARIABLE NAME. ONLY FLOW OR EFFORT ALLOWED. WRITTEN C AS: e.BOND-NAME OR £.BOND-NAME C C---OUTPUT: JCN - THE OUTPUT JUNCTION NAME (O-JUNCTION OR 1-JUNCTION) C C---DECLARATIONS: CHARACTER*IO VAR CHARACTER*8 ELNAM(IOO).BDNAM(100).BOND.NNAM1.NNAM2,JCN CHARACTER*b NBKTP(100) CHARACTER TYP1.TYP2.V INTEGER IELSBD(100.2).IBDPTR(100).IBDSEL(100) COMMON INELS.INBDS.ELNAM.BDNAM.IBDPTRWIELSBD.IBDSEL.NBETP CW JCN-' ' v-VAR(1: 1) BOND-VAR(3:10) CALL NAMNO(BOND.'B'.I) IF (I.E0.0) THEN WRITE (8.100) BOND GOTO 99 ENDIF IF (V.EO.'e'.OR.V.EQ.'f') GOTO 1 WRITE (8.105) VAR GOTO 99 1 CALL CON(BOND.NNAM1.NNAM2.TYP1.TYP2) IF (V.EQ.'e') THEN IF (TYP1.EQ.'O') THEN 152 JCN-NNAMI GOTO 99 ENDIF IF (TYP2.EQ.'0') THEN JCNHNNAMZ GOTO 99 ENDIF ' ENDIF IF (V.EQ.'f') THEN IF (TYP1.EQ.'1') THEN JCN-NNAMl GOTO 99 ENDIF ' IF (TYP2.EQ.'1') THEN JCN-NNAM2 GOTO 99 ENDIF ENDIF CALL ADNODE(VAR.JCN) 100 FORMAT(/.' BOND NAMED: '.AB. 'DOES NOT EXIST ON THE GRAPH') 105 FORMAT(/.2X,AIO.' IS NOT AN EXCEPTABLE OUTPUT VARIABLE') 101 FORMAT(/.' THERE IS NO O-JUNCTION ASSOCIATED WITH '.A10) 102 FORMAT(' AN EXTRA O-JUNCTION WAS ADDED BETWEEN '.AB.' AND '.A8) 106 FORMAT(' JUNCTION NAME:'.AB) 103 FORMAT(/.' THERE IS NO 1-JUNCTION ASSOCIATED WITH '.A10) 104 FORMAT(' AN EXTRA 1-JUNCTION WAS ADDED BETWEEN '.AB.' AND ',AS) 107 FORMAT(' JUNCTION NAME:'.AB) 99 RETURN INCH D>>>>>>>>>>>>>>>>>>>>>>>> MOE <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< C SUBROUTINE TNODE C C-o-DESCRIPTION: THE SUBROUTINE PROVIDES INFORMATION ABOUT THE C DETECTABILITY OF THE INITIAL TEST-NODES LIST. C C---INPUTS: D « CFD ARRAY. STORED IN COMMON/DD/ C C---OUTPUTS: 1. LIST OF UNNECESSARY TEST NODES C 2. EQUIVALENT SETS 0F TEST NODES C C---DECLARATIONS: CHARACTER*IO UV(20),TV(20).FV(20) CHARACTER*8 U(20),T(20),F(20.2) CHARACTER*B OPT(20) INTEGER D(20.20.20).DD(20.20).AT(100) COMMON/DD/D COMMON/V/UV.TV.FV.L,M.N.U.T.F.OPT cineeeenee**eeeneeene**e** WRITE(8.100) ISET-l DO 90 J-1.M AT(J)-O 9O CONTINUE 1 DO 10 JO-1.M IF (AT(JO).NE.O) GOTO 10 IN-O 153 D0 20 I-1.L DO 20 K-1.N IF (D(I.J0.K).EQ.0) GOTO 2 20 CONTINUE AT(J0)‘111 GOTO 10 2 DO 30 J-JO+1.M IF (AT(J).NE.0) GOTO 30 DO 40 I-1.L DO 40 KPI.N DD(I 9K)-D(IOJOK)'D(IOJOOK) IF (ABS(DD(I.K)).EQ.1) GOTO 30 40 CONTINUE IN-l AT(JO)-ISET AT(J)-ISET 3O CONTINUE IF (IN.EQ.1) ISET-ISET+1 10 CONTINUE IN-O DO 50 J0-1.M IF (AT(JO).EQ.O) AT(JO)-999 IF (AT(JO).EQ.111) THEN IN-IN+1 IF(IN.EQ.1) WRITE(8.101) WRITE(8.104) JO.TV(JO) ENDIF SO CONTINUE IN-O DO 80 JO-1.M IF (AT(JO).LT.100) THEN IN-IN+1 IF (IN.EQ.1) WRITE(8.102) WRITE(8.103) AT(J0) WRITE(B. 104) JO.TV(JO) DO 70 J-JO+1.M IF (AT(J).EQ.AT(JO)) THEN WRITE(8.104) J.TV(J) AT(J)-222 ENDIF 7O CONTINUE ENDIF 80 CONTINUE 96 DO 95 J0-1.M IF (AT(JO).EQ.111.0R.AT(JO).EQ.222) THEN DO 88 J-JO.M-1 T(J)-T(J+1) TV(J)-TV(J+I) AT(J)-AT(J+1) DO 88 I-1.L DO 88 K-1.N D(I.J.K)-D(I.J+1,K) 88 CONTINUE M-M-I GOTO 96 ENDIF 95 CONTINUE 154 100 FURNAT(///,3x,'TEST-NODES REPOET',/.3x.17('*')) 101 FORMAT(//.6x.'LIST OF UNNECESSAEY TEST-NODES',/.6X,30('*')) 102 FOE!AT(//.6X.'TEST-NODES EQUIVALENCE SETS'./.6X.27('*')) 103 FOEHAT(/.9X.'TEST-NODE EQUIVALENCE SET #‘.IZ.' CONTAINS:') 104 FUENAT(20X.'TEST-NODE #'.12.' (DEFINED BY '.A6.')') 99 RETURN END c c>>>>>>>>>>>>>>>>>>>>>>>> TEEDIC <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< c SUEEOUTINE TEEDIC ---DESCRIPTION: THE SUEROUTINE FINDS THE FAULT DICTIONARY (STORED IN ARRAY D) FOR A TREE GRAPH. THE PROCEDURE CONTAINS THE FOLLOWING STEPS: I. LABEL THE GRAPH FOR EACH INPUT USING THE DFS ALGORITHM 2. FIND THE PATH FOR EACH INPUT-OUTPUT SET 3. CHECK WHETHER THE FAULTY JUNCTIONS (ONE BY ONE) EXIST ON THAT PATH AND PUT THE RELEVANT RESULTS IN THE FAULT DICTIONARY ARRAY. D. ---INPUTS: SYSTEH DESCRIPTION (STORED IN COHHON). INPUT, OUTPUT AND FAULTY JUNCTIONS (STORED IN COHNON/V/) 00000000000000 C---OUTPUT: D - CFD ARRAY (STORED IN COHHON/DD/) C C---DECLARATIONS: CHARACTER*IO UV(20).TV(20).FV(20) CHARACTER*8 ELNAH(IOO),BDNAH(IOO),PATH(IOO),STACK(IOO) CHARACTER*8 U(20).T(20),F(20.2) CHARACTER?“ NEXTP(IOO).BDTP(IOO) CHARACTER*3 OPT(20) INTEGER IELSBD(100,2),IEDPTR(IOO).IBDSEL(IOO) INTEGER D(20.20.20).DFI(IOO).FA(100) COHHON INELS.INDDS.ELNAH.DDNAH.IBDPTR.IELSED,IEDSEL,NEXTP.EDTP COHHON/A/STACK.IO,DFI.FA CONNON/DD/D COHHON/INDEE/ INDX COHHON/V/ UV.TV.FV.L.H.N.U.T.F.OPT ctt************************ DO 40 I-1.L CALL DFSLEL(U(I)) DO 50 J-1,H CALL NAHNO(T(J).'N',JO) CALL RATHFN(JO.PATH.KD) DO 60 KP1.N CALL FLTEXT(PATH.KO.F(K.1).F(K.2).OPT(K).D(I.J.K)) 60 CONTINUE CONTINUE 60 CONTINUE IF (INDX.GE.1) GOTO 99 DO 70 KPI.N "RITE (8.105) FV(K) WRITE (8.106) D(1.1.K).D(1.2.K) WRITE (8,106) D(2.1,K).D(2.2.K) 7O CONTINUE 105 FORMAT(/.' FOR FAULT DEFINED BY '.A5.'-O:') 106 FORHAT(38X.2(I3)) 99 RETURN U 0 APPENDIX F: Input files for five-degree-of-freedon suspension system F.1: System description READING FILE CAR1.ENP TITLE CAR1.ENP: FIVE-DEGREE-OF-FREEDOM VEHICLE MODEL SYSTEM GRAPH DESCRIPTION NODE TYPE XLOC YLOC SFI MFG 300. 400. SF2 MFG 500. 400. SE1 MEG 500. 300. $84 MEG 100. -100. SE5 MEG 100. 100. OFl MOG 700. 500. 1F1 MIG 700. 400. RC2 MRG 700. 600. 0K2 MCG 500. 600. 031 MOG ' 800. 500. 131 MIG 900. 500. 1M1 MIG 800. 0. RC3 MRG 150. 600. CK3 MCG O. 200. TFF MTG -200. 100. IR MIC 50. -100. IJZ MIG 400. -200. TBF MTG 100. -100. 1T MIC -50. 0. IM2 MIG 800. -200. 0D MOG -800. ~300. 1D MIG -550. -300. RC1 MRG 0. 0. CKI MCG 250. 300. IMI MIG 100. 100. TFD MTG 200. 400. 124 MIG 100. 200. 1M4 MIG O. 50. 125 MIG 400. 600. 1M5 MIG 200. 100. OF MOG 300. 300. IF MIG 200. -400. 0K4 . MCG -50. ~600. RCA MRG ~900. ~900. OB MOG 200. 750. 13 MIG 700. 700. CKS MCG 500. ~600. RC5 MRG 800. 600. 155 CONNECTOR TYPE \OQVGU‘L‘MNH BM BM BM BM BM BM BM BR BR BM BM BR BM BM BM BM BM BM BM BR BM BM BM BM BM BM BM BM BM BM BM BR BM BM BM BM BM BM BM FROM 0F OB 124 125 OF1 0B1 0F1 TFF 1R TBF OFl 1R TFD 1T 0B1 0D OD SFl SF2 OF 0B 1F 1F 1B 1B 124 125 1F1 1F1 1B1 1B1 1R 1T 1M1 1D 1D SE1 SE4 SE5 TO 124 125 OF1 0B1 1F1 1B1 TFF TBF 0B1 1T TFD 0D OD 1T 1D 1M1 0F 0B 1F 1B CKh RCh CKS RC5 1M4 IM5 CK2 RC2 CK3 R03 IJ2 IM2 1M1 CKl RC1 1M1 12h 125 156 VERTICES F.2: Variable-list for option 1 OPTION 1 INPUT VARIABLES f.sl f.sZ OUTPUT VARIABLES e.m4 e.m2 e.ii e.k2 FAULT VARIABLES f.c2 e.3 . 2 Hpmm WNW . 5 157 Variable-list for option 1 (default option) OPTION 1 INPUT VARIABLES f.sl OUTPUT VARIABLES e.j2 e.m2 e.ii 158 E.3: Variable-list for option 2 OPTION 2 INPUT VARIABLES f.sl OUTPUT VARIABLES e.j2 e.m2 .ii .k2 .m5 .k2 .k3 .c2 .c4 (DQHIQOHICD FAULT VARIABLES f.5 e.6 .11 .16 .4 .k2 .c2 .3 .15 .12 HIMHIWCD mm (D QRIES "1111111111711: