Active Fault Diagnosis for Uncertain Systems Davide M. Raimondo 1 Joseph K. Scott 2, Richard D. Braatz 2, Roberto Marseglia 1, Lalo Magni 1, Rolf Findeisen 3 1 Identification and Control of Dynamic Systems Laboratory, University of Pavia 2 Process Systems Engineering Laboratory Massachusetts Institute of Technology 3 Laboratory for Systems Theory and Automatic Control, Otto-von-Guericke University Magdeburg 1
Fault Diagnosis Faults / Component malfunctions Compressor failure, stuck valves, faulty sensors, etc. Faults are inevitable and frequent in complex processes Large number of components Highly automated, many control components Serious threat to safe and profitable operation Minor faults can lead to critical situations via cascading effects Petrochemical industry losses estimated $20 billion/year Boeing Dreamliner Battery Fire BP Texas City Explosion http://www.businessinsider.com/boeing-dreamliner-787-catches-fire-in-boston--logan-2013-1 http://www.bbc.co.uk/news/business-21230940 http://symonsez.wordpress.com/2010/05/11/bp-safety-record-wont-help-in-court-of-public-opinion/ 2
Passive Fault Diagnosis diagnosis Process Monitoring input: u k Process output: y k noise: v k disturbance: wk Passive fault diagnosis (Industrial standard) Real time analysis of closed-loop input-output data Multivariate statistical methods, filters, parity relations, etc. Complications Other sources of anamolies (disturbances, measurement noise) Poor diagnosability at operating conditions, feedback compensation 3
Active Fault Diagnosis diagnosis Process Monitoring input: u k Process output: y k noise: v k disturbance: wk Active fault diagnosis Design input to improve diagnosability of faults Faster, more reliable diagnosis Exploit knowledge from dynamic fault models 4
Active Fault Diagnosis diagnosis Process Monitoring input: u k Process output: y k noise: v k disturbance: wk Objective: Given a library of fault models, compute an input that is guaranteed to distinguish between all possible models within a specified time horizon. 5
Active Fault Diagnosis diagnosis Process Monitoring input: u k Process output: y k noise: v k disturbance: wk Objective: Given a library of fault models, compute an input that is guaranteed to distinguish between all possible models within a specified time horizon. May be done periodically during normal operation, or after a fault has been detected that cannot be diagnosed 6
Faulty DC Motor i( t) Ra / L Ke / L i( t) 1 / L ut () n( t) K / J f / J n( t) 0 y 1 2 () t 1 0 i( t) y ( t) 0 1 n( t) t 1 r 1 Faults Increase of armature resistance Wearing of brush, low brush pressure Opening of coil Short circuit of two commutator bus Coil disconnect from commutator bar Faults reflected in model parameters 6 fault models u i R L K K J a 1 e t Armature voltage Current Resistance Inductance Torque constant Back EMF constant Motor inertia 7
Two-tank system Faults Leakage in tank 1 represented by the flow q 1 L Valve V 12 clogged and its throughput is reduced by 50% Leak in tank 2 that increases outflow to 5 times its nominal value 8
Outline Input design problem formulation Solution method umerical results Extensions Conclusions 9
Problem Formulation x [ i] [ i] [ i] [ i] k 1 A xk B uk Bw wk r [] i [ i] [ i] k k v vk s y C x D i {1,, n } m Multi-model framework i=1 is nominal, the rest faulty 10
Problem Formulation x [ i] [ i] [ i] [ i] k 1 A xk B uk Bw wk r [] i [ i] [ i] k k v vk s y C x D i {1,, n } m Multi-model framework i=1 is nominal, the rest faulty Objective: Compute an input ( u0,, u 1 ) such that every possible output ( y,, y ) is consistent with exactly one model i. 0 11
Problem Formulation x [ i] [ i] [ i] [ i] k 1 A xk B uk Bw wk r [] i [ i] [ i] k k v vk s y C x D i {1,, n } m x ( w 0 0 0 k X, v ) W V, k k X, W, V zonotopes i unknown but constant Multi-model framework i=1 is nominal, the rest faulty Objective: Compute an input ( u0,, u 1 ) such that every possible output ( y,, y ) is consistent with exactly one model i. 0 12
Problem Formulation Sequence notation: x ( x,, x ), u ( u,, u ), v ( v,, v ), 0 0 1 0 y ( y,, y ), w ( w,, w ). 0 0 1 Solution maps: [] i [] i y x ( x, u, w) 0 ( x, u, w, v) 0 Reachable sets: X [ i] [] i u [ i] [ i] u ( ) { ( x, u, w) : ( x, w) X W} 0 0 0 Y ( ) { ( x, u, w, v) : ( x, w, v) X W V} 0 0 0 13
Problem Formulation Input design problem: inf J( u) u s.t. u U, k {0,, 1} k [ i] [ j] u Y ( ) Y ( u), i, j, i j 14
Problem Formulation Input design problem: inf u J( u) s.t. u U, k {0,, 1} k [ i] [ j] u Y ( ) Y ( u), i, j, i j Quadratic objective (PD) Choose input that is minimally invasive 15
Problem Formulation Input design problem: inf J( u) u s.t. u Y U, k {0,, 1} k [ i] [ j] u ( ) Y ( u), i, j, i j Polyhedral input constraints 16
Problem Formulation Input design problem: inf J( u) u s.t. u U, k {0,, 1} k [ i] [ j] u Y ( ) Y ( u), i, j, i j Constraint guaranteeing diagnosability (necessary and sufficient) output space Y [1] ( u) Y [2] ( u) Y [3] ( u) Input distinguishes (1,2), (1,3), not (2,3) Infeasible 17
Solution Overview Reachable set computations using zonotopes Zonotopes are convex polytopes with special symmetry If W, V, and X 0 are zonotopes output reachable sets are zonotopes ecessary computations are very efficient and numerically stable Center is an affine function of the input [ i ] [ i] [ i] ( ) G ( ) : 1 Y u c u generator matrix center 1 18
Solution Overview Reachable set computations using zonotopes Zonotopes are convex polytopes with special symmetry If W, V, and X 0 are zonotopes output reachable sets are zonotopes ecessary computations are very efficient and numerically stable Center is an affine function of the input [ i ] [ i] [ i] ( ) G ( ) : 1 Y u c u Z Z G G ( c c ) : 1 1 2 1 2 1 2 RZ RG Rc 1 1 1 : 1 19
Problem Reformulation 20
Problem Reformulation Input design problem: inf J( u) u s.t. u U, k {0,, 1} k [ i] [ j] u Y ( ) Y ( u), i, j, i j 21
Problem Reformulation Input design problem: inf J( u) u s.t. u U, k {0,, 1} k [ i] [ j] u Y ( ) Y ( u), i, j, i j Reformulate diagnosability constraints using zonotope structure 22
Problem Reformulation Diagnosability constraint: Y [ i] [ j] u Y ( ) ( u) 23
Problem Reformulation Diagnosability constraint: Y [ i] [ j] u Y ( ) ( u) [ i ] [ i] [ i] ( ) G ( ) : 1 Y u c u [] i Y ( u) [ j Y ] ( u) 24
Problem Reformulation Diagnosability constraint: Y [ i] [ j] u Y ( ) ( u) [] i [ i] [ i], ( ) G ( ) : Y u c u [] i Y ( u) [ j Y ] ( u) 25
Problem Reformulation Diagnosability constraint: Y [ i] [ j] u Y ( ) ( u) [] i [ i] [ i], ( ) G ( ) : Y u c u [] i Y ( u) [ j Y ] ( u) [ ij ]( u) Smallest such that intersection is nonempty 26
Problem Reformulation Diagnosability constraint: Y [ i] [ j] u Y ( ) ( u) [ ij ] ( u) 1 [] i [ i] [ i], ( ) G ( ) : Y u c u [] i Y ( u) [ j Y ] ( u) [ ij ]( u) Smallest such that intersection is nonempty 27
Problem Reformulation Diagnosability constraint: Y [ i] [ j] u Y ( ) ( u) [ ij ] ( u) 1 [] i [ i] [ i], ( ) G ( ) : Y u c u [] i Y ( u) [ j Y ] ( u) [ ij ] [ ij ] ( u) min [ i] [ i] [ j ] [ j ] s.t. G c ( u) G c ( u) [ ij ] [ ij ], 28
Problem Reformulation Input design problem: min J( u) u s.t. u U, k {0,, 1} k [ ij ] ( u) 1, i, j, i j 29
Problem Reformulation Input design problem: min J( u) u s.t. u U, k {0,, 1} k [ ij ] ( u) 1, i, j, i j Embedded LP s lead to a bilevel program Reformulate using nec. and suff conditions of optimality 30
Problem Reformulation Input design problem: min J( u) u s.t. u U, k { 0,, 1} k [ ij ] 1 [ ij ] [ ij ] [ ij ] [ ij ] [ ij ] [ ij ] [ ij ] [ ij ] [ ij ] 1 2 3 4 5 [ ij ] [ ij ] [ ij ] [ ij ] [ ij ] k ( k ) 0, k ( k [ ij ] ) 0 [ ij ] [ ij ] [ ij ] [ ij ] [ ij ] 2k ( k ) 0, 2k ( k [ ij ] ) S S S S S u 0 0 i, j, i j, 31
Problem Reformulation Input design problem: min J( u) u s.t. u U, k { 0,, 1} k [ ij ] 1 [ ij ] [ ij ] [ ij ] [ ij ] [ ij ] [ ij ] [ ij ] [ ij ] [ ij ] 1 2 3 4 5 [ ij ] [ ij ] [ ij ] [ ij ] [ ij ] k ( k ) 0, k ( k [ ij ] ) 0 [ ij ] [ ij ] [ ij ] [ ij ] [ ij ] 2k ( k ) 0, 2k ( k [ ij ] ) S S S S S u 0 0 i, j, i j, onconvex complementarity constraints Reformulate as linear constraints on binary variables 32
Problem Reformulation Input design problem: min J( u) u s.t. u U, k {0,, 1} k p [ ij ] 1 [ ij ] [ ij ] [ ij ] [ ij] [ ij ] [ ij ] [ ij ] [ ij] [ ij ] 1 2 3 4 5 [ ij ] [ ij ] [ ij ] [ ij ] [ ij ] [ ij ] [ ij ] [ ij ] [ ij ] 1 T2 T3 T4 5 [ ij ] [ ij ] k { 0,1} S S S S S u 0 T T p 0, i, j, i j 33
Problem Reformulation Input design problem: min J( u) u s.t. u U, k {0,, 1} k p [ ij ] 1 [ ij ] [ ij ] [ ij ] [ ij] [ ij ] [ ij ] [ ij ] [ ij] [ ij ] 1 2 3 4 5 [ ij ] [ ij ] [ ij ] [ ij ] [ ij ] [ ij ] [ ij ] [ ij ] [ ij ] 1 T2 T3 T4 5 [ ij ] [ ij ] k { 0,1} S S S S S u 0 T T p 0, i, j, i j Final form: Mixed-integer quadratic program (MIQP) Can be solved efficiently using CPLEX 34
Complexity umber of binary variables: nm [] i B 2( n 1), order of each ( ) 2 y Y u 35
Complexity umber of binary variables: nm [] i B 2 ( n 1), order of each ( ) 2 y Y u 36
Complexity umber of binary variables: nm [] i B 2 ( n 1), order of each ( ) 2 y Y u Zonotope order reduction Compute a conservative enclosure with fewer generators Large reduction is often possible with very small conservatism Order = 6 Order = 5 Order = 3 Order = 2 37
Complexity umber of binary variables: nm [] i B 2 ( n 1), order of each ( ) 2 y Y u Zonotope order reduction Compute a conservative enclosure with fewer generators Large reduction is often possible with very small conservatism Order reduction significantly reduces MIQP complexity Introduces some conservatism, often very little Maintains the guarantee of diagnosis Pairs elimination Replacement of pairs with hyperplanes Could introduce big conservatism 38
umerical Comparison CPU time vs. horizon length for a 2 model problem (separation of Y i (u) Existing Approach Polytope computations ew Approach Zonotope computations The use of zonotopes leads to a much more efficient algorithm 39
umerical Results 40
umerical Results y 2 y 2 k 1 k 2 y 2 y1 y1 k 3 k 4 y 2 Problem size 2 inputs, 2 states, 2 outputs Faults 5 fault models Reachable sets Disjoint at k=4 CPU time 0.1092 s y1 y1 41
umerical Results (Other example) Problem size 2 inputs, 2 states, 1 outputs Faults 5 fault models Reachable sets Disjoint at k=3 CPU time 0.01 s Input norm 11.52 42
umerical Results (Other example) Separation of Y ( u) Problem size 2 inputs, 2 states, 1 outputs Faults 5 fault models Reachable sets Disjoint at k=2 CPU time 0.36 s Input norm 8.6 43
Faulty DC Motor i( t) Ra / L Ke / L i( t) 1 / L ut () n( t) K / J f / J n( t) 0 y 1 2 () t 1 0 i( t) y ( t) 0 1 n( t) t 1 r 1 Faults Increase of armature resistance Wearing of brush, low brush pressure Opening of coil Short circuit of two commutator bus Coil disconnect from commutator bar Faults reflected in model parameters 6 fault models u i R L K K J a 1 e t Armature voltage Current Resistance Inductance Torque constant Back EMF constant Motor inertia 44
Faulty DC Motor Results Output sets Disjoint at k=9 CPU time 0.065 s y 1 (rad/s) y 2 (amp) 45
Two-tank system Faults Leakage in tank 1 represented by the flow q 1 L Valve V 12 clogged and its throughput is reduced by 50% Leak in tank 2 that increases outflow to 5 times its nominal value 46
Two-tank system 47
Two-tank system 48
Extensions 49
Moving Horizon Input Design Idea: make use of measurements to reduce the time and the cost needed for diagnosis 50
Moving Horizon Input Design Idea: make use of measurements to reduce the time and the cost needed for diagnosis This set is difficult to compute exactly (and is not a zonotope anymore ) H [ i] 1 1 1 X0 (u, y, ) X [] i 1 1 (u ) X [] i m ( y ) 1 51
Moving Horizon Input Design Idea: make use of measurements to reduce the time and the cost needed for diagnosis Outer Approximation! O [ i] 1 1 1 X0 (u, y, ) X [] i 1 1 (u ) X [] i m ( y ) 1 52
Moving Horizon Input Design Idea: make use of measurements to reduce the time and the cost needed for diagnosis Drawback of the approximation There is no guarantee that the new solution will be shorter in time or lower in cost than the shifted one! Outer Approximation! O [ i] 1 1 1 X0 (u, y, ) X [] i 1 1 (u ) X [] i m ( y ) 1 53
Moving Horizon Input Design Idea: make use of measurements to reduce the time and the cost needed for diagnosis Solution To provide guarantees compare always the new input sequence with the shifted one and choose the best one! Outer Approximation! O [ i] 1 1 1 X0 (u, y, ) X [] i 1 1 (u ) X [] i m ( y ) 1 54
Explicit Moving Horizon Design + Fast online computation (suitable for fast processes!) - Weaker set-valued observer One map for each combination of models! 55
Stochastic Deterministic Keep the deterministic guarantees while maximizing the probability of early termination Uniform distributions with finite support What is the probability that if model i is correct I will get measurements consistent only with model i? [] i Y ( u) [ j Y ] ( u) 56
Stochastic Deterministic Keep the deterministic guarantees while maximizing the probability of early termination Uniform distributions with finite support What is the probability that if model i is correct I will get measurements consistent only with model i? [] i Y ( u) [ j Y ] ( u) Maximize 57
Stochastic Deterministic Keep the deterministic guarantees while maximizing the probability of early termination Uniform distributions with finite support 58
Stochastic Deterministic Keep the deterministic guarantees while maximizing the probability of early termination Uniform distributions with finite support Extension to non-uniform distributions with scenario approach (work in progress) 59
Closed-loop control diagnosis Process Monitoring input: u k Controller disturbance: wk Process output: y k noise: v k 60
With fault tolerant MPC 61
With fault tolerant MPC 62
With fault tolerant MPC Extension to stochastic MPC (work in progress) 63
Conclusions Active fault diagnosis Design input to improve diagnosability of faults Faster, more reliable diagnosis Input design problem for guaranteed fault diagnosis Input separates the possible outputs of each pair of models Difficult nonconvex program Proposed solution method Use zonotopes for reachability computations Zonotope structure leads to reformulation as an MIQP Complexity controlled by zonotope order reduction Much more efficient than existing methods Capable of handling several fault models simultaneously 64
Conclusions Work in progress Polynomial dynamics on-uniform finite support distributions Future work Distributed active input design for large scale systems 65
References [1] J.K. Scott, R. Findeisen, R.D. Braatz, and D.M. Raimondo. Design of active inputs for set-based fault diagnosis. In Proc. of the American Control Conference, pages 3567 3572, 2013 [2] D.M. Raimondo, R.D. Braatz, and J.K. Scott. Active fault diagnosis using moving horizon input design. In Proc. of the European Control Conference, pages 3131 3136, 2013 [3] J.K. Scott, G.R. Marseglia, L. Magni, R.D. Braatz, and D.M. Raimondo. A hybrid stochasticdeterministic input design method for active fault diagnosis. In Proc. of the 52nd IEEE Conference on Decision and Control, 2013 [4] D.M. Raimondo, G.R. Marseglia, R.D. Braatz, J.K. Scott. Fault-Tolerant Model Predictive Control with Active Fault Isolation, Proc. of the 2 nd International Conference on Control and Fault-Tolerant Systems, 2013 [5] J. K. Scott, R. Findeisen, R. D. Braatz, D. M. Raimondo, Input Design for Guaranteed Fault Diagnosis Using Zonotopes, Automatica, provisionally accepted [6] J.A. Paulson, D.M. Raimondo, R. Findeisen, R.D. Braatz, S. Streif, Active Fault Diagnosis for Uncertain onlinear Systems, ECC 2014, submitted [7] G.R. Marseglia, J.K. Scott, L. Magni, R.D. Braatz, D.M. Raimondo, A Hybrid Stochastic- Deterministic Approach For Active Fault Diagnosis Using Scenario Optimization, IFAC WC 2014, submitted 66