Dynamic Bayesian Approach for Control Loop Diagnosis with

Jul 28, 2010 - In this article, first, a hidden Markov model is built to address the ... develop a recursive autoregressive hidden Markov model for on...
0 downloads 0 Views 943KB Size
Ind. Eng. Chem. Res. 2010, 49, 8613–8623

8613

Dynamic Bayesian Approach for Control Loop Diagnosis with Underlying Mode Dependency Fei Qi and Biao Huang* Department of Chemical and Materials Engineering, UniVersity of Alberta, Edmonton, AB, T6G 2G6 Canada

In this article, first, a hidden Markov model is built to address the temporal mode dependency problem in control loop diagnosis. A data-driven algorithm is developed to estimate the mode transition probability. The new solution to mode dependency is then further synthesized with the solution to evidence dependency to develop a recursive autoregressive hidden Markov model for online control loop diagnosis. When both the mode and evidence transition information sets are considered, the temporal information is effectively synthesized under the Bayesian framework. A simulated distillation column example and a pilot-scale experiment example are investigated to demonstrate the ability of the proposed diagnosis approach. Introduction A typical modern chemical site consists of hundreds or even thousands of control loops, which creates an overwhelming challenge for plant personnel to detect and isolate control loops with deteriorated performance. Furthermore, even if poor performance is successfully detected in some control loops, because of interactions among control loops, a problem in a single process component could invoke widespread control performance degradation, leading to numerous alarms. Without an advanced information analysis framework, it is difficult to handle the overwhelming information flood in terms of process data and alarms, to determine the source of the underlying problem. Human beings’ inability to analyze a large amount of high-dimensional data is the main reason behind this problem. With motivation from practice, control loop performance assessment and diagnosis have always been an active research topic in the process control community.1-3 The goal is to develop an automated procedure that delivers clear and precise information to plant personnel to determine whether specified performance targets are being met by the controlled process variables3 and that suggests possible sources of problematic control performance. Despite intensive research and successful applications in control loop performance assessment,1-6 as well as monitoring of components within the control loop,7-10 many problems remain. One outstanding problem is that monitoring algorithms often focus on one specific problem, while ignoring the potential abnormalities in the other unattended components. Clearly, this can lead to a high number of false and missed alarms. Thus, it is desirable to develop approaches that are capable of synthesizing the information from different monitor outputs to generate effective control loop diagnosis. According to Huang,11 some challenging issues exist for the monitor synthesis problem. The first is the existence of similar symptoms among different problem sources. For instance, oscillations can be invoked by either a sticky valve or an improperly tuned controller. Another problem is that no process monitor can have a 100% detection rate and a 0% false alarm rate, and thus, a probabilistic framework should be built to represent the uncertainties between problem sources and monitor readings. * To whom correspondence should be addressed. E-mail: biao.huang@ ualberta.ca. Tel.: +1-780-492-9016. Fax: +1-780-492-2881.

In view of the challenges listed above, the Bayesian method has been used to provide an effective probabilistic information synthesis framework. Built upon previous work in Bayesian fault diagnosis by Pernesta˚l12 and a framework laid out by Huang,11 a data-driven Bayesian algorithm for control loop diagnosis that considers missing data was developed by Qi et al.13 The algorithm is applied to a simulated example and an industrial process, where the information-synthesizing ability of the approach has been demonstrated. However, the existing data-driven Bayesian algorithm is inadequate for capturing the temporal dependency in the data. There are two key elements in the Bayesian methods: the evidence (readings from the monitors) and the underlying operating mode (status of the control loop). In Qi and Huang,14 the temporal information in terms of evidence transition is synthesized within the Bayesian framework to improve diagnosis performance. In this article, the temporal dependency of the underlying modes will be considered. The article is concluded by integrating the two solutions in the comprehensive temporal-dependency problem. The remainder of this article is organized as follows: The general control loop diagnosis problem and preliminaries are described first. The fundamentals of the data-driven Bayesian approach for control loop diagnosis, as developed in Qi et al.13 and further improved through consideration of evidence dependency as discussed in Qi and Huang,14 are briefly revisited. A recursive solution based on the deliberation of mode dependency and the associated data-driven algorithm for mode transition probability estimation are then detailed. Then, the evidence and mode dependency are incorporated into an autoregressive hidden Markov model framework. The data dependency handling ability of the proposed approach is demonstrated by examining the diagnosis performance in simulation and experiment problems. The final section concludes this article with a discussion of the results achieved. Revisiting Data-Driven Bayesian Diagnosis Control Loop Diagnosis Problem. Generally, a control loop consists of a controller, an actuator, a process, and a sensor, all of which are subject to certain faults. In this work, monitors are assumed to be either directly or indirectly available for all of the components of interest (i.e., those with possible malfunctions). These monitors, however, are all subject to disturbances and thus can produce false alarms, and each monitor might be

10.1021/ie100058y  2010 American Chemical Society Published on Web 07/28/2010

8614

Ind. Eng. Chem. Res., Vol. 49, No. 18, 2010

sensitive to abnormalities of other problem sources. Our aim is to isolate the source of problematic control performance based on available monitor readings. Qi et al.13 showed that, in the presence of disturbances, Bayesian inference provides a well-suited information synthesizing framework by quantifying the uncertainty in the diagnosis process. To adopt the Bayesian method for control loop diagnosis, several notations need to be introduced. Mode M. Suppose that a control loop under diagnosis consists of P components of interest, C1, C2, ..., CP, among which the problem source might lie. All of these components are subject to possible abnormalities. Each component is said to have a set of discrete operating statuses, normal or faulty. For instance, the sensor might be biased or unbiased. The task of the control loop diagnosis problem is to determine the operating status of each of these components, that is, to isolate the underlying problem source of problematic control performance. A vector value representing the operating statuses of all of the components of interest in the control loop is called a mode and is denoted as M. M can take different values, and a specific value is denoted by m, for example, m ) (C1 ) well-tuned controller, C2 ) valve with stiction, ...). Suppose that component Ci has qi different statuses. Then, the total number of possible modes is P

