Full text
ADVERTIMENT . La consulta d’aquesta tesi queda condicionada a l’acceptació de les següents condicions d'ús: La difusió d’aquesta tesi per mitjà del servei TDX (www.tesisenxarxa.net) ha estat autoritzada pels titulars dels drets de propietat intel·lectual únicament per a usos privats emmarcats en activitats d’investigació i docència. No s’autoritza la seva reproducció amb finalitats de lucre ni la seva difusió i posada a disposició des d’un lloc aliè al servei TDX. No s’autoritza la presentació del seu contingut en una finestra o marc aliè a TDX (framing). Aquesta reserva de drets afecta tant al resum de presentació de la tesi com als seus continguts. En la utilització o cita de parts de la tesi és obligat indicar el nom de la persona autora. ADVERTENCIA. La consulta de esta tesis queda condicionada a la aceptación de las siguientes condiciones de uso: La difusión de esta tesis por medio del servicio TDR (www.tesisenred.net) ha sido autorizada por los titulares de los derechos de propiedad intelectual únicamente para usos privados enmarcados en actividades de investigación y docencia. No se autoriza su reproducción con finalidades de lucro ni su difusión y puesta a disposición desde un sitio ajeno al servicio TDR. No se autoriza la presentación de su contenido en una ventana o marco ajeno a TDR (framing). Esta reserva de derechos afecta tanto al resumen de presentación de la tesis como a sus contenidos. En la utilización o cita de partes de la tesis es obligado indicar el nombre de la persona autora. WARNING. On having consulted this thesis you’re accepting the following use conditions: Spreading this thesis by the TDX (www.tesisenxarxa.net) service has been authorized by the titular of the intellectual property rights only for private uses placed in investigation and teaching activities. Reproduction with lucrative aims is not authorized neither its spreading and availability from a site foreign to the TDX service. Introducing its content in a window or frame foreign to the TDX service is not authorized (framing). This rights affect to the presentation summary of the thesis as well as to its contents. In the using or citation of parts of the thesis it’s obliged to indicate the name of the author
UNIVERSITAT POLITÈCNICA DE CATALUNYA Doctorate Program: SIGNAL THEORY AND COMMUNICATIONS Ph. D. Thesis A BAYESIAN APPROACH TO ROBUST IDENTIFICATION. APPLICATION TO FAULT DETECTION Rosa Mª Fernández Cantí Supervisors: Ph. D. Vicenç Puig Cayuela and Ph. D. Joaquim Blesa Izquierdo Tutor: Ph. D. José A. Lázaro Villa December 2012
i Abstract In the Control Engineering field, the so-called Robust Identification techniques deal with the problem of obtaining not only a nominal model of the plant, but also an estimate of the uncertainty associated to the nominal model. Such model of uncertainty is typically characterized as a region in the parameter space or as an uncertainty band around the frequency response of the nominal model. Uncertainty models have been widely used in the design of robust controllers and, recently, their use in model-based fault detection procedures is increasing. In this later case, consistency between new measurements and the uncertainty region is checked. When an inconsistency is found, the existence of a fault is decided. There exist two main approaches to the modeling of model uncertainty: the deterministic/worst case methods and the stochastic/probabilistic methods. At present, there are a number of different methods, e.g., model error modeling, set-membership identification and non-stationary stochastic embedding. In this dissertation we summarize the main procedures and illustrate their results by means of several examples of the literature. As contribution we propose a Bayesian methodology to solve the robust identification problem. The approach is highly unifying since many robust identification techniques can be interpreted as particular cases of the Bayesian framework. Also, the methodology can deal with non-linear structures such as the ones derived from the use of observers. The obtained Bayesian uncertainty models are used to detect faults in a quadruple-tank process and in a three-bladed wind turbine. Keywords: Robust Identification Bayesian Modeling Fault Detection Set-membership Identification
iii A la memòria del meu pare Josep Fernández López i del profesor Jaume Herranz Luis
v Acknowledgment Aquesta tesi no hauria estat possible sense l’ajut de diverses persones a les quals, des d’aquí, vull expressar el meu agraïment. En primer lloc vull donar les gràcies als meus directors, Vicenç Puig i Joaquim Blesa, per haver acceptat dirigir-me-la i per haver-me ajudat a enllestir-la. Les reunions de treball han estat molt profitoses (crec que amb les idees que han anat sorgint tindrem feina per a anys!) i els ànims que m’han transmès són els que m’han permès tirar-la endavant. També vull donar les gràcies al meu tutor, Jose Antonio Lázaro, per la confiança que ha dipositat en mi i els bons consells que m’ha donat. Però sobretot vull tenir un record per al meu primer director de tesi, el professor Jaume Herranz Luis. M’agrada pensar que aquesta tesi, la última que va dirigir i que no va arribar a veure acabada, porta la seva emprenta tant com per la redacció com per la manera de treballar i enfocar la temàtica. També vull mencionar al professor José M. Miguel, gràcies al qual vaig poder reemprendre el treball i posar ordre a tota la feina que havia fet fins aleshores i qui em va ajudar a mirar-me la tesi com a contribució pràctica i útil per a la societat. Tots dos professors, Herranz i Miguel, representen un model d’Universitat que tant de bo sobrevisqui a tots els canvis dels nostres dies. També vull donar les gràcies a la secretària de doctorat del meu departament, Beni Vázquez, per la seva amabilitat i excel·lent tracte i les continues facilitats amb la paperassa al llarg d’aquests anys. Finalment, vull donar les gràcies a la meva família, en especial a la meva mare i al Ramón, pel seu suport incondicional i per la seva ajuda. Si hi ha algú que ha patit els inconvenients d’aquest treball interminable han estat ells. Desgraciadament el meu pare ja no podrà veure el resultat de tanta feinada, però m’agrada pensar que allà on sigui ara estarà orgullós de mi. Moltes gràcies a tots.
xiii Notation and symbols General: * superscript * denotes complex conjugate Kronecker delta function with 1 for and 0 for . field of real numbers field of complex numbers ℓ linear space of p-norm bounded sequences (ℓ: magnitudesummable sequences, ℓ: square-summable sequences, ℓ: magnitude-bounded sequences. Hardy space (of rational stable transfer functions) Common variables: , k discrete-time variable (k is used for fault detection) forward shift operator, dimension of the parameter vector N data set length error bound in set-membership techniques System identification: , ,…, excitation signal (samples, matrix notation) , ,…, response signal (samples, matrix notation) , ,…, additive measurement noise signal (samples, matrix notation) , ,…, residuals (samples, matrix notation) , variance of the measurement noise parameter vector “true” parameter vector optimal estimate for the parameter vector from N samples identification error, regression (row) vector, , design matrix, …
xiv precision matrix, covariance matrix, (orthonormal) basis functions, ,∑ , experiment operator (for N samples) | likelihood function | log-likelihood function Models and model sets: model class , model (discrete-time transfer function, parameterized by ) nominal model, , “true” model error model Bayesian credible model set Bayesian credible parameter set Bayesian credible frequency response region Bayesian credible value set Probability and statistics: . expectation . variance , normal (Gaussian) probability distribution ~, random variable X is distributed as , chi-squared probability distribution with d degrees of freedom , uniform probability distribution Pr probability of event probability density function (if the random variable X is continuous) or probability mass function (if X is discrete) Bayesian decision theory | posterior probability distribution of model G conditioned to the observations y prior probability distribution for model G prior probability distribution for the measurement noise v | likelihood function of the observations y conditioned to G critical level for the posterior distribution, 1001% is the credibility level , , prior precision matrix, prior covariance matrix and prior parameter vector , , posterior precision matrix, posterior covariance matrix and posterior parameter vector utility function for experiment design , null hypothesis, alternative hypothesis
15 CHAPTER 1 Introduction This thesis presents a Bayesian approach to the robust identification problem. In the present chapter we summarize the main features of this problem and its applications. 1.1 Motivation 1.1.1 Model uncertainty This thesis deals with the problem of modeling model uncertainty. All models are uncertain since they are “only” models, that is, partial representations of reality. Causes of uncertainty: The causes of the model uncertainty are twofold: practical and theoretical. The practical issues include the quality of measurement instruments, the effect of operating points, aging, tolerance of components, and so on. The theoretical causes include the lack of knowledge, the difficulty of modeling and the model simplification. The latter is very common in the Control Engineering field since, even if we can produce a good and detailed model of the plant behavior, we always prefer to use simplified versions in order to get controllers of low complexity. This way, all the “undesirable” characteristics (as high frequency poles, smooth nonlinearities, and so on) are treated as uncertainty of the former nominal model. Characterization of model uncertainty: An uncertain model can be represented by means of a model set. Given a physical plant, we can obtain several models of its dynamical behavior. The model set contains all these models. In particular, it includes
16 Introduction the nominal model that is to be used in the controller design. But it can include much more complicated models containing the dynamics that have been neglected in the nominal model. And, in the hypothetical case that a “true”, perfect model exists, this model has to be included in the model set as well. Fig. 1.1. Model set Types of uncertainty models: There exist two main approaches to analytically describe the model set. We can speak of parametric (structured) uncertainty and dynamic (unstructured) uncertainty. In the parametric case we assume that the model structure is correct and that the only source of error is in the values of the parameters, e. g., :1 1, (1) This type of uncertainty leads to uncertainty regions in the parameter space. By contrast, in the dynamic case we assume that the nominal model is not able to completely describe the plant dynamics and hence a (dynamical) model error term has to be included. If the error model is added to the nominal model, we obtain an additive (absolute) description of the uncertainty, :Δ (2) And if the error term is multiplying the nominal model, we speak of multiplicative (relative) uncertainty, :1Δ (3)
Introduction 17 The dynamic uncertainty leads to uncertainty regions in the frequency domain (uncertainty bands around the Bode plots, or frequency-to-frequency uncertainty regions on the Nyquist and Nichols planes). Application of uncertainty models: Uncertainty models have been widely used in the design of robust controllers but, recently, their use in model-based fault detection techniques is increasing. Let us summarize the main features of these two application fields. 1.1.2 Application to robust control Robust control techniques: A robust controller is a controller that provides stability and performance to all the models that are inside the model set, and not only to the nominal model. Actually, the “robustness” property refers to robustness in front to the model uncertainties. In the last decades, most works on robust control theory have placed the emphasis on the controller synthesis procedures, and as a result of these efforts current algorithms are quite efficient and reliable (Skogestad and Postlethwaite, 1996), (Sánchez Peña and Sznaier, 1998), (Zhou with Doyle, 1998), (Houpis, et al., 2006), (Chiang et al., 2007). Robust control techniques consist of two stages: The formulation stage, which includes the selection of the control system specifications and the plant modeling (nominal model with uncertainty bounds); and the solution stage, which is the controller synthesis procedure/algorithm. Importance of the formulation stage: It turns out that the formulation stage is more critical than the solution stage. In fact, even the best synthesis algorithm may fail, or lead to a useless design, for hard design trade-offs or for plants that are not well characterized. An example of this is the so-called “spill-over effect” which consists in the degradation of the controller performance due to the excitation of unmodeled dynamics. This is a phenomenon typical of lightly damped flexible structures which are distributed parameters systems and thus have infinite dimensional analytic models (Balas, 1982). In these applications, it is very important to derive not only a good, reduced order nominal model but also good uncertainty bands. Not so dramatic, a much more common situation is that too pessimistic quantifications of model uncertainty yield to designs where the control system performance is penalized in order to attain a large robustness degree that is actually not necessary. Finally, the appropriate uncertainty characterization is also an important issue in the formulation stage since it allows establishing high performance yet realistic specifications on the basis of the design trade-offs and performance limits (Seron, Braslavsky, and Goodwin, 1997).
18 Introduction Robust identification problem: The problem of obtaining uncertainty models is known as the “robust identification problem”. This is a short version of the original name “robust control-oriented identification”, which indicates that this research field was initiated for use in the robust control techniques ( and ℓ). Several seminal works are (Helmicki, Jacobson, and Nett,1991), (Milanese and Vicino, 1991) and (Gu and Khargonekar, 1992). 1.1.3 Application to fault detection Fault detection: In Control Engineering, a fault is an undesirable deviation from the normal operation of at least one system property or parameter. The consequence of a fault is the degradation of the system performance and in some cases it may be catastrophic for the system or human operators. The purpose of the two fields known as Fault Detection and Isolation (FDI) and Fault Diagnosis is to detect, isolate and identify the faults affecting the system. Model-free and model-based approaches: FDI can be accomplished by a model-free approach or by a model-based approach. The model-free approach includes techniques such as the introduction of sensor redundancy, the use of special sensors, and the application of spectrum and statistical analysis tools (Zanardelli et al., 2007), (Tharrault et al., 2009). On the other hand, the model-based approach relies on the concept of analytical redundancy, i.e., the consistency between the measurements of the physical system and the information contained in a model is checked. The resulting differences are called the residuals. A fault is detected/decided when a residual is greater than a given threshold or when an estimated parameter abnormally deviates. Uncertainty and false alarms: To avoid false alarms, the model-based fault detection system must be robust, i.e., it must be sensitive only to faults, even in the presence of model uncertainty. However, since a model is only an approximate representation of reality, residuals may be nonzero even in the absence of faults. These modeling errors should not be detected as faults. To solve this problem active and passive methods have been developed. Active and passive methods: Active methods aim to generate residuals that are insensitive to uncertainty but not to faults. Main methods include the use of unknown input observers, eigenstructure assignment and structured parity equations. See the books of (Chen and Patton, 1999), (Blanke et al., 2003) and (Ding, 2008) for a survey. Passive methods use robust identification techniques to describe the fault-free uncertain system. The uncertainty is characterized by bounded regions, in the parameter space or in the state space, that are consistent with the measurements. When a new measurement
Introduction 19 is inconsistent with the uncertainty set, a fault is decided. The major drawback of this approach is that the fault will be not detected if it enters inside the bounded region, thus the importance to derive tight uncertainty regions. Passive robust model based methods: The passive robust model-based approach has received a lot of attention in the last years. Main methods include the use of the bounding approach in the parity space (Ploix and Adrot, 2006), the development of new set-membership techniques (Blesa, 2011a), and the use of diagnostic interval observers (Puig et al., 2008), (Raïssi et al., 2010). Some of these methods can deal with nonlinear systems, e.g., on the basis of subpaving algorithms or multimodel approaches (Letellier et al., 2011). Most passive methods use deterministic regions, but recently probabilistic credible regions are receiving attention; see e.g. (Jaulin, 2010). 1.1.4 Main approaches to robust identification Deterministic/worst case methods and stochastic/probabilistic methods constitute the main solutions to the robust identification problem. Current research in both approaches is mainly focused in improving the performance of the identification algorithms and in obtaining tighter uncertainty bands. Chapter 2 explains in detail the deterministic and stochastic approaches, but here we list the main techniques. Stochastic methods: Stochastic methods, such as the non-stationary stochastic embedding (NSSE) (Goodwin et al., 2002) and the stochastic versions of the model error modeling (MEM) approach such as the ones based in prediction error methods (PEM) (Reinelt et al., 2002), enjoy a low computational load compared to deterministic methods. However, they make little use of possible prior information about the system to be modeled. As a result, the obtained nominal model can be too biased and the associated uncertainty bands may result too pessimistic. Deterministic methods: By contrast, deterministic methods such as the worst case system identification in H (Chen and Gu, 2000) and other methods based on the setmembership identification (SMI) paradigm (Milanese and Taragna, 2005) are computationally intensive but they do consider explicitly any possible prior information about the plant and measurement noise by means the definition of the so-called feasible model set (FMS). 1.1.5 Shortcomings of current robust identification methods Apart from the controversy between the defenders of the deterministic viewpoint and the defenders of the stochastic viewpoint, we have no knowledge about the existence of a conclusive work in favor of an approach or particular method over the others. Also, since robust identification embraces a wide variety of methods and techniques, it is difficult to point out common drawbacks. Moreover many times the identification
20 Introduction procedure is tailored to the particular application. There exist very few works comparing the performance of the different methods and the resulting robust controllers. A relevant one is (Reinelt, Garulli, and Ljung, 2002), where suboptimal SMI, PEM-based MEM, and NSSE methods are compared. The author’s conclusion is that all three methods present very similar performance and results. Other related works are (Esmaeilsabzali et al., 2006), (Herrero, 2006), and (Raafat et al., 2009). In this dissertation, after a study of the existing robust identification literature we have identified the following weak points: Computational load: In general, deterministic methods are computationally intensive compared to stochastic approaches. This is justified by the necessity of considering all possible plant perturbations and it is especially unavoidable when nonlinear structures are considered. However, in many practical cases the trade-off between the computational burden and the final uncertainty region obtained is somehow deceiving. A comparison of the computational cost of several worst case identification algorithms can be found in (Milanese and Taragna, 2005). Size of uncertainty regions: It is clear that the uncertainty bands must be kept small while retaining all relevant plant perturbations. The problem is that the size of the uncertainty regions is very sensitive to the assumptions taken during the modeling procedure. In general, stochastic methods yield smaller bands, which size depends on the chosen probability level (Goodwin, Braslavsky, and Seron, 2002). In SMI approaches uncertainty regions can be tightened by means the introduction of prior knowledge about the plant and noise. In fact, SMI approaches make a more efficient use of prior knowledge than MEM methods, which usually limit their use to the selection of the nominal model order. Reliability of prior knowledge: However, in order to be useful, prior knowledge must be reliable, since the size of the uncertainty regions is very sensitive to it. For instance, a pessimistic choice of the noise bound may produce too much large uncertainty regions. This particular sensitivity problem is considered in (Ninness and Goodwin, 1995). Another example is the selection of the basis functions that are mostly used to define the model structure. Poles of such bases are usually selected after a spectral analysis of the data. If the plant presents resonant modes, the selection of (the number and value) of basis poles is easy. However the selection is not so clear if the modes are real. Methods for pole selection do exist, see e.g. the average modeling error (AME), but they are computationally intensive since they imply computing several models and analyze which one presents better performance (see (Reinelt, Garulli, and Ljung, 2002)). Unfortunately, current methods do not allow knowing if the prior assumptions used are erroneous or not. It has to be said that prior knowledge “checking” is implicitly included in the FMS unfalsification stage, but only grossly erroneous prior assumptions can be detected.
Introduction 21 Control purposes: Another criticism to current methods is related to the control purposes. We feel that many times the obtained models are not as oriented to robust control as they could be. In fact, no information regarding the final control system is considered in the modeling procedure. Most of times, the only requirement is that the nominal model must be of restricted complexity to produce low order robust controllers. It has to be said though that closed loop identification schemes (Van den Hof and Schrama, 1995) and integrated identification-control strategies (Cooley and Lee, 1998) exist to overcome this problem. To our knowledge, none of SMI and MEM existing methods considers the cost of “wrong modeling” when selecting a nominal model nor when obtaining the uncertainty bounds. It is known that an educated selection of the nominal model leads to smaller uncertainty bounds (see e.g. (Skogestad and Postlethwaite, 1996)), therefore it would probably lead to better robust high-performance designs. Since it is clear that in practice many frequencies are more critical than others, it seems reasonable to impose some kind of model penalty at least at such frequencies. An interesting example of the consequences of a “blind” uncertainty modeling can be found in (Onatski and Williams, 2002). Also, some critical papers have appeared (Douma and Van den Hof, 2005), which evidence that the usual models for robust control are much more models for a posteriori robustness analysis (once the control system is designed) than for robust controllers design. 1.1.6 The Bayesian viewpoint The Bayesian solution: To overcome the shortcomings discussed in the previous section, in this thesis we propose a Bayesian methodology for solving the robust identification problem. We think that the Bayesian framework is adequate for the following reasons. From a general viewpoint, Bayesian Confirmation Theory1 is concerned precisely to model building, with strong relations to concepts such as induction/deduction, statistical inference, meaning of probability, and validity of scientific theories. From a particular (robust identification) viewpoint, it allows the formal description of the prior information (or lack of it –prior ignorance), it allows the efficient combination of prior information about the model with experimental information in order to obtain a posterior distribution of how likely the different models are, and it allows the selection of a nominal model on the basis of some minimum risk criteria. 1 Bayesian Science Theory is known as Bayesian Confirmation Theory and it concerns the validation of scientific theories from a Bayesian viewpoint. In the science context, the subject is how to assign probabilities to theories or hypotheses h in the light of the evidence e. Bayes formula tells us how to modify the probability of one hypothesis Pr in order to attain a new and revised probability on the light of any specified evidence Pr|, Pr|Pr| .
22 Introduction To enforce our viewpoint, note that modeling model uncertainty for robust control and/or fault detection is only one particular application of the general problem of uncertainty modeling that arises in any scientific or technical discipline. So, it seems reasonable use the tools that are already developed for other areas, in particular, statistical tools. Quoting (Berger, 2000), who is a convinced Bayesian: “Statistics is about measuring uncertainty, and over 50 years of efforts to prove otherwise have convincingly demonstrated that the only coherent language in which to discuss uncertainty is the Bayesian language” Works regarding Bayesian uncertainty modeling: Recently, there has been a renewed interest for the Bayesian point of view in system identification (Ninness and Henriksen, 2010), (Schön et al., 2011). The topic is not new since early works in system identification already considered the Bayesian parameter estimation (Eykhoff, 1974) and model classification (Peterka, 1981). The Bayesian ideas, although appealing, have largely not been implemented due to the difficulty of computing the integrals involved in the posterior distributions. Recent advances in simulation techniques such as Monte Carlo Markov chains (MCMC) have overcome this situation (Robert and Casella, 1999), (Chen, Shao, and Ibrahim, 2000), (Bolstad, 2010). If fact, we are surprised of the little number of works relating Bayesian modeling with Robust Control, even more when the terminology used in robust identification (a priori information, a posteriori information) directly points out to the Bayesian terminology. This is not the case in the field of Fault Detection and Diagnosis where some recent Bayesian references are (Lee, 2008), (Pernestål, 2009), and (Dearden, 2010). To finish this section, we list some of the Bayesian works in other Engineering areas. For an overview of the activity in the field of Bayesian analysis, see (Berger, 2000) and the references therein. In (Hoeting et al, 1999) it can be found a survey about Bayesian Model Averaging (BMA), which is a technique to reduce the uncertainty inherent in the model selection process. In the field of structures engineering we can refer to the use of Bayesian conjugate distributions (Igusa et al, 2002), model updating (Papadimitriou, Beck, and Katafygiotis, 2001), and model identifiability, (Katafygiotis and Beck, 1998). In the field of reliability analysis, hierchical uncertainty models are used in (Utkin, 2003), risk analysis is treated in (Apeland et al., 2002), and a discussion about evidence vs. Bayes can be found in (Soundappan et al., 2004). In Econometrics, Bayes factors are used in (Cairns, 2000), and an application of the Bayesian estimation is presented in (Onatski and Williams, 2002). Finally, in the Ecology field we can refer to the uncertainty analysis of (Borsuk et al., 2004), the insight about Monte Carlo methods in (Qian et al., 2003), and the use of the Bayesian state space modeling for hydrology in (Cornford, 2004). 1.2 Objectives and scope In this thesis we propose a Bayesian methodology to solve the robust identification problem. The particular objectives are the following:
State of the Art of Robust Identification 29 Probability distribution of the estimation error: Even though the probability distribution of the measurements is not normal, the usual case is that the probability distribution of tends to be normal as the number of samples N tends to infinity. This is a consequence of the application of the Central Limit Theorem to the sum of random variables that constitutes the estimate, see (Ljung, 1999a, p556). Thus, if we assume that a exists, the probability distribution of the parametric error is normal too, ~0,. For the -th component we have ~0,,. The standard normal distribution is obtained by making , ~0,1 Then, by direct application of the definition of the probability distribution, we can write ~1 for one component. Remark: If a random variable X is distributed as 0,1, the random variable is distributed as 1. (Casella and Berger, 2002, p53). Finally, for the d components of the parameter vector the result is ~ where denotes the distribution with degrees of freedom. The last expression allows defining the confidence regions for the estimate. The probability that (14) is , being the probability level of the distribution . The resulting regions are ellipsoids in the space, their shape is determined by and their size by the probability level . For the normal distribution case, i.e. are normal distributed, the confidence regions are exact, otherwise they are only valid asymptotically, for →∞. Example 2.1. PEM uncertainty regions in the parameter space Let us illustrate the computation of the uncertainty regions in the parameter space. Consider the plant in (Ninness and Goodwin, 1995), . We collect 2000 input/output samples obtained by exciting the plant with a square signal of frequency 0.02Hz and d.c. (direct current) level of 0.2V. The measurement
30 State of the Art of Robust Identification noise is uncorrelated to the excitation and it is a Gaussian process with zero mean and variance 0.005. The sampling time is 1. The nominal model, of order 2, is a model based in discrete Laguerre functions , ||1 , 1,2 where the pole is located at exp0.2, corresponding to the continuous time pole at 0.2rad/s. The optimal parameter vector which minimizes the squared prediction error is 0.1060 0.1673 and thus the resulting nominal transfer function is: .. ... Fig. 2.1 shows the nominal parameter vector and the confidence ellipses around it for the 0.5, 0.8 and 0.9 probability levels. Fig. 2.1. Confidence regions in the parameter space Confidence regions of the model frequency response: The uncertainty region in (14) is expressed in the parameter space. If we want robust control oriented models, we need to translate the confidence region to the frequency domain. Let us illustrate the procedure for the model structure in (7), ,∑ . For each frequency point , if we define ≡… , we can write the frequency response of the true system as . The variance of the estimated frequency response is: , ∗ (15) 0.104 0.1045 0.105 0.1055 0.106 0.1065 0.107 0.1075 0.108 0.1085 0.109 0.165 0.1655 0.166 0.1665 0.167 0.1675 0.168 0.1685 0.169 0.1695 0.17 1 2 Confidence regions LSE 90% 80% 50%
State of the Art of Robust Identification 31 where the symbol * means conjugate transpose. Remark: To prove (15) note that the variance is ∗. In order to obtain the equivalent of (14) in the Nyquist plane, we will use the following lemma of (Wahlberg and Ljung, 1992): Lemma 2.1. Let ∈, 0∈ and 1. Then, for ∈, , where ∈ is full rank, the following result is satisfied: 1. In our case, , and Re, Im, Re Im Therefore, the ellipses in the Nyquist plane are defined as: (16) where the -level corresponds to the distribution with 2 degrees of freedom, 2. Example 2.2. PEM uncertainty regions in the Nyquist plane. Consider again the Example 2.1 (Ninness and Goodwin, 1995). Now we have obtained the 90% confidence ellipses for the frequency response of the nominal model. Fig. 2.2 shows in the Nyquist plane the results for a Laguerre model of order 2 and for a Laguerre model of order 8 along with the true system frequency response. (a) (b) Fig. 2.2. True system and nominal model frequency responses. 90% confidence regions for the cases (a) order 2 and (b) order 8 -0.4 -0.2 00.2 0.4 0.6 0.8 11.2 -0.6 -0.5 -0.4 -0.3 -0.2 -0.1 0 0.1 Real Imag True plant and nominal model (Laguerre) of order 2 true nominal Confidence region (90%) -0.4 -0.2 00.2 0.4 0.6 0.8 11.2 -0.6 -0.5 -0.4 -0.3 -0.2 -0.1 0 0.1 Real Imag True plant and nominal model (Laguerre) of order 8 true nominal Confidence region (90%)
32 State of the Art of Robust Identification In the example above we can see two facts. If the nominal model order is too low, the resulting frequency response is so erroneous (biased) than the confidence ellipses are nonsense. On the other hand, if we increase the model order, the model frequency response approaches the true one, but the size of the uncertainty region (variance) increases. These two effects are a consequence of the so-called bias/variance trade-off explained below. 2.1.3 Bias/variance trade-off When estimating plant models from a finite set of experimental data, the estimation error can be decomposed in two error terms: the variance error and the bias error. Variance error: The variance error is due (1) to the measurement noise corrupting the experimental data and (2) to the finite length N of the sample. In a general case, it is uncorrelated to the excitation signal (if the identification is performed in open loop) and it decreases as the number of samples N increases. The variance error affects uniquely to the model parameter values. If we assume that a model presents only variance error, we are assuming that the model structure is capable of completely describe the plant dynamics. This is what classical PEM assume and, therefore, the confidence regions in Fig. 2.2 are only characterizing the variance error. In the case of open loop identification and quadratic cost function, the variance error satisfies lim→lim→ . This expression is usually substituted by the following approximate result (Ljung, 1999a): Φ Φ (17) where is the model order, is the number of experimental data samples used in the estimation, is the estimated nominal model and Φ and Φ are respectively the spectral power densities of the measurement noise v and excitation signal u . Bias error: On the other hand, the bias error characterizes the under-modeling. This is due (1) to the lack of knowledge about the process to be modeled and (2) to the need of using simple models (linear, time invariant, reduced order) for the control design. The bias error can be interpreted as a model too, and its response magnitude and phase vary with frequency. Unlike the variance error, the bias error does strongly depend on the nominal model and the excitation signal used in the identification experiment (thus, the need to adequately design the experiment). In a first stage, the bias error can be reduced by increasing the model order. If the model structure is richer, the model will be able to better describe the process to be modeled. Nevertheless, increasing the model order also increases the variance error. In
State of the Art of Robust Identification 33 other words, one reaches a point where the SNR (signal to noise ratio) of the data is not large enough to accurately estimate the parameters of a high order model. This result is known as the bias/variance trade-off and it is a classical result in the field of system identification, see for instance, (Ljung, 1999a), (Ninness and Goodwin, 1995), (Hakvoort and Van den Hof, 1997), (Ninness and Hjalmarsson, 2003a), (Ninness and Hjamarsson, 2003b). The conclusion is that there exists an optimal model order such as it balances the bias error decrease with the variance error increase and it corresponds to the smaller estimation error. If the data sequence is too short and noisy, the optimal order will be too low (see Example 2.3). As a consequence, the model will be so biased that the confidence intervals corresponding to the variance error will not include the estimation error (this is what happened in the first model in Example 2.2). Example 2.3. Bias/variance trade-off Consider again the plant and experiment of Example 2.1 and Example 2.2 (Ninness and Goodwin, 1995). We have obtained the bias and variance errors for different Laguerre models with orders varying between 1 and 12. To quantify the error we have used the Euclidean norm between the true system and the nominal model. For the bias error we have not considered the measurement noise and for the variance error we have computed the average error for 20 different noise realizations. Results are shown in Fig. 2.3. (a) (b) Fig. 2.3. Bias/variance trade-off. Selection of the order that minimizes the total estimation error Fig. 2.3 illustrates the effect of model order d in the variance error increase and bias error decrease, but it also shows the effect of the data length N . For a given number of samples N, a large d decreases the bias error but increases the variance error, thus increasing the total error. In Fig. 2.3(a), where the data length is short ( N = 100) the variance error increases faster than in Fig. 2.3(b), where the data length is larger ( N = 1000). Thus, a small data length implies a larger total error and a smaller “optimal” order. 0246810 12 0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2 Model order Bias error and variance error (N=100) || G || 2 Total error Bias error Variance error 0246810 12 0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2 Model order Bias error and variance error (N=1000) || G || 2 Total error Bias error Variance error
34 State of the Art of Robust Identification 2.2 Stochastic descriptions for model uncertainty 2.2.1 Model Error Modeling (MEM) In the previous section, we have seen that the classical solution, although very used in system identification, is not suitable for robust identification. The major drawback is that the PE approach does not consider that residuals are due to both the measurement noise (variance error) and the model structure (bias error). Model Error Modeling (MEM) methods overcome this shortcoming. Remark: Here we present a stochastic version of MEM methods. However, the MEM concept is also valid in a deterministic framework. a. Approach The name MEM (Model Error Modeling) refers to a number of methods that aim to obtain a model of the error between the nominal model , and the true system . Hence, the experiment of Equation (4) can be expressed as: , , 1,…, (18) Here, it is assumed that the component in (18) cannot be well described as a realisation of a stationary stochastic process and that it is too much significant to be neglected. In fact, the “size” of the error model is not negligible in most practical situations, especially those in which the order of the nominal model must be small (a typical requirement of robust control design techniques). The uncertainty region for is then computed on the basis of and its confidence regions. This line of work was initiated by (Ljung, 1997) and some remarkable references are (Garulli and Reinelt, 2000) and (Reinelt et al., 2002). b. Identification of the model error Once the nominal model , has been identified, it is possible to evaluate the size of the unmodeled dynamics by means the residual analysis. The residuals are computed as , and the error model can be interpreted as a dynamic system where the input is and the output is . The error model can be identified by any system identification method, for instance by classical identification methods.
State of the Art of Robust Identification 35 An important issue is the selection of the error model structure. It must be flexible enough to reveal bias errors in the nominal model and to detect the frequency regions where the uncertainty is significant, but at the same time its confidence regions must remain small. There exist several choices, e.g., (Ljung, 1999b) uses FIR (Finite Impulse Response) models while (Milanese, 1998) proposes the use of non-parametric models. If the order of the error model is high enough, the remaining error will be basically a variance error and the confidence regions could be computed from the covariance matrix of the parameters. c. Uncertainty bands Once the error model structure has been selected and has been identified, upper and lower error bounds _, _ for the confidence regions of are derived. There exist several ways to combine the bounds _, _ with and to obtain the uncertainty band around . Next example illustrates this point. Example 2.4. MEM uncertainty regions We consider the plant and experiments of (Reinelt et al., 2002). The nominal model is a continuous time fourth order Laguerre-type with the pole located at 0.2895 (for the datasets 1 and 2) and at 0.5737 (for the datasets 3 and 4). Fig. 2.4(a) shows the frequency response magnitude of the nominal model and the linear part of the true model for dataset 1. The error model is chosen as an Output Error model of the form where the polynomial orders are 20, 10, 10 and 20. The polynomial coefficients are computed by means the pem MatlabTM function. Fig. 2.4(b) shows the magnitude of the error model frequency response along with the upper and lower error bounds _, _. These bounds are obtained by respectively adding and subtracting 3 to the error model magnitude, where is the standard deviation of the model error magnitude. (a) (b) Fig. 2.4. (a) Nominal model and linear part of the true model, (b) error model and confidence region 10 -2 10 -1 10 0 10 1 10 2 10 3 -40 -30 -20 -10 0 10 20 30 Magnitude (dB) dataset 1 Frequency (rad/sec) G+F G 0 10 -2 10 -1 10 0 10 1 10 2 -100 -80 -60 -40 -20 0 20 40 60 80 100 Frequency (rad/s) Magnitude (dB) Error model and confidence bands 3 band Ge
36 State of the Art of Robust Identification A direct way to construct the nominal model uncertainty band is to add frequency to frequency the error model to the nominal model, and then simply add and subtract the 3 confidence regions of the error model. Fig. 2.5(a) shows the resulting nonsymmetric region. This solution, although useful for model validation purposes, may lead to the situation where the nominal model is outside its uncertainty band. An alternative is to construct a symmetric band around the nominal that includes the non-symmetric one. This is shown in Fig. 2.5(b) for the dataset 1. (a) (b) Fig. 2.5. Uncertainty bands around the nominal model: (a) nonsymmetric, (b) symmetric 2.2.2 Non Stationary Stochastic Embedding (NSSE) a. Approach The Non-Stationary Stochastic Embedding (NSSE) method (Goodwin, Braslavsky, and Seron, 2002) can be interpreted as a particular case of MEM, where the error model is described as a random variable, in particular, as a realization of a non-stationary stochastic process whose variance grows with frequency. The simplest selection for such a process is a random walk (also called Brownian motion) in the frequency domain, that is, a zero mean process of independent, infinitely divisible Gaussian increments, with (19) The NSSE method takes a multiplicative description for the uncertainty and thus the frequency response of the true system can be expressed as: 10 -2 10 -1 10 0 10 1 10 2 -30 -20 -10 0 10 20 30 Frequency (rad/s) Magnitude (dB) Nonsymmetric uncertainty band unc. band G 0 G 0 +G e G+F 10 -2 10 -1 10 0 10 1 10 2 -40 -30 -20 -10 0 10 20 30 Frequency (rad/s) Magnitude (dB) Symmetric uncertainty band unc. band G 0 G 0 +G e G+F
State of the Art of Robust Identification 37 ,, ,, (20) where the superscripts R and I refer to the real part and imaginary part respectively, and and are two independent processes with parameter . In practical situations, the parameter vector of the error model can be selected equal to the parameter vector of the nominal model . If we linearly parameterize the nominal model as in (7), i.e., by means of the functions , the system frequency response can be expressed as (21) where ,…, and ,…,. As in classical system identification, the uncertainty is described in the Nyquist plane frequency to frequency by ellipses centered at the nominal model and with size and shape determined by the covariance matrix , where is the resulting total modeling error at frequency , . The difference with classical system identification is that the covariance matrix characterizes both the measurement noise (variance error) and the under-modeling (bias error). b. Identification of the nominal model Since the method operates in the frequency domain, the first step is to obtain a point wise estimate of the true frequency response. This is then used to compute the nominal model, i.e. to obtain an estimate for . Excitation signal: In order to obtain a frequency to frequency estimate of the true system frequency response, the excitation must be a multi-sinusoid cos (22) consisting of m sinusoids of frequencies ,…,, not necessarily uniform spaced. This way, the steady state response samples are given by cos sin and the terms and can be obtained by correlation methods (they are the coefficients of the trigonometric series):
38 State of the Art of Robust Identification 2 cos 2 sin True frequency response point estimation: The matrix expression for the point wise estimate of the true system frequency response is then , where …, is the vector containing the time domain steady state response samples and the design matrix is 1cos11 1sin11 1cos121 1sin121⋯ sin ⋯ sin2 ⋮⋮ 1cos11 1sin11⋱⋮ ⋯ sin The expression of is simplified if the frequencies are selected such that the m sinusoids are orthogonal in any interval of length . In this case, is a diagonal matrix, diag,,…, , . Nominal model estimation: The parameters of the nominal model can be estimated from in a least squares sense, where and ,,…,,. c. Quantification of the total modeling error The resulting total modeling error at any frequency is , where , , and . And the covariance matrix presents two terms, one due to the measurement noise and the other due to the random process that characterizes the under-modeling, (23) where diag2
State of the Art of Robust Identification 45 corresponding to the case 0.6. Fig. 2.10(b) shows the final ellipse obtained at the 35th iteration. The FPS is effectively inside this final ellipsoid. c. Nominal model selection In the worst case setting, feasible region bounds are hard bounds, that is, every parameter outside such a region is not consistent with actual data and should be discarded. Moreover, all models inside the hard-bounded feasible region are equally probable to occur. In this context a practical selection for the nominal model is the center of the FPS, Projection estimate: Define the worst-case ℓ error as sup∈. Then, the central optimal estimate is given by argmin. However, for the case ∈, 1, it cannot be guaranteed that the estimate is consistent with the FPS (Akçay, Hjalmarsson, and Ljung, 1996). A suboptimal choice is obtained by minimizing the worst-case prediction error argmin sup ..|| (31) This corresponds to a prediction error method in the ℓ norm, or equivalently, to finding the minimum for which the resulting FPS is nonempty. This estimate is usually addressed as Projection Estimate in the set-membership literature (Milanese and Vicino, 1991) or Chebyshev Estimate in a statistical context (Akçay, Hjalmarsson, and Ljung, 1996), and it does enjoy the useful property of being always feasible, that is, ∈FPS. Restricted projection estimate: The optimization problem proposed in (31) is a too complicated min-max problem to deal with. Fortunately, if the noise is ℓ-norm bounded, the FPS will form a polytope in and it is possible to use an approximation known as the Restricted Projection Estimate (Garulli, Vicino, and Zappa, 2000), which involves estimating the suboptimal parameter vector, with limited computational effort, by linear programming arginf ∈ (32) This approximation enjoys some nice properties. It does not depend on the actual value of the noise bound . And it also equals the maximum likelihood estimate when assuming that the innovations present symmetric, uniform distribution, with unknown bound.
46 State of the Art of Robust Identification Linear programming solution: The restricted projection estimate (32) can be solved by linear programming. The aim is to find such that in || is minimal. An alternative expression is . And this, in turn, is equivalent to the following two equations, , . In matrix notation, where is a column vector of 1’s. The problem can be solved either in time and frequency domain, provided the particular definition of and (see previous sections). In both cases, we can use the Matlab function x=linprog(f,A,b) which solves the following optimization problem min subject to Thus we can solve our problem by defining 1 where is a d component row vector of 0’s, , , and . Example 2.9. Nominal model by restricted projection estimate The restricted projection estimate has been computed for the plant of (Goodwin et al., 2002) and the obtained nominal model is shown in Fig. 2.11. The results are compared to the true plant and to the model obtained by least squares estimation. Also, results for time domain data (Fig. 2.11(a)) and frequency domain data (Fig. 2.11(b)) are compared. (a) (b) Fig. 2.11. Restricted projection estimate, for (a) time domain data and (b) frequency domain data 2.3.2 Worst case system identification in ∞ 10 -2 10 -1 10 0 -5 0 5 10 15 Magnitude (dB) Time domain identification Frequency (rad/sec) True plant LSE RPE 10 -2 10 -1 10 0 -5 0 5 10 15 Magnitude (dB) Frequency domain identification Frequency (rad/sec) True plant LSE RPE
State of the Art of Robust Identification 47 a. Feasible Model Set The Feasible Model Set (FMS) can be viewed as an extension of the FPS and it is more general since it contains models, not only parameter values. The name FMS is not standard, in particular it is addressed as “feasible systems set” (Milanese and Taragna, 2005), as “unfalsified systems set” (Hjalmarsson, 2005), and even as “consistency set” (Mazzaro, Parrilo, and Sánchez Peña, 2004). To construct the FMS one has to consider both a priori information and a posteriori information. The a priori information consists of the assumptions on the system dynamics (model class ) and the assumptions on the measurement noise (noise class ). Model class and noise class are combined to build the so-called Candidate Model Set (CMS). The a posteriori information consists of the measurement data , obtained by means one experiment over the system. The combination of the CMS and the measurements leads to the FMS, FMS∈:|,|∈ ,0,…,1 (33) Let us illustrate the construction of the FMS. For instance, a typical assumption on is that the system is “exponentially stable”, that is, the impulse response satisfies the following restriction: ||,0,1,2,…, with 0 and 1. The model class can be expressed as ∈:||,0,1,∀0, where is the space of all functions F analytic in the open unit disk ∈:||1 and bounded in the norm ‖‖≡sup∈||∞. Remark: In robust identification it is usual to define the z-transform in terms of z k (instead of z ‐k ). Therefore causal stable systems G z are analytic inside the unit circle. This is useful because there exist many identification and interpolation techniques on functions analytic in the unit disk. Some authors call it the -transform (Chen and Gu, 2000). Regarding the disturbance class N, additive measurement noise is usually assumed to be bounded in magnitude, i.e., ||, 0,…,1. Thus, ∈ :‖‖. Here we have considered ℓ-bounded noise but other bounding criteria can be used. Of course, much more complex choices for G and N are possible. The combination of and N with the actual measurements ,…,, ,…, leads to FMS∈:‖,‖. b. Formulation of the Robust Identification problem in Robust Identification first appeared to be used in Robust Control techniques, especially in synthesis methods. See a survey in (Chen an Gu, 2000). In this context, the formulation of the robust identification problem in is the following: Given: (i) The plant a priori information in the form of a set such that ∈⊂, (ii) the noise a priori information via a constant 0 such that ∈⊂ℓ, and
48 State of the Art of Robust Identification (iii) the experimental a posteriori information obtained via the experiment operator :ℓ⟼ℓ defined by ,, 0..1, where is the number of samples. Find: An identification algorithm such that it maps the a priori information and the a posteriori information data to an identified nominal model, ≡,, and that the worst case identification error ,,≡ sup ∈ ∈ ‖ ,‖ (34) converges in the sense that lim→ →,,0. In addition, derive explicit bounds on ,,. The original formulation has been extended by many authors in order to include time domain data, frequency domain data and mixed time domain/frequency domain data, and in order to produce models with a parametric part and a nonparametric part. See (Mazzaro, Parrilo, and Sánchez Peña, 2004) for a benchmark example with these extensions. c. Types of algorithms The problem formulation of the previous section leads to different types of identification algorithms. An identification algorithm is just a rule that delivers a nominal model on the basis of the available information (FMS) and particular specifications for the nominal model (structure, order…). We speak of conditional algorithms when restrictions on the nominal model are posed. Also, an identification algorithm is said to be linear if it is a linear function of the a posteriori data, otherwise it is said to be non-linear. It is said to be untuned if it does not depend on a priori information about the plant and the measurement noise; otherwise it is said to be tuned. Linear algorithms: Linear algorithms operate linearly on experimental data. They are simple and require low computational effort. However their usefulness in robust identification is limited. Untuned linear algorithms are developed using polynomial approximation techniques, and are shown to be divergent in the worst-case. Tuned linear algorithms, on the other hand, are convergent but not robustly convergent, and are constructed based on least squares optimization. But this diverges on the worst-case.
State of the Art of Robust Identification 49 Two stage nonlinear algorithms: Non-linear algorithms have been developed to overcome the robust convergence limitations of linear algorithms. In the case of frequency domain measurements, a basic technique consists of two steps: 1) Find a trigonometric polynomial T (i.e. a polynomial in z and 1/ z ) that models the data closely. 2) Given T , find the rational function in the disc algebra F that minimizes ‖ ‖ over the unit circle. This second stage involves solving the Nehari’s problem. See (Chen and Gu, 2000) for details. Two stage non-linear algorithms present better properties than linear algorithms. However, they produce approximate models of excessive order and there is no guarantee for the identified model to belong to FMS. Interpolatory algorithms: Interpolatory algorithms always yield nominal models belonging to FMS, see e.g. (Milanese and Taragna, 2002) and (Parrilo et al., 1999). In general, a two-step procedure is carried out: 1) Validation of the FMS. 2) Identification of a model belonging to FMS by means of nonlinear interpolation techniques. (Parrilo et al., 1999) propose an interpolatory algorithm with direct application to robust control design since the resulting model is presented in terms of a Linear Fractional Transformation (LFT) parameterized by a free function Q . Thus, this method is very close to the robust control issues. For another example of interpolatory algorithm, consider the nearly optimal algorithm of (Milanese and Taragna, 2002). The algorithm relies on the value set approximation (the value set is defined as the mapping of the FMS to the Nyquist plane). The procedure is as follows: For any frequency, the first step is to compute the inner and outer approximations and of the value set and to compute their centers. Then, on the basis of the value sets centers, a nearly optimal (usually FIR) model of order d is obtained. The identification error is minimized in two steps: (1) For given , compute a reduced model by Hankel norm approximation methods, and (2) using as starting point, perform the nonlinear optimization argmin in order to obtain the model that minimizes the identification error. Finally, the order is selected by evaluating the optimality level of and choosing the order by trading off between model set complexity and achievable optimality level. The final identified model set is given by ∆:‖∆‖.
50 State of the Art of Robust Identification Example 2.10. Value set computation Fig. 2.12 shows the key step of the procedure described above which consists of the value set approximation. Results are given for the same example of (Milanese and Taragna, 2002). Fig. 2.12(a) gives the detail for the value set corresponding to the point /1024, 5, while Fig. 2.12(b) shows the true frequency response along with the value sets for 208,224,240. All polytopes have been computed with 16 vertices and assuming model order 130. Fig. 2.12. Set value approximation in the nearly optimal algorithm: (a) Value set for k=5, (b) Value sets for k=208, 224, 240 and true frequency response This method is intensive computationally since the computation of each polytope involves as much optimization steps (via the MatlabR linprog function) as number of vertices. 2.4 Summary and conclusion We have summarized the main features of classical system identification and robust identification. The major drawback of classical system identification is that it only characterizes properly the model uncertainty due to the variance error. Robust identification methods, both stochastic and deterministic, overcome this problem by explicitly assuming that the model uncertainty is due to the variance error (measurement noise and data length) and to the bias error (under-modeling). Stochastic methods use a probabilistic description of the errors and thus lead to probabilistic uncertainty regions. Deterministic methods rely on the concept of unknown but bounded errors and thus lead to hard bounded uncertainty regions. 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 -0.4 -0.3 -0.2 -0.1 0 0.1 0.2 0.3 Imag Real Value set (inner and outer polytopes) for k =k /1040, k=5 -0.8 -0.6 -0.4 -0.2 00.2 0.4 0.6 -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 True plant and value sets for k =k /1040, k=208,224,240 Imag Real
51 CHAPTER 3 Bayesian Approach to Robust Identification In this chapter, we define and characterize the Bayesian Credible Model Set (BCMS). The BCMS serves as a basis for the formulation of the Bayesian Robust Identification problem. The construction of the BCMS in the parametric case and in the frequency domain is illustrated. It is explained how to obtain the credible regions that constitute the uncertainty modeling in the Bayesian framework, and connections to the existing deterministic and stochastic robust identification methods are shown. 3.1 Bayesian Credible Model Set One of the key ideas of the present thesis is to define a probabilistic model set containing all candidate models (a priori information) consistent with measurement data (a posteriori information). We call such a set the Bayesian Credible Model Set (BCMS) and we define it in terms of model posterior probability distributions. 3.1.1 Definition and main features Definition 3.1. The Bayesian Credible Model Set (BCMS) is the set ≡∈ : | (35) that contains all the models belonging to a model space whose posterior probability distribution conditioned to measurement data, |, is higher than a given critical value where 1001% is the desired credibility level.
52 Bayesian Approach to Robust Identification About the term “credible”: The set is inspired in the Feasible Model Set (FMS) of deterministic methods (see Chapter 2). “Feasible” is a term from the information based complexity theory, which is the origin of worst case set-membership identification methods. Since the underlying theory in the present approach is the Bayesian estimation theory, we rather use the term “credible”. Prior and posterior distributions: As in the FMS, the set combines a priori information with a posteriori information. In the FMS the a priori information is contained in the candidate model set (CMS) which consists of a noise class and a model class. In the set , these two classes are defined by means the prior probability distributions of the noise and of the model . The measurement data , i.e. the a posteriori information, is introduced into the credible set by means the likelihood function of the observations conditioned to the model , |. Given the model , this likelihood presents the same probability distribution as the noise, i.e., |≡|. The posterior distribution | of the model conditioned to the observations is obtained by the application of the Bayes’ rule, |, | | (36) where is the model prior distribution, , is the joint distribution of model and measurements, and the factor is just a normalizing constant. Finally, we have |∝|∙ (37) where the prior distribution contains the information about the plant before the data is obtained while the posterior distribution | contains the information about the plant updated by the measurements . Time domain and frequency domain data: Equation (35) is expressed in terms of time domain data ,…,, but it can accommodate frequency domain data ,…, and mixed time domain/frequency domain data as well. Stochastic nature: The set is a stochastic characterization of the model set which is consistent with the measurements at hand. The set can be viewed as an extension of the probabilistic likelihood-based regions of classical system identification (see Chapter 2) but it goes a step ahead in the sense that it allows the entry of prior knowledge. The appropriate choice of the prior may reduce the bias error and thus yield smaller uncertainty regions.
Bayesian Approach to Robust Identification 53 Consistency tests: The Bayesian viewpoint allows updating/correcting the prior beliefs. A grossly erroneous may be detected once the data is collected because, in such a situation, the resulting likelihood of the observations is far from . Also posterior distributions yielding disjoint credible regions may provide useful information about the consistency between the model and the measurements. This feature is useful in model (in)validation or fault detection procedures where one has to make a decision on the basis of the consistency between model distributions and likelihood of the observations. Iteration: The possibility of iteration is another advantage of this approach. The posterior distribution obtained by an experiment | can be used as the prior distribution for a new experiment. In SMI, it is well known that making more experiments may reduce the size of the FMS. The Bayesian approach implements this process in a formal way. Principle of stable estimation: The principle of stable estimation or precise measurement (Edwards, Lindman, and Savage, 1963), (Peterka, 1981), states that, in the case of large or medium length of observation data set (say for N of order of several tens or more), if the data do contain information about the unknown system, and if the likelihood function is well peaked, then even a rather drastic modification of the prior distribution does not significantly change the posterior distribution. Moreover (Berger, 1985) shows that in situations of stable estimation, the posterior can be approximated by a normal distribution. However, it has to be said that the principle of stable estimation is not a generally valid principle. It applies only when data really carry the information about the parameters which are to be estimated. It does not apply in the cases of redundant, non-identifiable or weakly identifiable parameters. The practical implication of the principle of stable estimation is that one does not need to worry too much about the choice of the prior distribution and that any prior distribution which is flat relatively to the likelihood function is good enough. Next example (Eykhoff, 1974) illustrates how the Bayesian estimate effectively converges to the unknown true value when the principle of stable estimation applies. Example 3.1. Bayesian point estimation of a single parameter Consider that we want to obtain an estimate for a single parameter which “unknown” true value is 5. Suppose that we perform 10 measurements of the parameter. We can express the generation of these measurement data by means the following linear regression model, , 1,…,
54 Bayesian Approach to Robust Identification where the excitation is taken as 1,∀. Regarding the measurement noise , we assume that its probability distribution is standard normal, ~0,1 and statistically independent of . We also assume that it is stationary, that is, that the distribution does not change with time. Note that, for a fixed value of the parameter , the likelihood of the observation y, |, presents the same probability distribution than the measurement noise, since |. Before making any measurement, we can make a guess about the parameter value. For example, we think the value can be 2. But we are not too much convinced about this, so we recognise a standard deviation of, say, 4. The more uncertain we are the greater will be the assumed deviation. So, let us suppose that our prior knowledge about the parameter is normal distributed as ~2,4. Fig. 3.1(a) shows the joint prior distribution ,,, where is the parameter subjective prior distribution. (a) (b) Fig. 3.1. (a) Prior joint distribution of noise and parameter, (b) contour plot and first measurement Suppose now that the first measurement gives the value 5.8810. The posterior distribution obtained by means Bayes’ rule (36) can be viewed as a “cut” through the prior joint distribution given by the line 5.8810. Note that the line corresponding to the parameter prior distribution was 0 (see Fig. 3.1(b)). Fig. 3.2(a) shows how this single measurement has improved a lot both our knowledge and certainty feeling about the unknown parameter. Finally, suppose that we now use this posterior distribution as prior distribution before taking the second measurement and repeat the procedure for the N measurements. Fig. 3.2(b) shows the improvement as long as new measurements have entered to the model. At each iteration of Bayes’ rule, the last posterior distribution obtained served as the new prior distribution. -10 -5 0510 -10 -5 0 5 10 0 0.01 0.02 0.03 0.04 joint prior p( ,v) v v joint prior p ,v ( ,v) and first measurement -10 -8 -6 -4 -2 0 2 4 6 8 10 -10 -8 -6 -4 -2 0 2 4 6 8 10 joint p ,v ( ,v) v=0 v=y(1)- *u(1)
Bayesian Approach to Robust Identification 61 Proof: The application of the Bayes’ rule implies the product |,∝|,, where |,1 2/exp1 2 1 2/||exp1 2 One the one hand we have: The sum is: Defining , we have Now, note that since Finally |,∝exp1 2 Note the influence of the prior distribution: if the prior precision matrix were zero (that is, infinite prior covariance , i.e., no prior knowledge at all), the results
62 Bayesian Approach to Robust Identification coincide with the ones of the maximum likelihood estimate (least squares estimate) of the classical system identification presented in Chapter 2. |,~ ,| (49) Also, in a general case, if the number of samples N is small the prior precision matrix will dominate in the posterior precision matrix, . As the number of samples N increases, the experimental precision matrix will dominate in the posterior precision matrix. Finally, the posterior distribution |, is the joint distribution of all the parameters ,1... If we want to compute the marginal distribution of a particular parameter , we need to solve the following integral, |,|,,...,,,..., (50) 3.2.3 Credible regions in the parameter space a. Highest Posterior Density (HPD) regions Once we have defined the posterior distribution |,, we need to select a critical value to bound the Bayesian Credible Model Set and thus define the uncertainty (credible) region. This region will contain all the values of such that | where 1001% is the desired credibility level. Selection of the credibility level: If the desired credibility level is 95% (0.05), the “cut” value c corresponds to the region in the support of the posterior | for which the probability content is the 95% of the total, i.e., the integral value of | in such credible region is the 95% of the integral value of | in the whole parameter space. The threshold must be selected such that there is a small probability that the “true” model may be falsified but not so small that could contain models with extremely low probability to occur. HPD region vs. classical confidence region: Fig. 3.3 illustrates the difference between the classical computation of confidence regions and HPD regions. In general, the HPD region is not symmetric about a Bayes point estimator and it is not invariant under transformations, unless the transformation is linear (Box and Tiao, 1973).
Bayesian Approach to Robust Identification 63 Fig. 3.3. HPD credible interval vs. classical confidence interval (for a posterior given by a Gamma distribution of shape parameter 14 and scale parameter 0.05) The construction and interpretation of Bayesian credible sets is more straightforward than that of classical confidence sets. But as (Casella and Berger, 2002) point out, nothing comes free. The ease of construction comes because Bayesian models require more assumptions than classical models (definition of prior distributions, for instance). HPD is optimal in the sense that it gives the smallest region for a given credible probability. In general, HPD regions are smaller than classical confidence regions. And it may happen that a HPD credible set consists of several disjoint intervals. This is a useful situation in model validation and fault detection procedures, since disjoint regions indicate inconsistency, e.g., situations where the prior model says one thing and the data another. Computation of the HPD region in the normal case: One approximation to the computation of HPD credible sets is to consider that the posterior is approximately normal. This assumption is reasonable for large sample sizes and even for small number of samples if the likelihood is normal and the stable estimation principle applies. For the scalar case, if the posterior | can be approximated by ,, then the approximate 1001% HPD credible interval is ∙, ∙ (51) where is the 1/2-fractile of the standard normal distribution 0,1. For the multivariate case, the posterior density , is large when is small. Furthermore, this quadratic form has a chi-square distribution with d degrees of freedom, so the 1001% HPD credible interval for θ is the ellipsoid: 00.5 11.5 0 0.5 1 1.5 2 2.5 p( |y) 90% HDP and classical confidence regions HDP classical
64 Bayesian Approach to Robust Identification : (52) where is the 1-fractile of the chi-square distribution with d degrees of freedom. Example 3.2. Credible regions when the noise variance is known Consider again the plant and experiment of the Example 2.1 (Ninness and Goodwin, 1995). Here, we have used the first 500 samples of the experiment and we assume that the noise variance is 0.005. Firstly, we arbitrarily select a prior distribution for the parameters given by , with 0.105 0.17 and 1000. The 3D plot and 80% contour plot (blue line) are shown in Fig. 3.4. Secondly, we compute the likelihood function for the first 500 samples assuming normal noise with zero mean and variance , i.e., |,~,. The 3D plot and 80% contour plot (green line) are shown in Fig. 3.4. Finally, we compute the posterior distribution for the parameters by combining the prior distribution with the likelihood distribution by means the Bayes’ rule. The result is again a Gaussian distribution , and its 3D plot and 80% contour plot (red line) are shown in Fig. 3.4. (a) (b) Fig. 3.4. Prior distribution, likelihood function and posterior distribution, (a) 3D plots (b) 80% contour plots The maximum a posteriori (MAP) value for the parameter vector is 0.1055 0.1690 and the associated posterior covariance matrix is 100.1319 0.0447 0.0447 0.1335 00.1 0.2 0.16 0.17 0.18 0 0.5 1 1 Prior distribution for the parameters 200.1 0.2 0.16 0.17 0.18 0 0.5 1 1 Likelihood function 2 00.1 0.2 0.16 0.17 0.18 0 0.5 1 1 Posterior distribution for the parameters 20.1 0.101 0.102 0.103 0.104 0.105 0.106 0.107 0.108 0.109 0.11 0.165 0.166 0.167 0.168 0.169 0.17 0.171 0.172 0.173 0.174 0.175 1 2 Prior distribution, likelihood function and posterior distribution Prior (80%) Likelihood (80%) Posterior (80%)
Bayesian Approach to Robust Identification 65 Next figure compares the Bayesian estimate and its credible region to the least squares estimate and its confidence region. In this example, the Bayesian uncertainty region is effectively smaller than the confidence region. Finally, to obtain the 80% credible region in Fig. 3.5 we have used the result (52), while in the Fig. 3.4 the same region was obtained numerically (by “brute force”). Fig. 3.5. Point estimates (maximum a posteriori and least squares) and 80% uncertainty regions (credible HPD region and confidence region) Estimation of variance: If the noise variance is not a known value (it is not fixed), information about it coming from the measurement data is used. In Chapter 2, unbiased estimates for coming from time domain data and frequency domain data were presented. An alternative is to take the variance as stochastic with a particular probability distribution. The usual case is to consider that follows an inverse Wishart distribution ~, (Box and Tiao, 1973), (Hjalmarsson and Gustafsson, 1995). Remark: The Wishart distribution is a generalization of the chi-square distribution to the multivariate case and it is often used as the distribution for the sample covariance matrix for multivariate normal random data. The inverse Wishart distribution, which is based in the Wishart distribution, is then used as the conjugate prior for the covariance matrix of a multivariate normal distribution. The probability density function (PDF) of the inverse Wishart distribution is ∙ 2 ∙Γ 2∙ 0.103 0.104 0.105 0.106 0.107 0.108 0.109 0.11 0.164 0.165 0.166 0.167 0.168 0.169 0.17 0.171 0.172 0.173 1 2 Credible region and confidence region MAP 80% HPD LSE 80% conf
66 Bayesian Approach to Robust Identification and it has mean and variance . With this selection, the conditional prior distribution for the parameter vector is the following hierarchical distribution: |~, , ~, and the unconditional prior distribution for the parameter vector will be no longer Gaussian, it will be a multivariate generalisation of the Student’s t distribution with degrees of freedom ~,,=, , which is given by the following PDF, /||/Γ 2 Γ 21 where d is the dimension of the parameter vector. This PDF has mean and covariance . The value of m is taken as where N is the length of the data set. Assuming Gaussian noise, the application of the Bayes’ rule leads to the following posterior distribution for the noise variance (Hjalmarsson and Gustafsson, 1995), |~, where ∑ and . The posterior expected value for the noise variance is | . Finally, the posterior distribution for the parameter vector is given by |~,, with posterior mean | and posterior covariance |=| . Under mild conditions, this distribution tends asymptotically to be normal. Example 3.3. Credible regions when the noise variance is unknown using a hierarchical prior.
Bayesian Approach to Robust Identification 67 Consider again the plant and the first N500 samples of the experiment of the Example 3.2. In the first place, we have extracted from data a noise realization by comparing the measured plant output with an estimated one (derived from a second order 2 Laguerre least squares model). This sequence fits an inverse Wishart distribution with parameter 2.749 and degrees of freedom. The mean value for the prior noise variance is 0.0055 and the variance value for the prior noise variance is 1.2∙10. The mean value for the noise variance a posteriori obtained by application of the Bayes’ rule to the N500 samples and considering Gaussian noise has been |0.0061. Fig. 3.6 shows the unconditional Student t prior and posterior distributions obtained for the parameters. Since they are very close to the normal distribution, the results are very similar to the ones obtained in the previous example. (a) (b) Fig. 3.6. Unconditional Student t distributions for the parameters: (a) Prior distribution (b) Posterior distribution The maximum a posteriori (MAP) value for the parameter vector is 0.1055 0.1690 and the associated posterior covariance matrix is 100.1614 0.0548 0.0548 0.1633 Fig. 3.6(a) shows the 70%, 80% and 90% posterior credible regions obtained from the unconditional Student t posterior distribution of the parameters. And, finally, Fig. 3.6(a) shows the marginal posterior distributions | and | obtained by direct numerical integration of the unconditional posterior Student tdistribution. 0.1 0.105 0.11 0.115 0.12 0.125 0.16 0.165 0.17 0.175 0.18 0 0.5 1 1.5 2 2.5 3 x 10 4 1 Unconditional Student t prior distribution 2 0.1 0.105 0.11 0.115 0.12 0.125 0.16 0.165 0.17 0.175 0.18 0 2 4 6 8 10 12 x 10 4 1 Unconditional posterior Student t distribution 2
68 Bayesian Approach to Robust Identification (a) (b) Fig. 3.7. (a) Credible posterior regions (70%, 80%, 90%) (b) Marginal posterior distributions b. MCMC implementation In the previous section the computation of probability distributions and credible regions was easy. In the cases where the number of parameters is moderately high and/or distributions are not standard, the demand for computationally resources increases significantly. In such cases, one must use simulation strategies such as the Markov Chain Monte Carlo (MCMC) simulation. The idea of MCMC is to construct an ergodic Markov chain with invariant distribution equal to the desired posterior. This approach is also interesting because error bounds on estimates are derived from the sampled distribution and thus they do not rely on assumptions of large data records. See Appendix C for a throughout explanation. Example 3.4. Credible regions obtained by MCMC simulations Consider again the posterior distribution for the parameters of the Example 3.2, ,, where the mean value is 0.1055 0.1690 and the covariance matrix is 100.1319 0.0447 0.0447 0.1335 Exact credible regions were obtained in the Example 3.2. Here we approximate the credible region by means the use of the slice sampler, which is a version of the Gibbs sampler. After a burn-in stage, the computation of the histogram of the Markov chain associated at each parameter coincides with the target marginal distributions. Fig. 3.8(a) shows the results for a chain of 15000 samples. 0.102 0.103 0.104 0.105 0.106 0.107 0.108 0.109 0.11 0.164 0.165 0.166 0.167 0.168 0.169 0.17 0.171 0.172 0.173 Credible posterior regions from the Student t distribtion 1 2 map 70% 80% 70% 0.102 0.103 0.104 0.105 0.106 0.107 0.108 0.109 0.11 0 100 200 300 1 p( 1 |y) Student t posterior marginal distributions 0.164 0.165 0.166 0.167 0.168 0.169 0.17 0.171 0.172 0.173 0 100 200 300 2 p( 2 |y)
Bayesian Approach to Robust Identification 69 (a) (b) Fig. 3.8. (a) Histograms for the posterior marginals (b) Credible posterior region The credible region in the parameter space can be obtained by combining the Markov chains (see Fig. 3.8(b)). Note that the region obtained after the burn-in period is effectively the same of the Example 3.2. 3.2.4 Relationship to robust identification deterministic methods Many deterministic methods presented in the Chapter 2 can be viewed as particular cases of the Bayesian framework. In this section, we illustrate how the Feasible Parameter Set (FPS) regions of Chapter 2 can be obtained by means the Bayesian method by simply assuming that the noise is uniform-distributed. As in the deterministic case the first step is to decide which the value of the bound is. In the FPS case this value is used to obtain the different strips corresponding to the measurements. The intersection of all the strips produces the FPS region. In the Bayesian methodology, the bound can be used to define the prior noise distribution. In this section we assume that the noise is uniform distributed ~,. This distribution is used to compute the likelihood function | by taking the parameter space as support. Since the distribution is uniform, the resulting likelihood function will be nonzero and flat in the region where models (parameters) are consistent with measurements and it will be zero outside this region. Example 3.5. Relationship between FPS and parametric BCMS Consider again the plant and experiment of (Ninness and Goodwin, 1995). Even though we know that the measurement noise corrupting the data is Gaussian distributed, we chose to model it by means a uniform distribution ~, with 0.6. 0.101 0.102 0.103 0.104 0.105 0.106 0.107 0.108 0.109 0.11 0.111 0 500 1000 1 p( 1 |y) Posterior marginal distributions obtained by MCMC 0.164 0.166 0.168 0.17 0.172 0.174 0.176 0 500 1000 2 p( 2 |y) 0.101 0.102 0.103 0.104 0.105 0.106 0.107 0.108 0.109 0.11 0.111 0.164 0.166 0.168 0.17 0.172 0.174 0.176 1 2 Credible region obtained by MCMC MCMC 90% credible map
70 Bayesian Approach to Robust Identification The support values, i.e., the tentative values for the uncertain parameters and , have been selected around the LSE Laguerre model obtained in (Ninness and Goodwin, 1995). Fig. 3.9(a) shows the resulting normalized likelihood function (LF). In Fig. 3.9(b) the contour of this LF is compared to the FPS region obtained for 0.6 in Chapter 2 (Example 2.7). The two regions effectively coincide. (a) (b) Fig. 3.9. (a) (Normalized) likelihood function, (b) Likelihood function contour and FPS 3.2.5 Other features of the Bayesian approach a. FPS with inner probability In the previous example, all models at the top of the likelihood function, i.e. inside the FPS region, are equally probable to occur. This fact does not facilitate the selection a unique optimal parameter vector. The Bayesian methodology can go one step beyond from the FPS since it allows assigning a probability to each model by the definition of a prior distribution on the parameters and subsequent computation of the posterior distribution. Example 3.6. FPS with inner probability Consider again the plant and experiment of the Example 3.5. Now we assign a prior distribution to the parameters given by ~, with 0.1 0.1 and 100 (see Fig. 3.10(a)). The combination of this prior distribution to the uniform likelihood function of the Example 3.5 gives the posterior distribution of the parameters shown in Fig. 3.10(b). -0.1 00.1 0.2 0.3 0 0.1 0.2 0.3 0.4 0 0.2 0.4 0.6 0.8 1 1 2 Likelihood function 1 2 Likelihood function (uniform noise) and FPS for =6 -0.1 -0.05 00.05 0.1 0.15 0.2 0.25 0.3 0 0.05 0.1 0.15 0.2 0.25 LF contour FPS
Bayesian Approach to Robust Identification 77 (a) (b) Fig. 3.15. (a) Mixture prior at 1.1654rad/s, (b) Cut to obtain the 80% credible region Finally, Fig. 3.16(a) shows the prior 80% credible region at 1.1654rad/s and Fig. 3.16(b) shows the prior 80% credible region at several frequencies. (a) (b) Fig. 3.16. (a) Prior 80% credible region at 1.1654rad/s, (b) Prior 80% credible region at frequencies 0.2, 0.5, 1 and 3 rad/s b. Posterior distributions in the Nyquist plane The posterior probability of the model can be obtained by means the application of the Bayes’ rule and the law of total probability as follows: The joint posterior distribution of the model and parameters is ,||,, |,,∙ (57) Since the joint prior distribution can be factorized as ,|∙, we have -1 -0.5 00.5 11.5 -1 -0.5 0 0.5 0 5 10 15 20 Real Mixture prior distribution at =1.1654rad/s Imag -1 -0.5 00.5 11.5 -1 -0.5 0 0.5 0 2 4 6 8 10 12 Real Cut level for 80% prior credibility at =1.1654rad/s Imag -0.4 -0.2 00.2 0.4 0.6 0.8 11.2 -0.6 -0.5 -0.4 -0.3 -0.2 -0.1 0 0.1 0.2 Real Imag True response and 80% prior credible region at =1.1654rad/s 80% credible prior contour true response -0.4 -0.2 00.2 0.4 0.6 0.8 11.2 -0.6 -0.5 -0.4 -0.3 -0.2 -0.1 0 0.1 0.2 Real Imag True response and 80% prior credible region at =[0.2 0.5 1 3]rad/s
78 Bayesian Approach to Robust Identification ,||,, ∑|,|∙ ∙ (58) where we can define |≡|,|∙ as the integrated likelihood of model . Equation (58) is then expressed as ,||,, ∑|∙ The posterior probability of model is given by ||,|∙ ∑|∙ which can be expressed in a more compact form as: || ∑| (59) The expression above gives us the updated probability for each model of the model set once we have gathered the experimental data. This is the solution to the problem known as “model classification” which is a classical problem in the field of Bayesian modelling (Peterka, 1981). Finally, we use these model probabilities to obtain the mixture posterior distribution at each frequency, ,|, ,|,, | (60) where the posterior distribution for each model and frequency is, in the Gaussian case, , |,~ ,∗ (61) Example 3.10. Posterior credible regions on the Nyquist plane for a set of competing models Let us continue with the Example 3.9. Now we excite the plant with 1000 samples of a PRBS (Pseudo Random Binary Signal) and collect the response samples. For each model we compute the integrated likelihood | and apply (59) to obtain the new model probabilities. After the experiment, the new model probabilities are:
Bayesian Approach to Robust Identification 79 |0.3737 , |0.2540 , |0.2341 , |0.1381 which indicates that a low order model is more probable to have generated the data. By means the law of total probability (60), these probabilities have been used to obtain the mixture distributions at each frequency, assuming that the individual (per model) distributions are Gaussian. Fig. 3.17 shows the resulting posterior 80% credible regions, (a) at a single frequency, and (b) for a set of frequencies. (a) (b) Fig. 3.17. (a) Posterior 80% credible region at 1.1654rad/s, (b) Posterior 80% credible region at frequencies 0.2, 0.5, 1 and 3 rad/s 3.3.3 Relationship to robust identification stochastic methods The MEM-OE approach of Chapter 2 can be also viewed as a particular case of the Bayesian approach. In the MEM framework, it is assumed that the measurements explicitly depend on a nominal model , and a model error accounting for the undermodelling , , 1,…, This model error can be interpreted as a black box model where the input are the excitation samples and the output are the residuals , , and it can be obtained by means the same techniques used for nominal models, for instance, using Output Models and Least Squares Estimation. In this case, the uncertainty (confidence) regions are obtained assuming Gaussian noise. Hence, similar results are obtained by the Bayesian methodology if we assume Gaussian noise and flat parameters prior (i.e., the only assumption about the model is the structure but no prior value is assigned to the parameters). Now the likelihood of observations is substituted by the likelihood of residuals. If we assume that the noise is distributed as , then the likelihood function is -0.4 -0.2 00.2 0.4 0.6 0.8 11.2 -0.6 -0.5 -0.4 -0.3 -0.2 -0.1 0 0.1 0.2 Real Imag True response and posterior 80% credible region at =1.1654rad/s 80% credible posterior contour true response -0.4 -0.2 00.2 0.4 0.6 0.8 11.2 -0.6 -0.5 -0.4 -0.3 -0.2 -0.1 0 0.1 0.2 Real Imag True response and posterior 80% credible region at =[0.2 0.5 1 3]rad/s
80 Bayesian Approach to Robust Identification || Therefore if we model the noise as Gaussian and compute the likelihood function of the observations, the different “cuts” of this function will lead to the stochastic uncertainty regions, either on the parameter space or in the Nyquist plane. Example 3.11. Relationship with MEM-PEM and BCMS Consider the first dataset of the (Reinelt et al., 2002). In the present example, we have modeled the model error by means a FIR model of order 30 and have assumed Gaussian noise of zero mean and variance estimated from the residuals by the expression (10) given in Chapter 2, 0.0844. Ellipses in the Nyquist plane have been obtained by cutting the resulting likelihood function at each frequency to obtain a confidence level of 95%. Fig. 3.18(a) shows the model error with its associated uncertainty band. For the sake of comparison it is show the OE-type model error obtained in (Reinelt et al., 2002). (a) (b) Fig. 3.18. (a) Model error and associated uncertainty band, (b) Final symmetric uncertainty band around the nominal model Final uncertainty bands for the nominal model are then computed by combining the nominal model and the uncertainty regions of the error model, as explained in Chapter 2. Fig. 3.18(b) shows the final symmetric uncertainty band. In the Chapter 2, we also presented the NSSE method which is the other main stochastic solution to the robust identification problem. The NSSE approach has little relation to the Bayesian one since in NSSE the uncertainty is quantified by means a non-stationary stochastic process. However, the Bayesian approach can obtain uncertainty bands similar to the NSSE ones. See next example. Example 3.12. NSSE example solved with competing models. 10 -2 10 -1 10 0 10 1 10 2 -100 -80 -60 -40 -20 0 20 40 60 80 100 Error models OE(20,10,10,20) FIR(30) 90% unc. band 10 -2 10 -1 10 0 10 1 10 2 -50 -40 -30 -20 -10 0 10 20 30 Frequency (rad/s) Magnitude (dB) Symmetric uncertainty band unc. band G 0 G 0 +G e G+F
Bayesian Approach to Robust Identification 81 In this example, we consider again the plant and experiment of Example 2.5. The model uncertainty is quantified by using a set of three competing models. The models considered are the ones suggested in (Goodwn, Braslavsky, and Seron, 2002) but, instead to take these models separately we use them together to quantify the uncertainty. The three competing models are parameterized by the following functions: First model: . Second model: . , Third model: . , , . , The prior distribution of the parameters of each model is assumed to be Gaussian 0, with 1. The mean value and precision matrix for each model is selected as: 1, 10, 0.5 2.5, 10, and 0.51.50.51, 10. The selected mean values are near the least squares estimates obtained from frequency data. We assign the same prior probability to each model, i.e., 1/3. Prior distributions for the second and third model are shown in Fig. 3.19. (a) (b) Fig. 3.19. (a) Joint prior distribution for the parameters of Model 2, (b) Marginal prior distributions for the parameters of Model 3 Once collected the data and computed the integrated likelihoods, the posterior probabilities for each model are 0.2091, 0.2098, and 0.5812. Posterior distributions in the Nyquist plane are combined with these probabilities to obtain the mixture posterior distributions of Fig. 3.20(a). The final 80% posterior credible regions are shown in Fig. 3.20(b). The uncertainty band is tighter than the one obtained in Example 2.5 in which only Model 2 was considered and the uncertainty ellipses were obtained by assuming that the model error could be modeled by means a non-stationary stochastic process. Note also that the 00.5 11.5 22.5 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1 Marginal prior distributions for the parameters of Model #3 00.5 11.5 22.5 0 0.2 0.4 0.6 0.8 1 1.2 1.4 2 00.5 11.5 22.5 0 0.2 0.4 0.6 0.8 1 1.2 1.4 3 00.5 11.5 22.5 0 0.2 0.4 0.6 0.8 1 1.2 1.4 4
82 Bayesian Approach to Robust Identification credible regions at each frequency in general are not ellipses since they are obtained from mixture distributions. (a) (b) Fig. 3.20. (a) Mixture posterior distribution, (b) Final uncertainty band 3.3.4 Other features of the Bayesian approach a. Effect of the prior distribution in the uncertainty size One of the advantages of the Bayesian approach is that it is possible to reduce the uncertainty bands obtained from the likelihood function by means the adequate selection of the model prior distribution . In the Gaussian case, this reduction can be attained by simply increasing the value of the prior precision matrix, . Next example illustrates this effect. Example 3.13. Effect of the prior distribution in the variance error reduction Consider the plant and experiment of the Example 2.5 (Goodwin, Braslavsky, and Seron, 2002). Regarding the prior information, we assume that the noise is zero mean Gaussian with variance 1. And we assume that the nominal model is a second order model parameterized by the functions . and . The prior distribution for the parameter vector is assumed to be Gaussian with mean value 0.77 2.37, which is the least squares estimate obtained from frequency domain data. A selection of the prior precision matrix of 100 leads to a spikier Gaussian bell than a selection of , therefore it leads to smaller prior and posterior uncertainty ellipses. See Fig. 3.21. -0.5 00.5 11.5 22.5 33.5 4 -2.5 -2 -1.5 -1 -0.5 0 0.5 Real Imag true 80% credible
Bayesian Approach to Robust Identification 83 (a) (b) (c) Fig. 3.21. Posterior 80% credible regions for (a) , (b) 10, (c) 100 Note also that the ellipses are around the nominal model. In fact these ellipses are quantifying only the variance error and not the bias error since we have considered only one model, i.e., we are considering only parametric uncertainty. However, this example shows how the bias/variance trade-off presented in Chapter 2 can be overcome if we use the Bayesian approach to tighten the variance error. b. Resonant systems Unlike the NSSE method, the Bayesian procedure does not distinguish plants with real poles from plants with resonant poles. It deals in the same way with all types of plants. Example 3.14. Resonant plant and Markov Chain Monte Carlo (MCMC) implementation Consider the resonant plant and experiment of the Example 2.6. The functions that parameterize the nominal model are ., ., -0.5 00.5 11.5 22.5 33.5 -2 -1.5 -1 -0.5 0 0.5 Posterior 80% credible regions at several frequencies Real Imag True Nominal Credible (80%) -0.5 00.5 11.5 22.5 33.5 -2 -1.5 -1 -0.5 0 0.5 Posterior 80% credible regions at several frequencies Real Imag True Nominal Credible (80%) -0.5 00.5 11.5 22.5 33.5 -2 -1.5 -1 -0.5 0 0.5 Posterior 80% credible regions at several frequencies Real Imag True Nominal Credible (80%)
84 Bayesian Approach to Robust Identification , ., . and . Hence the model has 6 parameters to be identified. The prior distribution for the parameter vector is assumed to be Gaussian with mean value 13.17 49.381.0933.1111.0612.39, which is the least squares estimate obtained from frequency domain data, and prior precision matrix of 10. Even though the distribution is Gaussian, the high number of parameters (6) makes necessary the use of simulation techniques such as the Markov Chain Monte Carlo simulations presented in a previous section. Fig. 3.22(a) shows the Markov chains (2000 samples) obtained for each one of the prior parameters and Fig. 3.22(b) shows the resulting prior marginal distributions. (a) (b) Fig. 3.22. (a) Markov chains, (b) Simulated prior marginal distributions Next figure shows the final 80% posterior credible regions. For this selection of the precision matrix the resulting uncertainty bands are tighter than the ones obtained by the NSSE method using both the random walk and the integrated random walk. Fig. 3.23. Posterior 80% credible regions for 10 0500 1000 1500 2000 -16 -14 -12 1 sample Markov chains 0500 1000 1500 2000 48 50 52 2 sample 0500 1000 1500 2000 -2 -1 0 3 sample 0500 1000 1500 2000 -34 -32 -30 4 sample 0500 1000 1500 2000 -14 -12 -10 5 sample 0500 1000 1500 2000 10 12 14 6 sample -2 -1 0 1 2 3 4 -2.5 -2 -1.5 -1 -0.5 0 0.5 Real Imag true nominal 80% credible
Bayesian Approach to Robust Identification 85 3.4 Application of the Bayesian Decision Theory It turns out that the Bayesian framework is highly unifying since it can consider many different aspects that constitute the robust identification problem. In the present section, we explore the connections between the robust identification problem and the Bayesian Decision Theory. Three problems can be considered: the selection of the nominal model, the model (in)validation, and the optimal design of experiments. 3.4.1 Selection of a nominal model When the application is the design of robust controllers, we need to select a nominal model from the credible model set. There exist several choices: One possibility is to select the model corresponding to the maximum value of the posterior distribution |. argmax | This is the maximum a posteriori (MAP) estimate. Another possibility is to find the nominal model that minimises the Bayesian risk. argmin , This is the minimum risk estimate (MR). Still, a third possibility is to select the nominal model that minimises the maximal loss, argmin max , This is a minimax (MML) approach. a. Maximum a posteriori (MAP) nominal models The optimal MAP nominal model is the one that maximises the posterior probability of the model conditioned on the observations |. MAP estimation is sometimes called unconditional maximum likelihood (ML) estimation; and ML estimation is sometimes called conditional ML estimation.
86 Bayesian Approach to Robust Identification Maximum a posteriori models do not require the definition of a loss function , quantifying the cost of selecting the value G for the nominal if the true model is . Instead, it is supposed that the estimate G is in the neighbourhood of , and hence a hypothetical loss function would be small. The MAP nominal model can be estimated in the parameter space (case of parametric uncertainty) or in the Nyquist plane (case of dynamic uncertainty). For the case of credible regions in the Nyquist plane, it is possible to obtain the MAP estimate for each one of the set value distributions. Since the resulting nominal order will be equal to the number of value sets (number of exciting frequencies) one can apply Hankel norm model reduction techniques to produce a restricted complexity nominal model. This approach is widely used in deterministic methods, see for instance the works of (Milanese and Taragna, 2002) and (Malan et al., 2001). Example 3.15. MAP nominal model Consider the example of (Ninness and Henriksen, 2010). The data generating process (true plant) is . .,1.., so the true parameter vector is ,0.2,0.8. The experiment consists of only 20 samples of the excitation signal , where sin. The measurement noise sequence is i.i.d. uniform with zero mean and variance 0.01. Regarding the model prior information, since the plant is stable we know that the parameter in the denominator is such that ||1, so we assume that the marginal distribution is uniform between -1 and 1. And, since the gain is positive, we assume that the parameter in the numerator is 0, and so we take the marginal distribution uniform between 0 and 1. As and are independent, we can construct the joint distribution by simply taking . See Fig. 3.24(a). And regarding the prior noise information, even though we know that the noise is uniform, it is more convenient to assume it is Gaussian since, this way, the likelihood function (and the posterior model distribution) will present a unique maximum value. In this example we have assumed zero mean Gaussian noise with standard deviation 0.5. The maximum value of the joint model posterior distribution corresponds to the model ,0.1975,0.8051. This is the MAP estimate. See Fig. 3.24(b). The precision of the estimate depends on the grid used as a support for the probability distributions. In this example, we have used a linear grid of 80 values between -1.2 and 1.2 for both parameters.
Bayesian Approach to Robust Identification 93 In the case of parametric uncertainty, the exact results for the case of linear regression models and Gaussian distributions have been presented. If the distributions are not Gaussian or the number of parameters increases, simulation techniques such as Markov Chain Monte Carlo techniques must be used to compute the posterior marginal distributions and the credible regions. Compared to the existing robust identification deterministic methods, it has been shown that the Feasible Parameter Set (FPS) can be obtained by means our methodology if the uniform distribution is used to model the measurement noise. In the case of uncertainty regions in the frequency domain, we have illustrated the use of frequency domain data in the BCMS. In order to describe the bias error we have considered sets of competing models which lead to mixture (thus, non-ellipsoidal) credible regions in the Nyquist plane. The law of total probability is used to derive the credible regions and to compute the posterior probability for each model in the set of competing models. Exact posterior credible regions are presented for the case of linear regression models and Gaussian probability distributions. Compared to the existing methods, the same probabilistic regions of conventional system identification and Model Error Modeling can be obtained if no model prior distribution is used (i.e., by using only the likelihood function). In all the cases, the uncertainty regions can be tightened provided the adequate selection of the model prior distribution. In particular, it is illustrated how the variance error is reduced by selecting larger values for the prior precision matrix. Compared to the Non Stochastic Stationary Embedding, smaller uncertainty regions have been obtained and with no need to modify the methodology for the case of resonant systems. Finally, three related problems have been presented and discussed under the viewpoint of the Bayesian Decision theory: the selection of the nominal model, the model (in)validation, and the optimal design of experiments.
95 CHAPTER 4 Application to Fault Detection This chapter presents some results to illustrate the application of the Bayesian identification approach to fault detection. Two case studies are considered: a quadruple tank process and a three-bladed wind turbine. 4.1 Fault detection based on feasible parameter regions Since in this chapter we are going to perform the fault detection on the basis of feasible parameter regions, in this section we present the background of this approach. 4.1.1 Background Model parameterization: Let us assume that the system can be expressed by the following model , , 1,…, (69) where the function ,, can be linear or nonlinear and it can contain any function of the inputs and outputs , ∈ is the d dimension parameter vector which belongs to a set , defined by the a priori bounds for the parameter values. And, finally, is the additive error bounded by a constant ||.
96 Application to Fault Detection Feasible parameter set (FPS): According to (Milanese et al., 1996) the parameter estimation problem consists of determining the parameter set that contains all the models consistent with the set of N input/output data. As explained in Chapter 2, the resulting feasible parameter set is defined as FPS∈|,,1,…, (70) In the fault detection field, in order to avoid dealing with the exact description of the FPS, existing algorithms usually approximate the FPS by using inner/outer simpler shapes such as boxes, parallelotopes, ellipsoids or zonotopes (Vicino and Zappa, 1996), (Reppa and Tzes, 2011), and (Alamo, Bravo and Camacho, 2005). The approximated set is called Approximated Feasible Parameter Set (AFPS). There exist inner and outer approximations. Inner approximations find the parameter set of maximum volume such that all the parameters of the AFPS are inside the FPS. Hence, for the k-th measurement we have AFPS⊆FPS. On the other hand, outer approximation algorithms find the parameter set of minimum volume that guarantees that the FPS is inside the AFPS, FPS⊆AFPS. Recursive algorithms allow computing inner and outer approximations as follows AFPS⊆AFPS∩S AFPS⊇AFPS∩S where S is the region in the parameter space that contains all the parameters consistent with the measurement k and the function ,, S∈|, (71) Linear case: In the linear case, , can be expressed as a linear regression, ,, where the regression vector can contain any function of inputs and outputs . Here the set S is a strip and the FPS is a polytope that can be described in the H-polytope form (Blesa, Puig, and Saludes, 2013) as FPS∈| (72) with 1,1,…,, and 1,1 ,…,,. Nonlinear case: Unfortunately, for the nonlinear case the optimization problem is nonconvex and obtaining a suitable solution is computationally hard. In (Milanese et al., 1996) a minimum outer box is determined by means of a set of optimization problems. Alternatively, in (Jaulin et al., 2010) the FPS is approximated by using subpavings and the SIVIA (Set Inversion Via Interval Analysis) algorithm that is based on refining the initial a priori set by iteratively bisecting it.
Application to Fault Detection 97 Fault detection: Once the FPS has been estimated from non-faulty data, the fault detection test consists in checking the consistency of new measurements with the former FPS. The consistency is checked by means of the intersection of S (set of parameters consistent with data at instant k) with the FPS. A fault will be indicated if this intersection leads to an empty set S∩FPS∅ (73) In the linear case, the fault detection test (73) can be solved easily, but in the nonlinear case, inner or outer approximations of this intersection must be used and missed alarms (in outer approximations) and false alarms (in inner approximations) may appear. For this reason, outer approximations are used rather than inner approximations for fault detection purposes (Blesa, Puig, and Saludes, 2011b). 4.1.2 Bayesian approach Feasible parameter set estimation: As explained in Chapter 3, the same FPS region of the set-membership approach (70) can be obtained within our Bayesian methodology. Since the region defined in (70) describes parametric-type uncertainty, the Bayesian credible model set reduces to its parametric version, ≡∈: | (74) where the process model is characterized by means of the parameter vector , and the model posterior probability is |∝|∙. Now we have to decide which is the model prior probability distribution, p(). In the Bayesian framework this probability is a subjective probability. Here it is assumed that we have no information about which the value of the “true” parameter vector will be and consequently we take a flat p(). This way the model posterior distribution is directly proportional to the likelihood function of the observations, |∝|. The likelihood of the observations coincides in form with the noise probability distribution, i.e., |,≡ |, where is a parameter that characterizes the noise and hence the error term. Since we want to obtain a hard-bounded uncertainty/credible region, we select to be the additive error bound of the set-membership technique presented in the previous section and thus we assume that the additive error is uniform distributed, ~,. Since is uniform, the resulting likelihood function is constant and nonzero in the region where models (parameters) are consistent with measurements and it is zero outside this region. The likelihood function can be numerically obtained for a grid of candidate parameter vectors by assuming that the error samples , where ,, are i.i.d. (independent identically distributed)
98 Application to Fault Detection |, |, (75) It is noteworthy that there is no difference in the computation of the likelihood function either in the nonlinear or linear case. Fault detection: Once we have calibrated the model (i.e, obtained the likelihood function |, for all the points in the parameter grid) the fault detection test can be carried out, for every new measurement , by computing the new likelihood function |, and verifying if there is at least one parameter vector for which both , and , are nonzero. If this parameter (or set of parameters) exists we conclude that the new measurement is consistent with the feasible parameter set. The consistency can be checked by simply multiplying both likelihood functions for each parameter in the grid. If the product is equal to zero for all the parameters in the grid, |, |,0∀ (76) we decide that a fault has taken place since the new measurement is not consistent with the feasible parameter region. Of course, the ability to detect “small” faults depends on the grid density. A denser grid will be able to detect smaller deviations of the parameter vector. This implies a more computationally intense calibration stage. However, the fault detection stage is not so intensive computationally since it can consider one sample at once. This feature also allows the on-line implementation of the method. Let us illustrate the performance of this methodology by means of two case studies. 4.2 Case Study I: Quadruple tank process 4.2.1 Physical model Fig. 4.1 shows the quadruple tank-process proposed as a benchmark problem by (Johansson, 2000). The process inputs are the voltages to the pumps and . The process outputs are the tank levels , , and .
Application to Fault Detection 99 Fig. 4.1. The quadruple-tank process The equations that describe the dynamical behavior of the system are obtained by means of the mass balances and the Bernouilli’s law: 2 2 2 2 21 21 (77) where is the cross-section of tank , is the cross-section of the outlet hole of tank , and and are the corresponding flows of pumps 1 and 2. The parameters ,∈0,1 are determined from how the valves are set prior to the experiment. The gravity acceleration is denoted as . The initial conditions are 012.4, 012.7, 01.8, 0 1.4, 03 and 03. The operation range is assumed to be ∈2,11cm and ∈1,15 cm. Table 4.1 shows the values of the plant parameters.
100 Application to Fault Detection , 28cm2 , 32cm2 ,0.071cm2 , 0.057cm2 0.7 0.6 3.33cm3/Vs 3.35cm3/Vs 981cm/s2 Table 4.1. Parameter values 4.2.2 MISO case Firstly we consider the MISO (Multi Input Single Output) case. In this case, the plant output is the level of tank 1, , while the inputs are the level of tank 3, , and the first pump voltage, . The uncertain parameters will be and . The fault detection procedure consists of two steps. In the first step, calibration, a faultfree scenario is used to generate the data needed to determine the uncertainty region for the parameters and . In the second step, fault detection, data containing faults are generated and the former uncertainty region is used to detect them. a. Calibration in a fault-free scenario A set of N =140 measurements has been obtained in a fault-free scenario (see Fig. 4.2). These data will be used to calibrate the model, i.e., to obtain the uncertainty region for and in the parameter space. Fig. 4.2. Fault-free scenario data 020 40 60 80 100 120 140 0 5 10 15 Levels h1 and h3 Time (s) cm h1 h3 020 40 60 80 100 120 140 0 0.5 1 Pump voltage v1 Time (s) Volts
Application to Fault Detection 101 Discrete-time linear regression model: The nominal model will be a discrete-time linearized version of the first equation in (77). To discretize we use the Euler method with sampling time 1. 1 (78) Thus, 1 21 21 1 where is the additive error (it includes sensor and discretization error) and it is assumed to be bounded by a constant ||, 0.05. The process output, expressed in the linear regression form, is (79) where 1 21 21 1 is the regression vector and 1 is the parameter vector. Uncertainty region obtained by strips intersection: In this case, the Feasible Parameter Set (FPS) is obtained by intersecting all N strips defined by the pairs of parallel lines separated 2, . See Fig. 4.3. Fig. 4.3. FPS obtained by strips intersection (the red little circles indicate the final polytope vertices) 0.065 0.07 0.075 0.08 0.065 0.07 0.075 0.08 a 1 a 3 Feasible Parameter Set (strips intersection)
102 Application to Fault Detection Uncertainty region obtained as the likelihood function contour: In this case the FPS region is obtained as the contour of the likelihood function assuming that the noise is uniform distributed as ,. Fig. 4.4 shows the result for a 6060 parameters grid. Fig. 4.4. FPS obtained as the likelihood contour This FPS region coincides with the one obtained by intersecting the strips. Thus, in the linear case, the computation of the likelihood function does constitute an alternative to the strips intersection technique of the set-membership approach. b. Fault detection stage Generation of the faulty behavior: In order to show the fault detection behavior, different fault scenarios have been created by introducing faults when the system is under the operation point shown in Fig. 4.5. a 1 a 3 Feasible Parameter Set 0.065 0.07 0.075 0.08 0.065 0.07 0.075 0.08 LF contour strips intersection polytope vertices
Application to Fault Detection 109 2 1 21 1 1 (82) (a) (b) Fig. 4.15. Uncertainty region for the MISO case with output observer. 0.9,1 b. Fault detection stage As in the previous section, the likelihood approach and the obtained uncertainty regions for a 6060 parameters grid have been used to detect faults induced by changes in the parameter . At the sample 1201, a value of 0.035 is added to this parameter. The observer is applied to the plant at sample 1050. The fault detection procedure has been implemented on-line and the fault has been detected at the correct sample in all the cases (01). (a) (b) Fig. 4. 16. Fault detection for the case 0.5. (a) The observer output for the case , 0.071,0.071. (b) Detail of the faulty, nonfaulty and observer behavior. Regarding the minimum detectable fault, the observer 0.1 can detect faults as small as 0.0011 (but with a delay of 63 samples), and the observers 0.5 and 0.9 can detect faults as small as 0.0035 and 0.0030 respectively (but with a delay of 528 a 1 a 3 Feasible Parameter Set. L=0.9 0.065 0.07 0.075 0.08 0.065 0.07 0.075 0.08 LF contour strips intersection polytope vertices a 1 a 3 Feasible Parameter Set. L=1 0.065 0.07 0.075 0.08 0.065 0.07 0.075 0.08 LF contour strips intersection polytope vertices 0200 400 600 800 1000 1200 1400 1600 1800 2000 0 1 2 3 4 5 6 7 8 9 10 Time (s) cm Level at tank 1. Fault detected at sample k=2000, (L=0.5) fault no fault estimated output (a 1 ,a 3 )=(0.071,0.071) 1150 1160 1170 1180 1190 1200 1210 9.7 9.72 9.74 9.76 9.78 9.8 9.82 9.84 9.86 9.88 9.9 Time (s) cm Level at tank 1 (detail). Fault detected at sample k=1201, (L=0.5) fault no fault estimated output (a 1 ,a 3 )=(0.071,0.071)
110 Application to Fault Detection samples, this latter is due to the fact that they detect the fault thanks to the change of the pump voltage) Finally, Fig. 4.17 shows the smallest faults that the system can detect and the number of samples elapsed until the fault is detected. The good behavior of small values of L is explained here because we are using an ideal model (i.e., the data have been generated by this model). If the model was not exact, the behavior would not be so good for small observer gains. Fig. 4.17. Number of samples before the fault is detected 4.2.4 MIMO case . Now we consider the MIMO (Multi Input Multi Output) case. A set of 21000 measurement data have been obtained for the whole system. Fig. 4.18 shows the steady state final 1400 samples for each tank level. The first 500 samples of this record will be used for calibration purposes. The system in (77) can be viewed as two independent MIMO systems. In the first one, the inputs are and , and the outputs are and . The uncertain parameters are, again, and . 2 2 21 (83) 1 2 3 4 5 6 7 8 9 10 x 10-3 0 10 20 30 40 50 60 70 Fault magnitude No. of samples No. of samples before the fault is detected (L=0.1,0.5,0.9) L=0.1 L=0.5 L=0.9
Application to Fault Detection 111 In the second one, the inputs are and , and the outputs are and . The uncertain parameters are and . 2 2 21 (84) Fig. 4.18. Measurement data for the MIMO case The identified error bounds are 0.1134, 0.1098, 0.1036, and 0.1024. c. Set-membership approach Firstly, we obtain the uncertainty region for the parameters and by considering the constraint (see Fig. 4.19(a)) and then the uncertainty region for the parameters and by considering the constraint (see Fig. 4.19(b)). 02000 4000 6000 8000 10000 12000 14000 0 10 20 h 1 (cm) 02000 4000 6000 8000 10000 12000 14000 5 10 15 h 2 (cm) 02000 4000 6000 8000 10000 12000 14000 1 2 3 h 3 (cm) 02000 4000 6000 8000 10000 12000 14000 1 2 3 h 4 (cm) Time (s)
112 Application to Fault Detection (a) (b) Fig. 4.19. MIMO case. Uncertainty region for and considering constraints (a) and (b) The combination of the previous regions leads to the uncertainty region shown in Fig. 4.20(a). Fig. 4.20(b) shows the resulting region for the parameters and and constraints and . (a) (b) Fig. 4.20. MIMO case: (a) Final uncertainty region for and (b) Final uncertainty region for and d. Likelihood approach The same region shown in Fig. 4.20(a) can be obtained by computing the likelihood to obtain the measurements , for each pair of parameters ,, ,|, |, |, (85) taking a 3030 parameters grid, and considering uniform probability distributions for the residuals, |,~, and |,~,. Fig. 4.21 shows the results for 500 and a grid of 3030 values for , between 0.06 and 0.08. 0.06 0.062 0.064 0.066 0.068 0.07 0.072 0.074 0.076 0.078 0.08 -0.1 -0.05 0 0.05 0.1 0.15 0.2 0.25 a 1 a 3 Parameters (a 1 , a 3 ), constraint h 1 0.06 0.062 0.064 0.066 0.068 0.07 0.072 0.074 0.076 0.078 0.08 -0.1 -0.05 0 0.05 0.1 0.15 0.2 0.25 a 1 a 3 Parameters (a 1 , a 3 ), constraint h 3 0.06 0.062 0.064 0.066 0.068 0.07 0.072 0.074 0.076 0.078 0.08 -0.1 -0.05 0 0.05 0.1 0.15 0.2 0.25 a 1 a 3 Parameters (a 1 , a 3 ), constraints (h 1 , h 3 ) 0.05 0.052 0.054 0.056 0.058 0.06 0.062 0.064 0.066 0.068 0.07 -0.1 -0.05 0 0.05 0.1 0.15 0.2 0.25 a 2 a 4 Parameters (a 2 , a 4 ), constraints (h 2 , h 4 )
Application to Fault Detection 113 (a) (b) Fig. 4.21. MIMO case, parameters ,. (a) normalized likelihood function, (b) likelihood function contour plot. Similar results are obtained for each pair of parameters ,, by computing the likelihood to obtain the measurements , (see Fig. 4.22). (a) (b) Fig. 4.22. MIMO case, parameters ,. (a) normalized likelihood function, (b) likelihood function contour plot. 4.3 Case Study II: Wind turbine In this section we consider the generic three-bladed horizontal variable speed wind turbine with a full converter coupling that was proposed by (Odgaard, Stoustrup, and Kinnaert, 2009) as a fault detection benchmark. Recently, a second benchmark based on the same plant has been proposed by (Odgaard and Johnson, 2012). We will focus on three faults of this second challenge, one for each blade, in order to illustrate the application of the methodology developed in this dissertation. 0.06 0.065 0.07 0.075 0.08 0.085 0.06 0.07 0.08 0.09 0 0.2 0.4 0.6 0.8 1 a 1 FPS for (a 1 ,a 3 ) with constraints (h 1 ,h 3 ) a 3 Likelihood function a 1 a 3 FPS for (a 1 ,a 3 ) with constraints (h 1 ,h 3 ) 0.067 0.068 0.069 0.07 0.071 0.072 0.073 0.074 0.075 0.076 0.066 0.068 0.07 0.072 0.074 0.076 0.078 0.08 0.082 0.084 LF contour SM polytope true values 0.05 0.06 0.07 0.08 0.05 0.06 0.07 0.08 0 0.2 0.4 0.6 0.8 1 a 2 FPS for (a 2 ,a 4 ) with constraints (h 2 ,h 4 ) a 4 Likelihood function a 2 a 4 FPS for (a 2 ,a 4 ) with constraints (h 2 ,h 4 ) 0.053 0.054 0.055 0.056 0.057 0.058 0.059 0.06 0.061 0.062 0.063 0.05 0.055 0.06 0.065 0.07 LF contour SM polytope true values
114 Application to Fault Detection 4.3.1 Physical model A Simulink-based model of the wind turbine is available at (kk-electronic, 2012). It corresponds to a 5MW turbine with a hub height of 89.6m, rotor radius of 63m, rated rotor speed of 12.1rpm, and maximum pitch rate limited to 8deg/s. See (Odgaard and Johnson, 2012) for more details. The wind turbine dynamics are implemented by means of a FAST (Fatigue, Aerodynamics, Structures, and Turbulence) code. FAST is an aeroelastic wind turbine simulator designed by the U.S. National Renewable Energy Laboratory’s (NREL) National Wind Technology Center. Sensor models, actuator models and faults are implemented in Simulink, making no changes in the underlying FAST code. Actuator model: The benchmark presents several actuators: for the pitch, for the torque, and for the yaw systems. Here we will focus on the hydraulic pitch actuator model. This is a piston servo system which can be modeled as a closed loop transfer function between the pitch angle and its reference . A good approximation is a second order transfer function 2 (86) where is the damping factor and is the natural frequency. In a fault-free scenario we consider that the all three systems are equal and their nominal values are 0.6 and 11.11/. In addition, the pitch angle is restricted to be within ∈ 2°,90° and the pitch rate is restricted to ∈8°/,8°/. Sensor model: The pitch angles , 1,2,3 are provided by FAST. In order to simulate the measurement noise and the effect of the electrical noise, signals from Band Limited White Noise blocks with a noise power of 1.510 are added to the pitch angles generated by FAST. Discrete model: The nominal model in (86) can be discretized by means of several methods. If we choose the forward approximation of the derivative (which is equivalent to substitute in (86)), the resulting transfer function is 2212 (87) where is the sampling time. The backward approximation ( , ),
Application to Fault Detection 115 12 22 (88) and bilinear transform (Tustin transform, ), 2 44 82 44 (89) may be used instead. The sampling time is chosen as 80 samples per second, i.e., 0.0125. It is important to note that, in all the three discrete models, the relationship between the two model parameters and is nonlinear. Therefore, linear system identification techniques such as the strips set-membership technique considered in the previous case study cannot be used. Next sections show how the uncertainty region identification and fault detection can be successfully performed by means of the Bayesian methodology developed in this dissertation. 4.3.2 First blade. Sensor fault Fault description: The fault considered here is the Fault #4 of the benchmark. It consists of Blade 1 having a stuck pitch angle sensor, which holds a constant value of 1 deg. Fault #4 is active from 185s to 210s (i.e., from samples 14800 to 16800). The requirement is that this fault must be detected in less than ten samples, that is, the detection time must be 10. a. Calibration in a fault-free scenario The Simulink model provided by the benchmark has been used to generate a record of 50.000 samples in a fault-free scenario. Error bound: The fault-free samples have been compared to the nominal model response to the same reference signal in order to obtain an estimate of the error bound. Since the model implemented is Simulink is the nominal model (86), the resulting error is only due to the measurement noise and to the discretization method. The maximum values obtained for || have been 1.4048 for the forward approximation, 1.4184 for the Tustin approximation, and 1.4551 for the backward approximation. Note that, although
116 Application to Fault Detection the Tustin transform is the method that best approximates the analogic behavior, the error bound is greater than the one obtained by the forward approximation. We conclude that the effect of the measurement noise is much more important than the discretization error. Hence, the discretization method is not a relevant issue here and we will use the forward approximation from now on. Uncertainty region: The feasible parameter set has been obtained for a parameters grid of 4040 as the contour of the likelihood function of the nonfaulty measurements assuming uniform measurement noise, ,. We have selected 1.1max||, which in the case of the forward approximation is δ1.5452. Fig. 4.23 shows the resulting uncertainty region for (a) N=200 samples and (b) N=50.000 samples. The computation time (in a general purpose laptop) has been 9.14s and 29.21s, respectively. (a) (b) Fig. 4.23. Blade 1. Likelihood function contour plot for (a) N=200 samples and (b)N=50.000 samples. The black cross is the nominal model. b. Fault detection The uncertainty region obtained with N=50.000 samples has been used to check the existence of faults. A new record of measurements has been generated but now the data contain the Fault #4. For each new measurement, we compute the likelihood function assuming uniform distributed noise in a 4040 grid and compare it to the likelihood function of Fig. 4.23(b). In the case that the two likelihood functions present some parameters of the grid in common, we say that the data are consistent with the model and consequently we decide that there is no fault. This is the case shown in Fig. 4.24, where the measurement likelihood covers all the parameters of the uncertainty region. n Blade 1: =1.5452, N =40, N=200 3 4 5 6 7 8 9 10 11 12 13 14 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 n Blade 1: =1.5452, N =40, N=50000 345678910 11 12 13 14 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Application to Fault Detection 117 (a) (b) Fig. 4.24. Blade 1. Normalized likelihood function corresponding to the uncertainty model and likelihood function corresponding to the sample k(nofaultcase): (a) 3D plot, (b) contour plot. When the fault occurs, the likelihood function of the faulty measurement is far from the uncertainty region, therefore the product is zero for all the parameter grid values and the fault is decided. See next figure. (a) (b) Fig. 4.25. Blade 1. Normalized likelihood function corresponding to the uncertainty model and likelihood function corresponding to the sample k(faultdetected): (a) 3D plot, (b) contour plot. The fault is detected at the 14.802th sample, 2 samples after the fault has been activated. Hence, the requirement of the benchmark (less that 10 samples) is satisfied. 4.3.3 Second blade. Actuator fault Fault description: The fault considered here is the Fault #7 of the benchmark. It consists of an abrupt change of the hydraulic power. This pressure drop is modeled by changing the parameters in (86) to 5.73 and 0.45. Also, this fault is 0 5 10 15 0 0.5 1 0 0.2 0.4 0.6 0.8 1 n k=14791 n k=14791 3 4 5 6 7 8 9 10 11 12 13 14 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 5 10 15 0 0.5 1 0 0.2 0.4 0.6 0.8 1 n k=14802 --> FAULT! n k=14802 --> FAULT! 0246810 12 14 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
118 Application to Fault Detection introduced linearly from 350s to 370s, is full active from 370s to 390s, and it linearly outfaces from 390s to 410s. In short, the fault is active from sample 28.000 to sample 32.800. Next figure shows the reference signal, the measured system output and the response of the nominal model when the fault is active. Note that it is not visually clear that the system presents a faulty behavior. This is an indirect hint that this fault is going to be difficult to detect. Fig. 4.26. Fault #7 acting on the second blade The requirement is that this fault must be detected in less than eight samples, that is, the detection time must be 8. a. Calibration in a fault-free scenario Again, the Simulink model provided by the benchmark has been used to generate a record of 50.000 samples in a fault-free scenario. Error bound: We have proceed as in the Blade 1 and now the maximum values obtained for || have been 1.6163 for the forward approximation, 1.6149 for the Tustin approximation, and 1.6125 for the backward approximation. Since they are very similar, we will use the forward differences discrete model again, as in Blade 1. Uncertainty region: The feasible parameter set has been obtained following the same procedure as for the Blade 1. Here we have selected 1.1max||, which in the 345 350 355 360 365 370 7 8 9 10 11 12 13 14 15 16 Time (s) Blade 2 reference measured model
Application to Fault Detection 125 (a) (b) Fig. 4.36. Blade 3. Normalized uniform likelihood function corresponding to the uncertainty model and Gaussian likelihood function for the sample k(faultdetected): (a) 3D plot, (b) contour plot. (a) (b) Fig. 4.37. Blade 3. Product of the normalized uniform likelihood function corresponding to the uncertainty model and the Gaussian likelihood function corresponding to the sample: (a) no fault detected, (b) fault detected. c. Other extensions Probabilistic uncertainty region: From the previous results, we see that the uncertainty regions obtained assuming uniform distributed noise highly depend of the particular noise realization. Even though the underlying model and the reference signal were the same in the three blades, the resulting feasible parameter set regions were quite different. More alike uncertainty regions for the three blades can be obtained if we assume that the measurement noise is Gaussian distributed. In this case, the regions will be not hard bounded regions no more, but their shape and size will be similar for the three blades. See Fig. 4.38. 0 5 10 15 0 0.5 1 0 0.2 0.4 0.6 0.8 1 n k=35209 --> FAULT! n k=35209 --> FAULT! 3 4 5 6 7 8 9 10 11 12 13 14 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 5 10 15 0 0.5 1 0 0.2 0.4 0.6 0.8 1 n k=35207 0 5 10 15 0 0.5 1 0 0.2 0.4 0.6 0.8 1 n k=35209 --> FAULT!
126 Application to Fault Detection (a) (b) Fig. 4.38. Probabilistic uncertainty regions for (a) blade 2 and (b) blade 3. Introduction of prior knowledge: The regions shown in Fig. 4.38 are posterior probability regions since they have been obtained by assuming that the noise is Gaussian distributed , with mean 0 and standard deviation /3, and assuming that the model parameters are also Gaussian distributed with mean 11.11 0.6 and covariance matrix 100. To obtain the regions of Fig. 4.38 we have perform the product of the (Gaussian) likelihood function of the measurements with the (Gaussian) prior distribution of the parameters. This way the nominal model is nearer the center of the uncertainty region than in the case of uniform distributed noise. Fault detection: The regions of Fig. 4.38 have been used to perform the fault detection stage and the faults have been detected in 2, 4 and 9 samples after the activation for each blade respectively. This results coincide with the better results obtained in the previous sections. Note however that the number of samples before the detection depends on the selected threshold upon the product between the uncertainty region and the sample likelihood. In the Blade 3 case, for a threshold value of 0.4, the fault is detected after 9 samples (see Fig. 4.39) whereas if the threshold is 0.3, the detection is fulfilled in 13 samples. (a) (b) n Blade 2: =1.778, N =40, N=1000 99.5 10 10.5 11 11.5 12 12.5 13 13.5 14 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 n Blade 3: =1.6781, N=40, N=1000 99.5 10 10.5 11 11.5 12 12.5 13 13.5 14 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 910 11 12 13 14 0.5 0.6 0.7 0.8 0.9 0 0.2 0.4 0.6 0.8 1 n k=35199 910 11 12 13 14 0.5 0.6 0.7 0.8 0.9 0 0.2 0.4 0.6 0.8 1 n k=35209 --> FAULT!
Application to Fault Detection 127 Fig. 4.39. Blade 3. Fault detection assuming Gaussian noise and Gaussian model parameters (a) no fault detected and (b) fault detected. In the Blade 2 case, for a threshold value of 0.6, the fault is detected after 4 samples (see Fig. 4.40). If the threshold is 0.4, the detection is attained in 16 samples. (a) (b) Fig. 4.40. Blade 2. Fault detection assuming Gaussian noise and Gaussian model parameters (a) no fault detected and (b) fault detected. 4.4 Summary and conclusion In this chapter, we have illustrated the behavior of the Bayesian methodology to the uncertainty modeling oriented to fault detection. For the quadruple tank process we have obtained the Feasible Parameter Regions (FPS) for the MISO case, the MISO case with observer and the MIMO case, and we have implemented the on-line fault detection algorithm. The FPSs have been obtained by applying the strips set-membership technique explained in Chapter 2 and by computing the parameters likelihood function assuming uniform distributed noise. The likelihood approach is more intensive computationally than the strips technique but it can deal with structures nonlinear in the parameters such as the plant with output observer. In the linear case, either MISO or MIMO, the FPSs obtained by both methods coincide, thus leading to the same behavior in the fault detection stage. For the wind turbine system we have obtained three discrete models nonlinear in the parameters. Since the relationship between the model parameters is nonlinear, the linear strips set-membership technique cannot be applied. Instead we have used the methodology developed in this dissertation. Firstly we have obtained the uncertainty regions by assuming both uniform noise and Gaussian noise. In the uniform case the uncertainty regions are hard bounded and their shape and size depend on the particular noise realization. This dependence can be minimized if we assume Gaussian distributed measurement noise but, in this latter case, the regions are probabilistic. In the Bayesian framework the uncertainty regions (uniform or Gaussian) can be optionally tuned by means of the introduction of a prior distribution upon the model parameters. This may be interesting when we have some kind of prior knowledge about the model to be 910 11 12 13 14 0.5 0.6 0.7 0.8 0.9 0 0.2 0.4 0.6 0.8 1 n k=27998 910 11 12 13 14 0.5 0.6 0.7 0.8 0.9 0 0.2 0.4 0.6 0.8 1 n k=28004--> FAULT!
128 Application to Fault Detection identified, since this way we assign a higher probability where we know the “true” model is. Secondly, the obtained uncertainty regions have been used in the fault detection stage. Different types of faults have been generated in the blades’ pitch angle sensors and actuators. In the fault detection algorithm we have considered uniform and Gaussian distributions for computing the entering samples likelihood functions. In the Blade 2 case, the combination of the hard bounded uncertainty region and uniform distributed sample likelihood has failed to detect faults due to the high dependence to the noise realization of the uniform uncertainty region. This problem can be overcome by simply assuming Gaussian noise in the sample likelihood function and assigning a threshold to the resulting likelihood functions product. Actually, the product of the probabilistic uncertainty regions with the entering samples likelihood functions has successfully detected the faults in all the cases, widely satisfying the requirements of the benchmark problem.
129 CHAPTER 5 Conclusion and Future Research In this chapter we summarize and discuss the main contributions of the present dissertation and we point out some lines for future research. 5.1 Robust identification problem In this thesis, we have proposed a Bayesian methodology to formulate and solve the robust identification problem that takes elements of both stochastic and deterministic robust identification methods. Although parts of the problem have already been solved with Bayesian methods (Sjöberg et al., 1995), (Andrieu et al., 2001) (Andrieu et al., 2010), the novelty here is the definition of the so-called Bayesian Credible Model Set and the aim of establishing a framework in which all the parts of the problem can be solved within a Bayesian viewpoint. Bayesian Credible Model Set: The key point is the definition of a Bayesian Credible Model Set (BCMS). This model set is inspired in the Feasible Model Set (FMS) of deterministic methods but it is of stochastic nature and it is obtained by combining (by means the Bayes’ rule) the a priori information about the system and noise (prior probability distributions) with the a posteriori information coming from the measurement data (likelihood function). The BCMS contains all models whose posterior probability distribution conditioned to measurement data is higher than a given threshold. The BCMS can characterize different types of models. Descriptions in the parameter space and in the frequency domain have been presented. Also, by means of the use of
130 Conclusion and Future Research hierarchical distributions and/or sets of competing models, the method can deal with models where several sources of uncertainty are present (i.e., in the structure and in the parameters). In the simplest case (linear regression models with Gaussian noise and parameters) exact expressions can be derived. For moderately high order models and arbitrary non-conjugate probability distributions, simulation methods based on Markov chain Monte Carlo (MCMC) integration are used instead. As lines for future research we can include here the extension of the BCMS to the case where the support is a model space, e.g. the spaces ℓ and . Since these spaces are closely related to the Robust Control theory, it is expected that a robust identification directly performed over these spaces may lead to better robust control–oriented models. Credible regions: The model uncertainty is described by means Highest Posterior Density (HPD) credible regions. Credible regions are easier to compute than classical confidence regions and they enjoy some desirable properties compared to confidence regions. Credible regions may lead to smaller uncertainty regions (provided the adequate selection of the prior distributions), they can combine hard bounds with soft bounds, they can be disjoint, and they can be computed iteratively as new measurements are available (thus they can be updated on-line and therefore they are useful in fault detection procedures). Applications of the Bayesian Decision Theory: In this dissertation we have pointed out several applications of the Bayesian Decision Theory, including the selection of a nominal model, the model (in)validation and the optimal design of the experiments. These issues are strong candidates to future research, especially in the field of fault detection where deciding if a fault has taken place or not can be viewed as a (Bayesian, of course) hypothesis testing problem. 5.2 Interest of the Bayesian viewpoint At this point we would like to emphasize why the Bayesian viewpoint can constitute a serious alternative to the existing robust identification methods. Actually, the Bayesian viewpoint is especially appealing for several reasons: 1. Smaller probabilistic uncertainty regions can be obtained if prior assumptions about plant and noise are formally entered into the modeling procedure by means the Bayes’ rule. 2. In absence of objective a priori information, subjective prior assumptions can be formally entered on the model. Also, Bayesian inference gives tools to modify “erroneous” prior assumptions as new observations enter to the model (Box and Tiao, 1973), (Robert, 2001). However, it has to be said that the selection of subjective priors is, perhaps, the most important issue in the Bayesian methods. Since the computation of the posterior distributions is systematic, the selection of the prior distributions arises as a critical problem.
Conclusion and Future Research 131 Although there exist very interesting literature concerning the meaning and selection of subjective priors (Jeffrey, 2004), in the present work we have found that uniform and Gaussian distributions have been sufficient for the considered examples. 3. The model description in terms of probability distributions is a very general and flexible one. As we have seen, we can combine in a same model the uncertainty about the model order d and the uncertainty about the parameter vector by means the use of hierarchical priors of the form |. Moreover, no linearity assumptions are needed. This fact allows the methodology to deal, in the same manner, with structures linear in the parameters and nonlinear in the parameters. 4. Regarding the robust control application, an educated selection of the nominal model on the basis of a control-oriented penalty function during the modeling procedure is expected to produce uncertainty models more oriented to robust control. 5. Regarding the fault detection application, the computation of the likelihood functions and the posterior probability distributions can be performed recursively and therefore it can be implemented on-line. 5.3 Comparison to existing methods Several connections with the existing robust identification methods have been found. On the one hand, some of them can be viewed as particular cases of the Bayesian methodology: Particular cases: In the case where flat non-informative model priors are used, i.e., if only the likelihood function of the measurements is used, the results of the Bayesian methodology coincide with some of the existing methods. In particular, the Feasible Parameter Set (FPS) of set-membership deterministic methods can be obtained by computing the likelihood function of every set of parameters assuming uniform noise. And the same Model Error Modeling (MEM) uncertainty regions based on conventional system identification can be obtained by assuming Gaussian noise in the likelihood function computation. On the other hand, the application of the Bayesian ideas can improve the performance of the existing methods: Bayesian advantages: The suitable selection of the model prior distribution presents some advantages compared to conventional system identification methods and robust identification methods. For instance, in the frequency domain case, increasing the value of the prior precision matrix, , leads to small credible regions in general. This way, the bias/variance trade off of conventional methods can be overcome, i.e., one can take a high order model to reduce the bias error and afterwards select a spiky prior
132 Conclusion and Future Research distribution to compensate the expected increase of the size of the uncertainty region (variance error). Also, compared to the Non Stationary Stochastic Embedding method (NSSE), the Bayesian methodology is the same for the case of real poles than for the case of resonant poles and, again, smaller uncertainty regions may obtained by the adequate selection of the prior distributions. In summary, we conclude that the Bayesian framework allows a unified treatment of the robust identification problem and additionally presents interesting properties compared to single current methods. 5.4 Application to fault detection Finally, we present some concluding remarks regarding the fault detection application. In the linear in the parameters case, the computation of FPS regions by means of the likelihood function has served as a basis for a fault detection procedure of a quadruple tank process. The results have been compared to the ones obtained by the strips intersection set-membership technique explained in Chapter 2. The likelihood approach is slightly more intensive computationally than the strip technique but it can deal with non-linear structures such as the plant with output observer. In the linear case, either MISO or MIMO, the FPSs obtained by both methods coincide, thus leading to the same behavior in the fault detection stage. Also, both strips technique and likelihood technique can be implemented on-line for fault detection purposes, being the computation time similar in both cases. For the nonlinear in the parameters case, the developed methodology has been successfully tested in the uncertainty modeling and fault detection of a three-bladed wind turbine. In this case study, assuming uniform measurement noise in order to obtain hard bounded uncertainty regions has shown to be a wrong strategy for the fault detection of one of the blades. This bad result has been easily overcome by simply making the assumption of Gaussian noise. Even though in most examples we have assumed flat prior model distribution and uniform noise (in order to make easier the comparison to set-membership techniques), it has to be stressed that the Bayesian approach is a probabilistic approach, and that this stochastic nature is an advantage rather than the reverse. In a general case, the adequate selection of the model prior probability distributions may lead to probabilistic uncertainty regions that are tighter than the ones obtained by conventional system identification methods and, as we have seen, this will improve the fault detection based on them. Future research in this field may consist in developing guidelines for the subjective priors selection and the study of the main features of the probabilistic (Bayesian) fault detection.
133 APPENDIX A Optimal Estimation Theory Classical system identification methods and stochastic robust identification methods deal with the identification of , from experimental data as a standard estimation problem. In this Appendix, we summarize some concepts of Optimal Estimation Theory that are used in this thesis. For more details see the classical textbooks of (Lehman and Casella, 1998) and (Casella and Berger, 2002). A.1 Estimation problems In Estimation Theory, three main problems are posed, namely, (1) the point estimation problem, (2) the interval estimation or set estimation problem, and (3) the hypothesis testing problem. System identification relates to all three. To obtain a nominal parameter vector one has to solve a point estimation problem. To obtain a confidence region for one has to solve a set estimation problem (interval estimation problem if is real valued). And the problem of validating a model , in the sense of determining if it is inside a particular confidence region, can be viewed as a hypothesis testing problem. The fault detection problem can be interpreted as a hypothesis testing problem as well. Hypothesis testing and set estimation ask the same question, but from a slightly different perspective. Both procedures look for consistency between observations and model. The hypothesis test fixes the parameter vector and asks what observation values y (the acceptance region) are consistent with that fixed value. The confidence set fixes the observed values y and asks what parameter values (the confidence interval) make this observation value most plausible.
134 Optimal Estimation Theory A.1.2 Point estimation Estimator: An estimator of is a function from the observation space to the parameter space. For real valued observations and parameters we have :→. Since a point estimator is any function of an observation, any statistic can be a point estimator. But, in general, only sufficient statistics are considered as estimators, (Lehmann and Casella, 1998), (Box and Tiao, 1973). Intuitively, a sufficient statistic is a function of the data that summarizes all the available sample information concerning the parameters of the distribution. For instance, for the case of a normal distribution ,, a sufficient statistic for the mean and variance , is ,, where ∑ and ∑ . An estimator is characterised by its probability density function (pdf), usually computed from a N -point observation, |, its expected (mean) value , its bias , and its variance-covariance matrix . Estimator properties: A list of estimator properties can be found in (Schoukens and Pintelon, 1991). A good estimator should use all the information contained in the measurements and should exhibit unbiasedness (accuracy), consistency, sufficiency, efficiency (precision), and robustness. Some of these properties may be satisfied only asymptotically, for N tending to infinity. Let us summarize the main estimator properties. The estimator of is said to be unbiased if and only if its expectation equals to, irrespective of sample size, that is,. This implies that there are no systematic errors (bias). Nevertheless, the absolute unbiasedness is a very restrictive condition so, in many times, only asymptotic unbiasedness is required, that is, lim→, being the estimate from N measurements. For a sample of size N , the estimator is said to be consistent when it converges in probability to as N tends to infinity, lim→Pr0, ∀0. A more compact notation is lim→. Consistency is convergence in probability and the case of probability one, i.e., not asymptotic, would be the strong consistency case. Although it is common to heuristically describe consistency as unbiasedness in large samples (asymptotic unbiasedness), they are not equivalent. An unbiased estimator will always be consistent but the opposite is not necessarily true. The estimator of is said to be efficient if it possesses small (minimum) variance. The variations on due to measurement noise can be described by means of the covariance matrix, |. The diagonal of contains
Optimal Estimation Theory 141 These solutions are only possible candidates for the MLE since the first derivative being zero is only a necessary condition for a maximum, not a sufficient condition. Furthermore, the zeros of the first derivative only locate extreme points in the interior of the domain of a function. If the extrema occur on the boundary the first derivative may not be zero. Thus, the boundary must be checked separately for extrema. Points at which the first derivative is zero may be local or global minima, local or global maxima, or inflection points. There are two inherent drawbacks associated with the general problem of finding the maximum of a function: the first is that of actually finding the global maximum and verifying that, indeed, a global maximum has been found; the second problem is that the MLE may be very sensitive numerically and sometimes a slightly different sample will produce a vastly different MLE. Another way to find an MLE is to abandon differentiation and proceed with a direct maximization. This method is sometimes numerically hard to implement. b. Log-Likelihood Function In most cases, especially when differentiation is to be used, it is easier to work with the natural logarithm of |, |log| (99) known as the log-likelihood function. The log-likelihood function allows solving the MLE problem as a minimization one: argmin | (100) c. Fisher Information Matrix If the log-likelihood function | is differentiable twice, one can define the Fisher Information Matrix as: (101) This matrix measures the amount of information present in the measurements , in relation to the parameters . d. Cramér-Rao Bound
142 Optimal Estimation Theory The inverse of the Fisher matrix, , is known as the Cramér-Rao bound. This is a lower bound for the covariance matrix of an estimator. It can be shown that it is impossible to have an unbiased estimator with smaller than the Cramér-Rao bound. In fact, any estimator that reaches Cramér-Rao bound is a MLE. The existence of this bound is independent of the estimator type: it only needs the measurement noise probability distribution and the exact parameter vector to be calculated. Another feature of is that, given the same amount of information, the introduction of extra parameters in the model increases the Cramér-Rao bound, that is, it makes larger the uncertainty on the estimates. So, if the order increases, the variance decreases but the bias increases. A.2.3 Properties of Maximum Likelihood Estimators a. Properties of MLE In general, the MLE ≜argmax lim →1 | (102) is a good point estimator, possessing some nice properties (Ninness, 2009). If measurement noise is i.i.d. and the log-likelihood function | is differentiable twice, it can be shown that MLE is unique, asymptotically unbiased lim → strongly consistent, lim→ w.p.1 (with probability one) (103) and asymptotically efficient, i.e. its covariance matrix approaches the Cramér-Rao bound as N increases, 1 lim → 1 | (104) where . Moreover, the estimates present invariance properties and are asymptotically normal distributed,
Optimal Estimation Theory 143 √ → 0, as →∞ (105) Finally, these results can still hold even if is not equal to the underlying true one, but instead it merely satisfies some mild regularity conditions. b. Limitations of MLE Firstly, results (62), (104) and (105) are asymptotic in data length . But, in practice, one usually assumes that they hold approximately for finite. Secondly, these methods assume that the whole dynamics of the system can be explained by means a parameter vector . And therefore the only error of the model is in the parameters values. So these methods are not suitable for describing the model uncertainty in the way robust control needs. Thirdly, these results are valid only for the parameter vector estimate . Sometimes we need to estimate not the parameters but a function of them such as the system frequency response. In these cases one has to form a first order Taylor expansion of the function of interest about , and then use (105) to obtain the estimate of the function together with error bounds. The result will be accurate if is small, and this depends on the data length being large. A.2.4 Maximum Likelihood Estimators and System Identification a. Relationship to classical system identification Classical system identification can be viewed as a particular case of MLE. In these methods the general solution to the problem of the parameter vector identification is: ≜argmin lim → (106) where is a cost function depending on the prediction error |, 1 ℓ (107) The function ℓ is an arbitrary positive mapping and it is usually chosen as ℓ ‖‖. The measurement noise is assumed i.i.d. zero mean Gaussian and thus prediction errors are also assumed ~, with 0 and independent,
144 Optimal Estimation Theory 1 √2exp 2 Since loglog√2log2 2 we have ℓ22loglog√2log On the other hand, the log-likelihood function can be expressed as log|log∏ ∑log ∑log Thus, we can write (107) as 2 loglog√2log 2 log|log√2log In other words, minimizing is equivalent to minimize log| and this is equivalent to maximize |. Thus classical system identification methods are a particular case of ML estimation. b. Computational implementation of the LSE Regarding the computational implementation of equations , if we define ∑ , normal equations are expressed as ∑ (Ljung, 1999a). Computation of avoids construction of matrix F since this may be ill-conditioned. Instead, a so-called “square root algorithm” is used and a matrix M is constructed with the property . There exist different possibilities for the construction of M. QR factorizations have been used in the simulation examples of this thesis. The QR factorization of a matrix ∈ is defined as , ∈ and ∈,where Q is orthonormal, Q, and R is upper triangular.
Optimal Estimation Theory 145 Time domain: Forr the time domain case, , the problem is solved by choosing and , where is 1, is a triangular matrix, is 1, is scalar. The LS criterion function V N is not affected by the orthonormal transformation Q applied to the vector , ||||. Therefore, || 1 1 1 Finally, |||| That is, V N is minimized for , giving min||. Frequency domain: For the frequency domain case the procedure is analogous. We only have to express the system frequency response in matrix notation, , and choose . Let us define and . The system frequency response can be expressed as ,0,1,…,1 where is the system frequency response “measured” at frequency . In fact, frequency response is not directly measured but estimated from time domain inputoutput data. The estimate is usually optimal in a least squares sense. Therefore the error term is due to both measurement noise corrupting original time domain data and frequency response estimation error. Assuming that the model is parameterized in terms of basis functions, the model frequency response at frequency can be expressed in terms of the frequency response of the basis functions as … ⋮
146 Optimal Estimation Theory For convenience we separate real part and imaginary part of the model frequency response, Re Im Thus, “output vector” G corresponding to the frequency domain measures is a realvalued vector of length 2 M , ReIm … ReIm and regression matrix is a 2 M d matrix, ⋮ Re⋯Re ImIm ⋮⋮ ReRe Im…Im In matrix notation, . Computing frequency domain data G from time domain measurements is a first step in many robust identification techniques such as the non-stationary stochastic embedding. A.3 Summary of point estimators Table A.2 summarizes the main point estimators and it is based in the (Eykhoff, 1974) classification of the most used point estimators depending on the (pdf) information required about the measurement noise v, the plant to be identified , and the cost of wrong modeling ,. Note that we assume that the plant can be modelled by so the system identification problem is reduced to obtain a good estimate for . Least Squares (LS) Weighted Least Squares (WLS) Maximum Likelihood (ML) Maximum a Posteriori (MAP) Minimum Risk (MR) A priori info about v none , about θ none none none about cost none none none none , Assumptions about v ~ 0, ~ , none none none about θ ∝ ∝ ∝ none none about cost n.c.(1) n.c n.c n.c , (2) Objective criterion min‖‖ (3) min‖‖ (3) max | max | min |, (1) n.c.: not considered, (2) cost can be either known or assumed, (3) they are equivalent to ML Table A.2. Summary of point estimators. Prior knowledge vs. arbitrary assumptions
Optimal Estimation Theory 147 The Least Squares Estimate (LSE) is the one that needs less information. In fact no prior information is required about measurement noise, plant, or cost. Instead, LSE arbitrarily assumes that noise v is i.i.d. Gaussian with mean 0 and covariance matrix . The optimal is the one that minimises the squared prediction error, where the prediction error is in the linear regression case. On the other hand, the Bayesian Minimum Risk (MR) Estimate is the one that makes more use of prior information. It is necessary to specify the distribution of noise , the distribution of the parameter vector and the cost , to be minimised. A.4 Example This example is based on the example of (Ninness, 2009) and (Ninness and Henriksen, 2010). A.4.1 Experiment The data generating process (true plant) is . .,1.., so the true parameter vector is ,0.2,0.8. The experiment consists of only 20 samples of the excitation signal , 1, 10 0, 0 The measurement noise sequence is i.i.d. uniform with zero mean and variance 0.01. In the uniform distribution , the mean value is given by , so to have zero mean we need that . And the variance is given by so to have variance equal to 0.01 we need √120.1732 (Casella and Berger, 2002, p99). Next figure show the system output: Fig. A.1. Experiment 0 2 4 6 8 10 12 14 16 18 20 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Time System output true noisy samples
148 Optimal Estimation Theory A.4.2 Maximum Likelihood Point Estimation The prior information is: About noise: We know the noise pdf. It is i.i.d uniform with zero mean and variance 0.01. About plant: We do not know the parameter vector pdf. Therefore, we assume it is constant. About cost: We do not know which is the cost of selecting but we do not care about it. The optimal solution is the one that maximizes the likelihood function, argmax|. Result: Next figures show the likelihood function and the true parameter vector: (a) (b) Fig. A.2. MLE: Likelihood function Comments: The true parameter vector is effectively at the top of the likelihood function, but we cannot “isolate” it due to the form of the uniform distribution. So, this optimization problem presents no unique solution. A.4.3 Least Squares Point Estimation The prior information is: About noise: We do not know the noise pdf. Therefore, we assume it is i.i.d normal with zero mean and unit variance. About plant: We do not know the parameter vector pdf. Therefore, we assume it is constant. About cost: We do not know which is the cost of selecting but we do not care about it. 00.1 0.2 0.3 0.4 -1 -0.9 -0.8 -0.7 -0.6 0 0.5 1 1.5 2 x 10 9 1 2 Likelihood function 1 2 00.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 -1 -0.95 -0.9 -0.85 -0.8 -0.75 -0.7 -0.65 -0.6 LF true
Optimal Estimation Theory 149 In short, no prior information is required. The optimal solution is the one that minimizes the square of the prediction errors, argmin‖‖. But in this example we are going to find the solution by maximizing the likelihood function obtained with the assumption of normal noise, argmax|. Results: Next figures show the likelihood function and the true parameter vector: (a) (b) Fig. A.3. LSE: Likelihood function And the following ones the log-likelihood function and the true parameter vector: (a) (b) Fig. A.4. LSE: Log-likelihood function The LS estimate obtained numerically is 0.1898,0.8169. This result can be improved by taking denser parameter vectors. A.4.4 Weighted Least Squares Point Estimation (Markov Point Estimation) 00.1 0.2 0.3 0.4 -1 -0.9 -0.8 -0.7 -0.6 0 0.2 0.4 0.6 0.8 1 1.2 x 10 -8 1 LSE 2 Likelihood function 1 2 LSE 00.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 -1 -0.95 -0.9 -0.85 -0.8 -0.75 -0.7 -0.65 -0.6 LF true 00.1 0.2 0.3 0.4 -1 -0.9 -0.8 -0.7 -0.6 -100 -80 -60 -40 -20 0 1 LSE 2 LogLikelihood 1 2 LSE 00.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 -1 -0.95 -0.9 -0.85 -0.8 -0.75 -0.7 -0.65 -0.6 logLF true
150 Optimal Estimation Theory The prior information is: About noise: We do not know the noise pdf but we know its mean and variance . Therefore, we assume it is i.i.d normal ,. About plant: We do not know the parameter vector pdf. Therefore, we assume it is constant. About cost: We do not know which is the cost of selecting but we do not care about it. In short, only information about the noise mean and variance is required. The optimal solution is again the one that minimizes the mean square of the prediction errors, argmin‖‖. And, again, in this example we are going to find the solution by maximizing the likelihood function obtained with the assumption of normal noise, argmax|. Results: Next figures show the likelihood function and the true parameter vector: (a) (b) Fig. A.5. WLSE: Likelihood function And the following ones the log-likelihood function and the true parameter vector: (a) (b) Fig. A.6. WLSE: Log-likelihood function 0.1 0.15 0.2 0.25 0.3 0.35 -0.9 -0.8 -0.7 -0.6 -0.5 0 2 4 6 8 10 12 x 10 11 1 WLSE 2 Likelihood function 1 2 WLSE 0.1 0.12 0.14 0.16 0.18 0.2 0.22 0.24 0.26 0.28 -0.9 -0.88 -0.86 -0.84 -0.82 -0.8 -0.78 -0.76 -0.74 -0.72 -0.7 LF true 0.1 0.15 0.2 0.25 0.3 0.35 -0.9 -0.8 -0.7 -0.6 -0.5 -600 -400 -200 0 200 1 WLSE 2 LogLikelihood 1 2 WLSE 0.1 0.12 0.14 0.16 0.18 0.2 0.22 0.24 0.26 0.28 -0.9 -0.88 -0.86 -0.84 -0.82 -0.8 -0.78 -0.76 -0.74 -0.72 -0.7 logLF true