Link¨ oping Studies in Science and Technology. Dissertations No. 716Residual Generation for Fault DiagnosisErik FriskDepartment of Electrical Engineering Link¨ oping University, SE–581 83 Link¨ oping, SwedenLink¨ oping 2001Residual Generation for Fault Diagnosisc ? 2001 Erik

[email protected] http://www.fs.isy.liu.se Department of Electrical Engineering, Link¨ oping University, SE–581 83 Link¨ oping, Sweden.ISBN 91-7373-115-3ISSN 0345-7524Printed by Linus Sampath et al., 1995, 1996). A third model domain78Chapter 2. Model Based Diagnosisthat is commonly considered are models typically found in the field of signals and systems, i.e. models involving continuous variables in continuous or discretetime. Typical model formulations are differential/difference equations, transfer functions, and/or static relations. From now on in this work, only models from this domain are used. In Chapter 1 it was discussed how model-based diagnosis is used when re- dundancy is supplied by a model instead of additional hardware. Redundancysupplied by a model is called analytical redundancy and can be defined more formally as:Definition 2.1 (Analytical Redundancy). There exists analytical redun-dancy if there exists two or more different ways to determine a variable x by only using the observations z(t), i.e. x = f1(z(t)) and x = f2(z(t)), and f1(z(t)) 6≡ f2(z(t)).Thus, the existence of analytical redundancy makes it possible to check the validity of the assumptions made to ensure that f1(z(t)) = f2(z(t)).Example 2.1 Assume two sensors measure the variable x according toy1=√x∧y2= xThe integrity of the two sensors can then be validated by ensuring that the relation, represented by the equation y21− y2= 0, holds.In Example 2.1 it was easy to see that a malfunction in any of the two sensors would invalidate the relation and a fault could be detected. In more general cases, and to facilitate not only fault detection but also fault isolation, there isa need to describe fault influence on the process more formally, i.e. fault models of some sort is needed.2.1.1Fault modelingA fault model is a formal representation of the knowledge of possible faults andhow they influence the process. More specific, the term fault means that com- ponent behavior has deviated from its normal behavior. It does not mean that the component has stopped working altogether. The situation where a com- ponent has stopped working is, in the diagnosis community, called a failure. So, one goal is to detect faults before they cause a failure. In general, utilizing better fault models (assuming good and valid fault models) implies better diag-nosis performance, i.e. smaller faults can be detected and more different types of faults can be isolated. Here fault modeling is illustrated using an example. For more elaborate discussions on fault modeling the reader is referred to e.g. (Nyberg, 1999b; Gertler, 1998; Chen and Patton, 1999). A common fault model is to model faults as deviations of constant parame- ters from their nominal value. Typical faults that are modeled in this way are2.1. Introduction to model based diagnosis9“gain-errors” and “biases” in sensors, process faults modeled as a deviation of a physical parameter. In cases with constant parameter fault models, methods and theory from parameter estimation have shown useful also for fault diag- nosis, see for example (Isermann, 1993). However, other more elaborate fault models exists e.g. fault models that utilizes the change-time characteristic of the process(Basseville and Nikiforov, 1993). The fault models used in the chapters to follow are typically time-varying fault signals or constant parameter changes. An advantage with using fault- signals when modeling faults is the simplicity and relatively few assumptions made in modeling.A disadvantage with such a general fault model is that fault isolability may be lost compared to more detailed fault models. A small example is now included to illustrate fault modeling principles.Example 2.2 A nonlinear state-space description including fault models can be written˙ x = g(x,u,f) y = h(x,u,f)where x, u and y are the state, control signals, and measurements respectively. The signal f represents the fault, which in the fault-free case is f ≡ 0 and non-zero in a faulty case. The signal f here represents an arbitrary fault that can for example be a fault in an actuator or a sensor fault.To illustrate fault modeling more concretely, consider a small idealized first principles model of the arm of an industrial robot. Linearized dynamics around one axis can be described by equations looking something like the following equations:Jm¨ ϕm= −Fv,m˙ ϕm+ kTu + τspring(2.1a) τspring= k(ϕa− ϕm) + c( ˙ ϕa− ˙ ϕm)(2.1b) Ja¨ ϕa= −τspring(2.1c)y = ϕm(2.1d)where the model variables are:SymbolDescription Jmmoment of inertia: motor Jamoment of inertia: arm ϕmmotor position ϕaarm position Fv,mviscous friction, motor kstiffness coefficient, gear box cdamping coefficient, gear box kTtorque constant, is 1 when torque control-loop is working utorque reference value, fed to the torque controller10Chapter 2. Model Based DiagnosisNow, fault models are illustrated by modeling the following faults1.A faulty torque-controller2.Faulty arm position sensor, resulting in increased signal to noise ratio in the sensor signal3.The robot has a load attached to the tip of the robot arm which is dropped4.Collision of the robot arm with the environmentAssociate a fault-variable f1to f4with the faults above.Introducing fault models in (2.1) gives for exampleJm¨ ϕm= −Fv,m˙ ϕm+ (kT+ f1(t))u + τspringτspring= k(ϕa− ϕm) + c( ˙ ϕa− ˙ ϕm) (Ja+ f3)¨ ϕa= −τspring+ f4(t)y = ϕm+ ǫ(f2)ǫ(f2) =( N(0,σ21)f2= 0,fault-free case N(0,σ21+ f22)f26= 0,faulty sensor˙f2= 0 ˙f3= 0Here it is seen that faults f2and f3are assumed constant. Faults f1and f4is however not assumed constant. Such an assumption for f4would of course lead to a highly unrealistic fault model since f4is the torque exercised on the robot arm by the environment which naturally would not be constant in a collision situation. The time variability assumption of f1and f4is emphasized in the model by adding explicit time dependence.2.1.2Residuals and residual generatorsThe second step in the introductory presentation of model based diagnosis is a presentation of residuals and residual generators. Residuals is often a funda- mental component in a diagnosis system. A residual is an, often time-varying, signal that is used as a fault detector. Normally, the residual is designed to be zero (or small in a realistic case where the process is subjected to noise andthe model is uncertain) in the fault-free case and deviate significantly from zero when a fault occurs. Note however that other cases exist. In case of a likelihood- function based residual generator where the residual indicates how “likely” it is that the observed data is generated by a fault-free process, the residual is large in the fault-free case and small in a faulty case. But for the remainder of this text it is assumed, without loss of generality, that a residual is 0 in the fault-free case.A residual generator is a filter that filters known signals to produce the residual. A linear residual generator is thus a proper MISO (Multiple Input2.1. Introduction to model based diagnosis11Single Output) filter Q(s), filtering known signals y and u (measurements and control signals) producing an output rr = Q(s)?yu?Introduction to linear residual generator design is given in Section 2.2. A more general non-linear residual generator on state-space form is given bytwo non-linear functions g and h and the filter˙ z = g(z,y,u) r = h(z,y,u)A main difficulty when designing residual generators is to achieve the distur-bance decoupling, i.e. to ensure that the residual r is not influenced by unknown inputs that is not considered faults. This is was illustrated by Figure 1.2. The main topic of the chapters to follow is procedures to design and analyze residual generators, i.e. the transfer function Q(s) in the linear case and the non-linear functions g and h in the non-linear case.2.1.3Fault isolationBefore it is described how residuals and residual generators fit into a diagnosis system in Subsection 2.1.4, basic fault isolation strategies is described. Since fault isolation is not the topic of this thesis, this section illustrates fault isolation mainly by example. To achieve isolation, several principles exists. For methods originating fromthe area of automatic control, at least three different approaches can be distin-guished: fixed direction residuals, structured residuals, and structured hypothesis tests.The idea of fixed direction residuals (Beard, 1971) is to design a residualvector such that the residual responds in different directions depending on what fault that acts on the system. Fault isolation is then achieved by studying and classifying the direction of the residual. This approach has not been so much used in the literature, probably because the problems associated with designing a residual vector with desired properties. The idea of structured residuals (Gertler, 1991) is to have a set of residuals, in which each individual residual is sensitive to a subset of faults. By study- ing which residuals that respond, fault isolation can be achieved. Structured residuals have been widely used in the literature, in both theoretical and prac- tical studies. The basic idea is quite simple and many methods for constructing suitable residuals have been presented both for linear and non-linear systems. As a generalization of structured residuals, structured hypothesis tests hasbeen proposed where the isolation method is formally defined.This formaldefinition makes it possible to use any possible fault models (Nyberg, 1999a),12Chapter 2. Model Based DiagnosisIf1f2f3 r1110 r2X01 r3111IIf1f2f3 r1110 r2101 r3111IIIf1f2f3 r10XX r2X0X r3XX0IVf1f2f3 r1100 r2010 r3001Figure 2.1: Examples of influence structures.and perform deeper and further analysis of isolation properties of fault diagno-sis systems. However, isolation issues are addressed very briefly here and the isolation procedure is mainly illustrated by example. Residuals, as described in Section 2.1.2, can not only be used for fault detec- tion, they can also be used for fault isolation in a structured residual/hypothesis-test isolation framework. The following example illustrates briefly how the iso- lation procedure works.Example 2.3 To achieve isolation, in addition to fault detection, a set of residuals need tobe designed where different residuals are sensitive to different subsets of faults.Which residuals that are sensitive to what faults, can be described by the influ- ence structure1. Four examples of influence structures are shown in Figure 2.1. A number 1 in the i:th row and the j:th column represents the fact that resid- ual riis sensitive to fault j. A number 0 in the i:th row and the j:th column represents the fact that residual riis not sensitive to fault j. An X in the i:th row and the j:th column represents the fact that residual riis sometimes sen- sitive to fault j. For example in structure I, it can be seen that residual r2is sometimes sensitive to fault f1, not sensitive to fault f2, and always sensitive to fault f3. The isolation can ideally be performed by matching fault columnsto the actual values of the residuals. Consider for example influence structure II in Figure 2.1, and assume that residuals r1and r3have signaled, but not r2. The conclusion is then that fault f2has occurred.In light of this illustration, it is convenient to introduce some notation. Consider residual r2in influence structure I which is completely insensitive to fault f2and sensitive to faults {f1,f3}, i.e. two sets of faults are considered in each residual generator design. The faults that the residual should be sensitive to are called monitored faults and the faults the residual should be insensitive to are called1Also the method structured residuals uses influence structures but under different names. Names that have been used are for example incidence matrix(Gertler and Singer, 1990),resid- ual structure(Gertler, 1998), and coding set(Gertler, 1991).2.1. Introduction to model based diagnosis13non-monitored faults. The non-monitored faults are said to be decoupled in the residual. Thus, the residual generator design problem is, in a structured residuals/hypothesis-test framework, essentially a decoupling problem. It is worth noting that in general, the more faults that are decoupled in each residual, the greater is the possibility to isolate multiple faults. It is for exampleeasy to see that influence structure IV facilitates isolation of 3 multiple faultswhile influence structure III only can handle single faults. The price to pay for this increased isolation performance is that more sensors are needed and the residual generators become more complex and model-dependent. These issues, among others, are explored in detail in the chapters to follow.2.1.4Model based diagnosis using residualsThis section describes how residuals is used in a structured residuals based diagnosis system. To be able to perform the fault isolation task, the residualsmust react to faults according to an isolating influence structure. Thus, a design procedure would follow a procedure looking something like1. Select a desired isolating influence structure. See (Gertler, 1998) for de- tails on how, for example desired isolability properties restricts possibleinfluence structures.2. For each residual, collect unknown inputs and non-monitored faults, i.e.faults corresponding to zeros in the current row of the influence structure, in a vector d. The rest of the faults, the monitored faults, are collected in a vector f.3. Design a residual that decouples d and verify what faults the residual is sensitive to. Ideally it is sensitive to all monitored faults, but it is possible that when decoupling d in the residual, also some of the monitored faults are decoupled.4. If, when all residuals are designed, the resulting influence structure doesnot comply with design specifications, return to step 1 and re-design thedesired influence structure.It is clear from the procedure above that assuming a fault to be non-monitoredis equal to introducing a zero at the corresponding location in the influence structure. Thus, by moving faults between monitored and non-monitored faults,the influence structure becomes a design choice made by the designer. Note that, for example the number of sensors and structural properties of the modelboth restricts the available design freedom when forming the influence structure.Thus, the influence structure is not entirely free for the designer to choose.14Chapter 2. Model Based Diagnosis2.2Consistency relations and residual genera- tor implementationA consistency relation is any relation between known or measured variables that, in the fault free case always holds. This section is intende