Q)

∏q

i

i)1

and the set of all possible modes can be denoted as M ) {m1, m2, ..., mQ} In Qi et al. and Qi and Huang,13,14 modes are assumed to evolve independently over the time, that is, the next mode is independent of the current or past modes. Evidence E. The monitor readings, called evidence, are input to the diagnostic system and are denoted as E ) (π1,π2, ..., πL), where πi is the output of the ith monitor and L is the total number of monitors. Often, continuous monitor readings are discretized according to predefined thresholds. In this work, the monitor readings are all assumed to be discrete. For example, the control performance monitor might indicate optimal, normal, or poor. A specific value of evidence E is denoted as e; for example, e ) (π1 )optimal control performance, π2 ) no sensor bias, ...). Suppose that a single monitor output πi has ki different discrete values. Then, there are a total of

mt. This can be denoted as dt ) (et, mt), and the set of historical evidence data is denoted as ˜

D ) {d1, d2, ..., dN} ˜ is the total number of historical evidence data samples. where N In Qi et al.,13 all of the historical evidence data samples are assumed to be independent, which leads to the expression ˜

(1)

To have a good diagnosis performance, it is suggested that the number of historical evidence data samples be no less than 10 times the product of the number of monitors and the number of modes. Data-Driven Bayesian Diagnosis Approach. A data-driven Bayesian diagnosis approach for control loop performance is proposed in Qi et al.13 Given current evidence E and historical evidence data set D, the probability of each possible system mode can be calculated according to Bayes’ rule p(M|E, D) )

p(E|M, D) p(M|D) p(E|D)

(2)

where p(E|M, D) is the probability of having current evidence E, conditioning on mode M with historical evidence data D, also known as the likelihood probability; p(M|D) is the prior probability of mode M; and p(E|D) is a scaling factor, which can be calculated as p(E|D) ) ΣMp(E|M, D) p(M|D). Note that the historical evidence data are selectively collected when the control loop operates under different modes; therefore, the data provide no information about prior probabilities of the abnormalities, and as a result, p(M|D) ) p(M). Among all the possible modes, generally the one with the largest posterior probability is chosen as the underlying mode based on the maximum a posteriori (MAP) principle, and the abnormality associated with this mode is diagnosed as the problem source. Because prior probabilities are determined by a priori information, the main task of building a Bayesian diagnostic system is the estimation of the likelihood probabilities with historical evidence data D, the objective of which is to make the estimated likelihood probabilities consistent with historical evidence data D. In Qi et al.,13 a data-driven Bayesian algorithm for estimating the likelihood probability is proposed based on the works of Pernesta˚l12 and Huang.11 Suppose that the likelihood of evidence E ) ei under mode M ) mj is to be calculated, where

L

K)

˜

p(D) ) p(d1, d2, ..., dN) ) p(d1) p(d2) · · · p(dN)

∏k

ei ∈ E ) {e1, ..., eL}

i

i)1

and different evidence values, and the set of all evidence values can be denoted as

mj ∈ M ) {m1, ..., mQ}

E ) {e1, e2, ..., eK}

The following result can be obtained for the likelihood probability12

Historical Evidence Data Set D. We use the term process data to represent the readings from physical instruments such as temperature, pressure, and so on. The term evidence data refers to readings of monitors that are calculated typically from a segment of process data. Historical evidence data are retrieved from the past record where the modes of the control loops, namely, the statuses of all components of interest in the control loops, are available and the corresponding monitor readings are also recorded. Each sample dt at time t in the historical evidence data set D consists of the evidence et and the underlying mode

p(E ) ei |M ) mj, D) )

ni|mj + ai|mj Nmj + Amj

(3)

where ni|mj is the number of historical evidence samples with the evidence E ) ei and mode M ) mj and ai|mj is the number of prior samples that are assigned to evidence ei under mode mj. Nmj ) ∑ini|mj, and Amj ) ∑iai|mj. Temporally Dependent Evidence Handling. Note that, in the approach described above, the assumption is that the current

Ind. Eng. Chem. Res., Vol. 49, No. 18, 2010

Figure 1. Bayesian model with independent data samples.

Figure 3. Bayesian model considering dependent mode.

Figure 2. Bayesian model that considers dependent evidence.

evidence depends only on the current mode and is independent of the previous evidence. Another assumption is that the underlying modes are also independent. Based on these two assumptions, the data-driven Bayesian diagnostic approach in Qi et al.13 was developed. The corresponding graphic model is shown in Figure 1. The two assumptions, however, are not always true in practice; some important temporal information that is useful for generating accurate diagnosis results is ignored. Relaxation of the first assumption regarding the temporal dependency of the evidence was solved in Qi and Huang.14 Assume that the current evidence depends on both the current underlying mode and the previous evidence and that the evidence dependency follows a Markov process. The corresponding graphic model is shown in Figure 2. With the consideration of evidence dependency, the mode posterior probability is calculated as

The dynamic Bayesian model15 is commonly used to represent the mode dependency. Consider that the mode transition follows a Markov process, in which a mode is dependent only on its immediately previous neighbor in the temporal domain. By adding directed lines that represent dependencies between the consecutive modes depicted in Figure 1, a graphical model with temporal-dependent modes as shown in Figure 3 is constructed. The model is also known as the hidden Markov model.16 To estimate the probability of the current system mode, previous evidence also needs to be taken into consideration because of the dependency of the underlying modes p(Mt |E1, ..., Et) )

p(E1, ..., Et |Mt) p(Mt) p(E1, ..., Et)

∑ p(E , ..., E , M 1

) )

t

t-1

|Mt) p(Mt)

Mt-1

p(E1, ..., Et)

∑ p(E |M , M t

t

t-1

, E1, ..., Et-1)p(E1, ..., Et-1, Mt-1 |Mt) p(Mt)/

Mt-1

p(E1, ..., Et) t

, E , D) ∝ p(E |M , E

t-1

p(M |E

t

t

t

t-1

t

, D) p(M )

n˜s,r + bs,r N˜s + Bs

(6)

(4)

where p(Et|Mt, Et-1, D) is the evidence transition probability. It can be estimated as p(Et ) er |Mt ) mc, Et-1 ) es, D) )

8615

According to the Markov property, given current mode Mt, current evidence Et is conditionally independent of the previous modes Mt-i for i g 1 and previous evidence Et-j for j g 1. Thus

(5)

where n˜s,r is the number of evidence transitions from evidence Et-1 ) es to Et ) er in the historical evidence data set under mode M ) mc, bs,r is the number of prior samples that are assigned to evidence transition from Et-1 ) es to Et ) er under mode Mt ) mc, N˜s ) ∑in˜s,i, and Bs ) ∑ibs,i. Mode Dependency In engineering practice, the assumption that the current system mode is independent of previous modes is not general enough. For example, the fact that new equipment has more of a tendency to operate normally in the future than aged equipment is not considered. On the other hand, if a system is in a faulty mode, without any repair action being taken, it is more likely that the system will remain in the same faulty status. Furthermore, the system mode can also change as a result of shifts in regular operating condition. All of these mode changes might follow some patterns, and thus, it will be beneficial to consider the mode dependency when performing diagnosis. Note that, in this section, we consider only the mode dependency problem. The most general case when, both the mode and evidence have temporal dependencies, is addressed in the next section.

∑ p(E |M ) p(E , ..., E t

p(Mt |E1, ..., Et) )

t

1

t-1

, Mt-1 |Mt) p(Mt)

Mt-1

p(E1, ..., Et)

(7) In eq 7, the term p(E1, ..., Et-1, Mt-1|Mt) can be calculated based on Bayes’ rule p(E1, ..., Et-1, Mt-1 |Mt) ) p(Mt |E1, ..., Et-1, Mt-1) p(E1, ..., Et-1, Mt-1) p(Mt)

(8)

Inserting eq 8 into eq 7 gives p(Mt |E1, ..., Et) )

∑ p(E |M ) p(M |E , ..., E t

t

t

1

t-1

, Mt-1) p(E1, ..., Et-1, Mt-1)

Mt-1

p(E1, ..., Et)

(9)

It is also known that, given Mt-1, Mt should be conditionally independent of E1, ..., Et-1. Therefore

8616

Ind. Eng. Chem. Res., Vol. 49, No. 18, 2010

p(Mt |E1, ..., Et)

∑ p(E |M ) p(M |M t

) )

t

t

t-1

) p(E1, ..., Et-1, Mt-1)

Mt-1

p(E1, ..., Et)

∑ p(E |M ) p(M |M t

t

t

t-1

) p(Mt-1 |E1, ..., Et-1)p(E1, ..., Et-1)/

Mt-1

p(E1, ..., Et)

) p(Et |Mt) p(E1, ..., Et-1)

∑ p(M

t-1

|E1, ..., Et-1) p(Mt |Mt-1)

Mt-1

p(E1, ..., Et)

(10)

which means p(Mt |E1, ..., Et) ∝ p(Et |Mt)

∑ p(M

t-1

|E1, ..., Et-1) p(Mt |Mt-1)

Mt-1

(11) Equation 11 provides a recursive solution for calculating the probability of the current system mode in the presence of mode dependency. To apply this equation, in addition to the single evidence likelihood, p(Et|Mt), the mode transition probability, p(Mt|Mt-1), also needs to be estimated, which will be discussed shortly. In addition to the ability to handle the time-domain information in terms of mode dependency, another advantage of the proposed approach lies in the fact that this approach is less likely to be affected by inaccurate prior probability. In view of eq 11, there is no need to calculate prior probability. All of the information required to compute the mode posterior probability includes the following: (1) the mode transition probability, p(Mt|Mt-1); (2) the single evidence likelihood probability, p(Et|Mt), where both 1 and 2 can be estimated from the historical evidence data set; and (3) the mode posterior probability as calculated diagnosis results from the previous diagnosis, p(Mt-1|E1, ..., Et-1). Although the prior probability is still necessary to calculate the first mode probability p(M1|E1) when no “previous mode” is available p(M1 |E1) ∝ p(E1 |M1) p(M1)

(12)

the impact of the prior probability will diminish as more evidence accumulates, according to eq 11. The posterior probability equation for single evidence diagnosis can be rewritten according to Bayes’ rule as p(Mt |Et) ∝ p(Et |Mt) p(Mt)

(13)

A comparison of eq 11 and eq 13 shows that the term p(Et|Mt) appears in both equations, and they both update the information by considering newly emerging evidence; the remaining terms in the two equations, ∑Mt-1p(Mt-1|E1, ..., Et-1) p(Mt|Mt-1) and p(Mt), respectively, are determined before the arrival of the new evidence Et. Thus, we can equivalently treat ∑Mt-1p(Mt-1|E1, ..., Et-1) p(Mt|Mt-1) as the “prior” term in the recursion. The difference is that the term ∑Mt-1p(Mt-1|E1, ..., Et-1) p(Mt|Mt-1) is constantly updated with new evidence and the mode transition probability. Thus, it is not surprising to see that the impact of prior probability in the first recursion will eventually diminish as more evidence data samples are collected. Therefore, when sufficient evidence data samples are available, we can claim that the term ∑Mt-1p(Mt-1|E1, ..., Et-1) p(Mt|Mt-1) is completely determined by the data and, thus, is free from the negative impact of inaccurate prior probabilities.

Figure 4. Historical composite mode data set for mode transition probability estimation.

Estimation of Mode Transition Probability. The intention of the estimation of mode transition probability is to make the estimated probabilities consistent with the historical evidence data set D in which the mode dependency exists. Our goal is to calculate the likelihood probability of a mode Mt given previous mode Mt-1 to reflect the Markov property, so every composite mode sample, which is defined for mode transition probability estimation purpose, should include two elements t-1 dM ) {Mt-1, Mt}

(14)

It should be noted that, because our focus is on only the mode transition, not the evidence transition, which is considered in the next section, the composite mode sample dtM includes only the transitions of the underlying modes (i.e., two consecutive modes). Accordingly, the new composite mode data set DM, which is assembled from the historical evidence data set D to estimate of the mode transition probability, is defined as ˜

˜

˜

1 N-1 DM ) {dM , ..., dM } ) {(M1, M2), ..., (MN-1, MN)}

(15) Figure 4 depicts how the collected historical evidence data are organized to form composite mode samples. In Figure 4, the nodes highlighted with shading or enclosed by the solid-lined frame constitute a single composite mode sample, as described by eq 14. Following an approach similar to that outlined in Qi and Huang,14 the mode transition probability can be derived as p(mV |mu, DM) )

nˆu,V + cu,V Nˆu + Cu

(16)

where nˆu,V is the number of mode transitions from mu to mV in the historical composite mode data set, Nˆu ) ∑jnˆu,j is the total number of mode transitions from mode mu to any other mode, cu,V is the number of prior samples for the mode transition from mu to mV, and Cu ) ∑jcu,j is the total number of prior mode transitions from mu to any other mode. See the Appendix for the derivation of eq 16. By comparing eqs 3 and 5 with eq 16, we can see that the mode transition probability is also determined by both prior samples and historical data samples, similarly to the single evidence likelihood calculation and evidence transition probability calculation introduced in eqs 3 and 5. The difference lies in how the numbers of prior and historical samples are counted. In eqs 3 and 5, the prior and historical samples refer to a count of the evidence samples or evidence transitions that correspond to a target mode, whereas in eq 16, the prior and historical samples refer to the count of the composite mode samples assembled from the historical evidence samples. As the number of historical composite mode samples increases, the transition probability converges to the relative

Ind. Eng. Chem. Res., Vol. 49, No. 18, 2010

8617

dependency in the time domain p(Mt |E1, ..., Et) )

p(E1, ..., Et |Mt) p(Mt) p(E1, ..., Et)

Figure 5. Dynamic Bayesian model that considers both mode and evidence dependency.

)

Mt-1

frequency determined by the historical composite mode samples, and the influence of the prior probabilities decreases. The number of prior samples can be interpreted as prior belief of the mode transition probability distribution, where a uniform distribution indicates that prior sample numbers are equal across all possible transitions. It is important to set nonzero prior sample numbers; otherwise, unexpected results might occur in the case of limited historical samples.12 Readers are referred to Qi and Huang14 for a detailed explanation of the transition probability calculation. In Qi and Huang,14 an evidence space reduction solution is proposed to handle the intensive historical data needed for evidence transition probability estimation. This space reduction, however, is unnecessary for mode transition estimation. The problem with the evidence transition probability estimation arises from the large combinatorial number of evidence transitions. The limited historical composite evidence data are divided into small subspaces defined by different evidence transitions and the underlying modes. For example, consider a diagnostic system with 10 monitors and 10 modes, where each single monitor output is discretized into two discrete values. The total number of possible evidence transitions equals

)

∑ p(E |M , M

∑ p(E , ..., E , M 1

K ) 210 × 210 ) 1048576

(17)

With the underlying modes, which have 10 different statuses, being further considered, there is a total of approximately 107 possible subspaces into which each single composite evidence sample can fall. However, the total number of possible mode transitions equals K ) 10 × 10 ) 100

(18)

which does not increase exponentially with the number of the modes. Mode transition space reduction is not required.

t

t-1

|Mt) p(Mt)

p(E1, ..., Et) t

t

t-1

, E1, ..., Et-1)p(E1, ..., Et-1, Mt-1 |Mt) p(Mt)/

Mt-1

p(E1, ..., Et)

(19)

Note that the current evidence is determined by both the current mode Mt and previous evidence Et-1 p(Mt |E1, ..., Et) ) p(Et |Mt, Et-1) p(E1, ..., Et-1, Mt-1 |Mt) p(Mt)



Mt-1

p(E1, ..., Et)

(20)

By following a procedure similar to that in the previous section, a recursive solution can be expressed as p(Mt |E1, ..., Et) ∝ p(Et |Mt, Et-1)

∑ p(M

t-1

|E1, ..., Et-1) p(Mt |Mt-1)

(21)

Mt-1

With previous mode posterior p(Mt-1|E1, ..., Et-1), two transition probabilities are required to calculate the current mode posterior, namely, the evidence transition probability p(Et|Mt,Et-1) and the mode transition probability p(Mt|Mt-1). The estimation algorithms of the first probability are detailed in Qi and Huang,14 and the second is developed in the previous section of this article. With the consideration of data dependency, the ability to retrieve the time-domain information hidden in both the evidence and mode transitions, along with insensitivity to inaccurate prior probability, provides a significant advantage to the proposed approach in comparison to the Bayesian diagnosis solution based on information solely from single evidence without considering data dependency. Case Studies

Dependent Evidence and Mode Up to now, we have discussed two different types of temporal dependency: evidence dependency, addressed in our previous work,14 and mode dependency, addressed in this article. In reality, both kinds of dependencies might exist. Thus, it is necessary to consider evidence dependency and mode dependency simultaneously. With both mode and evidence dependencies being considered, a dynamic Bayesian model15 is established to represent the temporal dependency between data samples. By adding directed lines, which represent dependencies, between consecutive modes and evidence as shown in Figure 1, the proposed model is constructed in Figure 5. The model structure is also known as the autoregressive hidden Markov model.16 Following derivations similar to those used in the previous section, a recursive solution can be developed. To estimate the probability of the current system mode, the previous evidence also needs to be taken into consideration because of the evidence

Four different data dependency handling strategies, namely, simply ignoring both temporal dependencies, considering only the evidence dependency, considering only the mode dependency, and considering both the mode and evidence dependencies, are applied to a simulation example and a pilot-scale experiment to compare the diagnosis performances. Simulation Example. A simulated binary distillation column,17 as shown in Figure 6, is selected to evaluate the four Bayesian diagnostic approaches. Process Description. The distillation column has five inputs, four of which are manipulated variables (MVs) operated by a model predictive control (MPC). Of the 10 outputs, three are considered controlled variables (CVs). They are the top product (distillate) quality measured as the final boiling point (FBP top), the bottom product (pressure-compensated) temperature (PCT bottom), and the column pressure. The process is subject to several different possible abnormalities. All of the possible modes and corresponding problematic components are listed in Table 1.

8618

Ind. Eng. Chem. Res., Vol. 49, No. 18, 2010 Table 3. Summary of Bayesian Diagnosis Parameters discretization historical evidence data prior samples prior probabilities evaluation data

Figure 6. Simulated binary distillation column.

ki ) 3 (low, medium, high); K ) 315 ) 14348907 mixture of a total of 3000 from all 10 modes uniformly distributed with prior samples, for single evidence space, evidence transition space, and mode transition space p(NF) ) 0.2, p(m1) ) 0.1, p(mother) ) 0.0875 mixture of 2000 samples from all possible modes

the FBP top and PCT bottom sensor signals to introduce the evidence dependency into the simulation. The change in the bias in the FBP top follows the transition probability matrices shown in eq 23, where the transition probabilities of FBP bias , are different from those under the other under mode m3, PmFBP 3 FBP ; the change in bias in the PCT bottom follows the modes P¬m 3 transition matrices shown in eq 24, where the transition , are different probabilities of PCT bias under mode m7, PmPCT 7 PCT . from those under the other modes P¬m 7

Table 1. Operating Modes mode

problematic components

NF m1 m2 m3 m4 m5 m6 m7 m8 m9

none (normal functioning mode) poorly tuned MPC controller feed temperature valve stiction duty valve stiction FBP top and PCT bottom model mismatch PCT bottom model mismatch PCT bottom disturbance dynamic change pressure disturbance dynamic change FBP top sensor bias pressure sensor bias

Table 2. Summary of Monitors monitor π1 π2, π3, π4 π5, π6 π7, π8, π9 π10, π11, π12 π13, π14, π15

description overall control performance monitor univariate control performance monitors for the three quality variables valve stiction monitors for the two possible problematic valves process model validation monitors for the three quality variables disturbance change monitors for the three quality variables sensor bias detection monitors for the three quality variables

Fifteen monitors are commissioned to monitor the system, as summarized in Table 2. Some might be subject to a high false-alarm/misdetection rate.13 Both the mode and evidence are set to be dependent on their counterparts in the previous sample. When simulation parameters are set, it is assumed that a hardware abnormality or an external disturbance change has a much lower probability of disappearing once the abnormality occurs, which also means that it is more unlikely to shift from other modes to the NF or m1 mode, which are neither hardware modes nor disturbance modes. Other transitions have the same probability. Further assume that the hardware of the system is prone to problems and that the NF and m1 modes thus have low probabilities to persist. In summary, the mode transition probability matrix is shown in eq 22

In addition to the original measurement noise, random binary bias with two different levels, defined as 0 and 1, is added to

Diagnosis Settings and Results. A total of 5000 consecutive evidence data samples are collected. Among the collected samples, the first 3000 are used to estimate the single evidence likelihood, evidence transition probability, and mode transition probability. The remaining 2000 samples are used for crossvalidation. The parameter settings of the Bayesian diagnostic system are summarized in Table 3. The evidence transition space is a highdimensional one. According to a procedure introduced by Qi and Huang,14 the evidence transition space is compressed to reduce the intensive requirement of historical evidence data. The diagnosis results in Figure 7 were obtained from the 2000 evaluation (cross-validation) evidence data samples. In Figure 7, the bars denote the number of actual occurrences of each mode in the validation data set, as well as the number of modes diagnosed by four different diagnostic approaches, namely, the Bayesian approaches that ignore both dependencies, that

Figure 7. Number of occurrences diagnosed for each mode.

Ind. Eng. Chem. Res., Vol. 49, No. 18, 2010 Table 4. Overall Correct Diagnosis Rates evidence dependency mode dependency

ignore

consider

ignore consider

69.92% 76.66%

73.36% 82.21%

consider evidence dependency only, that consider mode dependency only, and that consider both mode and evidence dependencies. In view of the numbers of the modes assigned by different approaches, the two Bayesian methods that ignore the mode dependency both overestimate the number of NF mode occurrences significantly as a result of the methods’ heavy dependency on prior probability: p(NF) ) 0.2, p(m1) ) 0.1, and p(mother) ) 0.0875. With a high prior probability assigned to mode NF, the diagnostic system that ignores the mode dependency tends to yield higher posterior probability for the NF mode, and therefore, it overestimates the occurrences of the NF mode. The numbers of modes diagnosed by the remaining two approaches are close to the real numbers. The overall diagnosis performance is best when both mode and evidence dependencies are taken into consideration, as summarized in Table 4. Further, consider the diagnosis performance for modes m3 and m7, for which the disturbances are different from those of the other eight modes. Figure 8 displays the average posteriors assigned to the 10 possible modes by the four approaches when the true underlying mode is m3 or m7. In each subplot, the title denotes the diagnostic approach used, and the posterior probability assigned to the true underlying mode is highlighted in gray. The diagnostic conclusion is determined by picking the mode with the largest posterior probability. The posterior probabilities assigned to the true underlying mode by the two approaches that consider the evidence dependency are higher than those of the other two approaches that simply ignore the evidence dependency. Of the two approaches that ignore the evidence dependency, the posteriors assigned to the true underlying mode generated by the method that considers the mode dependency are higher, suggesting better diagnosis performance; furthermore, the probability assigned to the true underlying mode calculated by the proposed approach that considers both the mode and evidence dependencies is the highest, indicating the best diagnosis performance. The above discussion is further validated by the comparison of the correct diagnosis rates of the two modes in Table 5. Pilot-Scale Experiment. A pilot-scale experiment was conducted to investigate the performance of the proposed Bayesian approach that considers both mode and evidence dependencies and to compare this strategy with the other Bayesian diagnostic strategies. Process Description. The experimental setup consisted of a water tank with one inlet flow and two outlet flows. This experiment was used to test our previous diagnosis algorithms in Qi and Huang14 and is used here to test the new algorithm and compare it with the previous ones. A schematic diagram of the process is shown in Figure 9. The inlet flow is driven by a pump. Of the two outlet flow valves, one is adjusted by a proportional-integral-derivative (PID) controller to provide level control for the tank, and other one is a manual bypass valve. The bypass valve is closed when the system is in its normal operating condition. Three operating modes are defined, including the normal functioning (NF) mode and two problematic modes, namely, leakage mode and bias mode; the tank leakage problem is defined as the leakage mode, implemented by opening the

8619

bypass valve manually, and the sensor bias problem is defined as the bias mode, implemented by adding a constant bias to the level sensor output. The two problems share similar symptoms in terms of shifting the steady-state operating point of the process. For instance, when there is a leak in the tank, the valve adjusted by the PID controller will decrease to maintain the water level; when there is a negative sensor bias, the valve will also decrease. Thus, it is not obvious how to distinguish the two faulty modes. To make matters worse, the external disturbance introduced by changing the pump input will shift the operating point. Thus, the operation point might also change during normal operation. Two process monitors, the process model validation monitor and the sensor bias monitor, are implemented. Because we are concerned only with the study of the information-retrieving and information-synthesizing abilities of Bayesian approaches with different diagnosis strategies, the selected monitor algorithms by themselves do not necessarily have high performance. The output of the process model validation monitor π1 is given by the normalized sum of the squares of the nominal model output residuals N

∑ (y

t

- yˆt)2

t)1

π1 )

(25)

jy

where yˆt is the simulated output of the nominal model at t, yt is N the process output, jy ) (1/N)∑t)1 yi is the mean value of the process output over one monitor reading period, and N is the length of the data segment during this period. The sensor bias monitor output π2 is obtained by examining the shift of the operating point. The output is calculated as

|

π2 ) u0 -

1 N

N

∑u

t

t)1

|

(26)

where u0 is the nominal operating point of the controller output and ut is the controller output at sampling instant t. Both the mode and evidence dependencies are introduced into the experiment. The transition of the system modes follows the mode transition probability matrix in eq 27. It is assumed that the system status tends to remain in the current condition, whether it is normal or faulty. Thus, the diagonal elements in the mode transition probability matrix are much larger than the others, as shown in eq 27.

For the evidence dependency, consider that the disturbance is introduced through flow changes that fluctuate between two predefined rates. The random binary sequence of a limited frequency band is introduced into the inlet pump to simulate temporally dependent disturbances. By defining the high value as 1 and the low value as 0, the disturbance is

8620

Ind. Eng. Chem. Res., Vol. 49, No. 18, 2010

Figure 8. Posteriors of mode m3 and m7. Table 5. Correct Diagnosis Rates for m3 and m7

ignoring both dependencies considering evidence dependency considering mode dependency considering both evidence and mode dependencies

Table 6. Summary of Bayesian Diagnosis Parameters m3

m7

70% 84.17% 72.92% 91.25%

58.82% 80% 68.63% 95.29%

introduced by following the transition probability matrices presented in eq 28

where Pdis M represents the transition probability matrix of the introduced disturbance under mode M. Diagnosis Settings and Results. A total of 600 evidence samples that correspond to the three modes were collected. The collected evidence data were divided into two portions to estimate the parameters and to use for cross-validation. Table 6 summarizes the Bayesian diagnosis parameters. The diagnosis results in Figure 10 were obtained based on the cross-validation data. Because of inaccurate prior probabilities, the two Bayesian approaches that ignore mode dependency significantly overestimate the number of occur-

discretization historical evidence data prior samples prior probabilities evaluation data

ki ) 2; K ) 22 ) 4 mixture of 360 samples uniformly distributed with prior samples, for single evidence space, evidence transition space, and mode transition space p(NF) ) 0.5, p(mother) ) 0.25 mixture of 240 independently generated cross-validation monitor readings

rences of the NF mode. Therefore, these approaches’ overall correct diagnosis rates are much lower than the diagnosis rates of the methods that consider the mode dependency for the same prior probabilities, as shown in Table 7. Figure 11 summarizes the diagnosis results in the form of average posterior probabilities. The title of each subplot denotes the true underlying mode from which the validation data come from, and the posterior probability corresponding to the true underlying mode is highlighted in light gray. The left-most panel summarizes the diagnosis results obtained by the approach that ignores all data dependencies, the next panel summarizes the

Figure 10. Numbers of occurrences diagnosed for each mode. Table 7. Overall Diagnosis Rates evidence dependency

Figure 9. Pilot-scale tank process.

mode dependency

ignore

consider

ignore consider

37.76% 67.73%

46.67% 75.93%

Ind. Eng. Chem. Res., Vol. 49, No. 18, 2010

8621

Figure 11. Average posteriors assigned to each mode. Table 8. Correct Diagnosis Rates for Each Single Mode

ignoring both dependencies considering evidence dependency considering mode dependency considering both mode and evidence dependencies

NF

leakage

bias

98.44% 76.56% 37.5% 67.19%

29.47% 66.32% 81.05% 85.26%

0% 0% 75.61% 71.95%

diagnosis results obtained by the approach that considers evidence dependency only, the further next panel summarizes the diagnosis results by the approach that considers mode dependency only, and the right-most panel summarizes the diagnosis results obtained by the approach that considers both mode and evidence dependencies. The approach that considers both the mode and evidence dependencies always assigns the highest posterior probabilities to the true underlying modes, whereas the other approaches do not enjoy such diagnosis performance. Therefore, we can conclude that this last approach has a consistently better performance for all modes, as also shown in Table 8.

Acknowledgment This work was supported in part by the Natural Sciences and Engineering Research Council of Canada and the Alberta Ingenuity Fund.

(29)

mV, mu ∈ M ) {m1, ..., mQ}

(30)

where

This transition probability can be calculated by marginalization over all possible mode transition parameters



p(mV |mu, DM) )

Σ1,...,ΣQ

p(mV |mu, DM, Υ1, ..., ΥQ) ×

f(Υ1, ..., ΥQ |mu, DM) dΥ1 · · · dΥQ

(31)

where Υi ) {φi,1, ..., φi,Q} is the probability parameter set for mode transition starting from mode Mt-1 ) mi; Q is the total number of possible modes, for instance, φi,j ) p(mj|mi); and Σi Q is the space of all possible parameter sets Υi, where ∑j)1 φi,j ) 1. The transition probability from mu to mV depends only on the parameter set Υu p(mV |mu, DM, Υ1, ..., ΥQ) ) p(mV |mu, Υu)

Conclusions In this work, a data-driven approach based on the dynamic Bayesian model is presented to handle the temporal dependency problem in control loop diagnosis. Temporal dependencies of evidence as well as underlying modes are taken into consideration to achieve better diagnosis performance. A recursive solution for the mode posterior probability calculation is developed. The mode and evidence transition probabilities necessary for the recursive solution are estimated from the historical evidence data. The proposed method is applied to a simulated binary distillation column and a pilot-scale experiment setup, where the performance of the proposed approach is shown to be better than the performances of approaches that ignore data dependencies.

p(Mt |Mt-1, DM) ) p(mV |mu, DM)

(32)

Thus, eq 31 can be written as p(mV |mu, DM) )



p(mV |mu, DM, Υ1, ..., ΥQ) ×



p(mV |mu, Υu) f(Υ1, · · · , ΥQ |mu, DM) dΥ1 · · · dΥQ



φu,V f(Υ1, ..., ΥQ |mu, DM) dΥ1 ... dΥQ

Σ1,...,ΣQ

f(Υ1, ..., ΥQ |mu, DM) dΥ1 · · · dΥQ

)

Σ1,...,ΣQ

)

Σ1,...,ΣQ

(33)

The second term in the integration can be calculated from a Bayesian perspective f(Υ1, ..., ΥQ |mu, DM) )

p(DM |Υ1, ..., ΥQ, mu) f(Υ1, ..., ΥQ |mu) p(DM |mu) (34)

where p(DM|mu) is the scaling factor p(D|mu) )

Appendix Estimation of Mode Transition Probability. Suppose that the mode transition probability from Mt-1 ) mu to Mt ) mV [i.e., p(mV|mu)] is about to be estimated from the composite mode data



Σ1,...,ΣQ

p(DM |Υ1, ..., ΥQ, mu) f(Υ1, ..., ΥQ |mu) dΥ1 · · · dΥQ

(35) In eq 34, the first term in the numerator is the likelihood of historical composite mode data. It is solely determined by the

8622

Ind. Eng. Chem. Res., Vol. 49, No. 18, 2010

parameter set {Υ1, ..., ΥQ} and is independent of mu. That is Q

p(DM |Υ1, ..., ΥQ, mu) ) p(DM |Υ1, ..., ΥQ) )

Q

∏ ∏φ

nˆi,j i,j

i)1

j)1

where nˆi,j is the number of mode transitions from Mt-1 ) mi to Mt ) mj in the historical composite mode data set. In accordance with the common assumption that the prior probabilities of different parameter sets Υi and Υj, where i * j, are independent,12 one can write f(Υ1, ..., ΥQ |mu) ) f(Υ1 |mu) · · · f(ΥQ |mu)

(37)

f(Υi |mu) )

i,j)

)



Q

∏ Γ(c

φci,ji,j-1

Σ1,...,ΣQ



Σ1,...,ΣQ

)

j)1

Q

Q

∏ ∏φ i)1

∏ ∏φ i)1

Q

nˆi,j i,j

j)1

nˆi,j+ci,j-1 i,j

(44)

j)1

Σu

(38)

φu,Vf(Υ1, ..., ΥQ |mu, DM) dΥ1 · · · dΥQ

φu,V

Q

F p(DM |mu)

Q

∏ ∏φ i)1

nˆi,j+ci,j-1 i,j

dΥ1 · · · dΥQ

j)1

Q

∫ ∏φ

F p(DM |mu)

∫φ

Q

j)1



p(mV |mu, DM) )

Q

∑c

i)1

Q

ci,j-1 φi,j

Therefore, the transition probability from evidence mu to mV can be derived as

Dirichlet distribution is usually used for the prior probabilities of the mode transition parameters Υi with parameters ci,1, ..., ci,Q Γ(

Q

∏∏

F p(DM |mu)

)

(36)

Q

F p(DM |mu)

f(Υ1, ..., ΥK |mu, DM) )

Σ1

nˆ1,j+c1,j-1 1,j

Q

∏φ

nˆu,V+cu,V u,V

dΥ1 · · · ×

j)1

nˆu,j+cu,j-1 u,j

dΥu · · ·

j*V

∫ ∏φ ΣQ

nˆQ,j+cK,j-1 A,j

dΥQ

j)1

(45)

j)1

i,j)

j)1

In the above equation, p(DM|mu) is the scaling factor as defined in eq 34. According to eq 35

As a result, we have Q

Q



f(Υ1, ..., ΥQ |mu) )

∑c

Γ(

i,j)

j)1

Q



i)1

Γ(ci,j)

p(DM |mu) )

Q



φci,ji,j-1

(39)



Σ1,...,ΣQ

Q

j)1

j)1

)





Substituting eqs 39 and 36 into eq 34 gives f(Υ1, ..., ΥQ |mu, DM) )

p(DM |Υ1, ..., ΥQ, mu) f(Υ1, ..., ΥQ |mu) p(DM |mu)

Q



Q

Q

Q

i)1

j)1

∏φ ∏ ∏φ

Γ(ci,j)

ci,j-1 i,j

nˆi,j i,j

j)1

dΥ1 · · · dΥQ

Q

nˆ1,j+c1,j-1 1,j

∫ ∏φ

dΥ1 · · ·

ΣQ

j)1

nˆQ,j+cQ,j-1 Q,j

dΥK

j)1

Q

Q

In this article, all independent variables x of gamma functions are counts of mode transitions, which are all positive integers, so

(41)

i,j

j)1

∫ ∏φ

(40)

Γ(x) ) (x - 1)!

i)1

∑c )

j)1

Σ1

dt



Γ(

Q

)F

Γ(x) )

Q

Σ1,...,ΣQ

where ci,j can be interpreted as the number of prior samples for mode transition from mi to mj. Γ( · ) is the gamma function, defined as ∞ x-1 -t t e 0

p(DM |Υ1, ..., ΥQ, mu) f(Υ1, ..., ΥQ |mu) dΥ1 · · · dΥQ

)F



∏ Γ(nˆ

i,j

+ ci,j)

j)1

(46)

Γ(Nˆi + Ci)

i)1

where Nˆi ) ∑jnˆi,j is the total number of mode transitions, that is, the number of historical composite mode samples, from previous mode mi and Ci ) ∑jci,j is the corresponding total number of prior composite mode samples. Similarly, we can derive

Q

)

Q

1 p(DM |mu)



Γ(

i)1

∑c ) i,j

j)1

Q

∏ Γ(c )

Q

∏ j)1

Q

ci,j-1 φi,j

∏∏ i)1

Q

Q

nˆi,j φi,j

j)1

∫Σ ∏ φ 1

j)1

i,j

j)1

nˆ1,j+c1,j-1 1,j

dΥ1 · · ·

∫φ Σu

(42)

nˆu,V+cu,V u,V

∏φ

nˆu,j+cu,j-1 u,j

dΥu · · ·

j*V

Q

Let

∫ ∏φ ∏ Γ(nˆ + 1) ΣQ

Q

Q

F)

∏ i)1

Γ(

∑c

i,j)

j)1

)

(43)

Q

∏ Γ(c

i,j)

Γ(nˆu,V + cu,V Γ(Nˆu + Cu + 1)

nˆQ,j+cK,j-1 Q,j

i,j

+ ci,j)

i,j*u,V

∏ Γ(Nˆ + C ) i

i

i*u

(47)

j)1

Then, eq 42 can be written as

dΥQ

j)1

Thus, eq 45 can be simplified as

Ind. Eng. Chem. Res., Vol. 49, No. 18, 2010 Γ(nˆu,V + cu,V + 1) p(mV |mu, DE) ) F Γ(Nˆu + Cu + 1)

∏ Γ(nˆ + c ) ∏ Γ(Nˆ + C ) i,j

i,j

i

i

i,j*u,V

×

i*u

Q

∏ Γ(Nˆ + C ) i

i

i)1

F

Q

Q

i)1

j)1

∏ ∏ Γ(nˆ

)

nˆu,V + cu,V Nˆu + Cu

i,j

+ ci,j)

(48)

Literature Cited (1) Harris, T.; Seppala, C.; Desborough, L. A review of performance monitoring and assessment techniques for univariate and multivariate control systems. J. Process Control 1999, 9, 1–17. (2) Qin, S. Control performance monitoringsA review and assessment. Comput. Chem. Eng. 1998, 23, 173–186. (3) Jelali, M. An overview of control performance assessment technology and industrial applications. Control Eng. Pract. 2006, 14, 441–466. (4) Huang, B.; Shah, S. Performance Assessment of Control Loops; Springer-Verlag: New York, 1999. (5) Schafer, J.; Cinar, A. Multivariable MPC system performance assessment, monitoring, and diagnosis. J. Process Control 2006, 14, 113– 129. (6) Patwardhan, R.; Shah, S. Issues in performance diagnostics of modelbased controllers. J. Process Control 2002, 12, 413–427. (7) Qin, S.; Li, W. Detection and identification of faulty sensors in dynamic process. AIChE J. 2001, 47, 1581–1593.

8623

(8) Ahmed, S.; Huang, B.; Shah, S. Validation of continuous-time models with delay. Chem. Eng. Sci. 2009, 64, 443–454. (9) Choudhury, M. A. A. S.; Jain, M.; Shah, S. StictionsDefinition, modelling, detection and quantification. J. Process Control 2008, 18, 232– 243. (10) Mehranbod, N.; Soroush, M.; Panjapornpon, C. A method of sensor fault detection and identification. J. Process Control 2005, 15, 321–339. (11) Huang, B. Bayesian methods for control loop monitoring and diagnosis. J. Process Control 2008, 18, 826–838. (12) Pernesta˚l, A. A Bayesian Approach to Fault Isolation with Application Diesel Engine Diagnosis. Ph.D. Thesis, KTH School of Electrical Engineering, Stockholm, Sweden, 2007. (13) Qi, F.; Huang, B.; Tamayo, E. A Bayesian approach for control loop diagnosis with missing data. AIChE J. 2010, 56, 179–195. (14) Qi, F.; Huang, B. Bayesian Methods for Control Loop Diagnosis in Presence of Temporal Dependent Evidences. In Proceedings of IFAC International Symposium on AdVanced Control of Chemical Processes; Elsevier Science Ltd.: Amsterdam, The Netherlands, 2009 (extended version submitted to Automatica), pp 323-328. (15) Ghahramani, Z. An introduction to hidden Markov models and Bayesian networks. Int. J. Pattern Recogn. Artif. Intell. 2002, 15, 9–42. (16) Murphy, K. Dynamic Bayesian Networks: Representation, Inference and Learning. Ph.D. Thesis, University of California, Berkeley, CA, 2002. (17) Volk, U.; Kniese, D.; Hahn, R.; Haber, R.; Schmitz, U. Optimized multivariable predictive control of an industrial distillation column considering hard and soft constrains. Control Eng. Pract. 2004, 13, 809–822.

ReceiVed for reView January 11, 2010 ReVised manuscript receiVed June 29, 2010 Accepted July 2, 2010 IE100058Y