Statistics Preprints Statistics
1998 A Bayesian on-line change detection algorithm with process monitoring applications Pradipta Sarkar Iowa State University
William Q. Meeker Iowa State University, [email protected]
Follow this and additional works at: http://lib.dr.iastate.edu/stat_las_preprints Part of the Statistics and Probability Commons
Recommended Citation Sarkar, Pradipta and Meeker, William Q., "A Bayesian on-line change detection algorithm with process monitoring applications" (1998). Statistics Preprints. 1. http://lib.dr.iastate.edu/stat_las_preprints/1
This Article is brought to you for free and open access by the Statistics at Iowa State University Digital Repository. It has been accepted for inclusion in Statistics Preprints by an authorized administrator of Iowa State University Digital Repository. For more information, please contact [email protected]. A Bayesian on-line change detection algorithm with process monitoring applications
Abstract This work has been motivated by some issues of process monitoring in casting applications. In die casting, as time passes, material is deposited on the inside wall of the die. This foreign material can cause an unacceptable level of porosity in the output of the casting process. After accumulated material reaches a certain level, some of the output of the casting process no longer meets the specifications and the process must be stopped to clean the die. Sudden changes in output quality are also common in casting processes. The degree of porosity of the output of the casting process changes suddenly if, for example, one opens the door of the production facility thereby changing the laboratory temperature, causing an immediate larger accumulation of foreign material. Also day-to-day variation in weather, changes in humidity, and other factors can be responsible for this kind of change.
Keywords Nondestructive testing, Nondestructive evaluation, Empirical and hierarchical Bayes, Rejection sampling, Trend
Disciplines Statistics and Probability
Comments This preprint has been published in Quality Engineering 10 (1998): 539- 549..
This article is available at Iowa State University Digital Repository: http://lib.dr.iastate.edu/stat_las_preprints/1
ABAYESIAN ON-LINE CHANGE DETECTION
ALGORITHM WITH PROCESS MONITORING
APPLICATIONS
Pradipta Sarkar William Q. Meeker
[email protected] [email protected]
Center for NondestructiveEvaluation
and
Department of Statistics
Iowa State University
Ames, Iowa 50011
.
1 Intro duction
1.1 Motivation: Casting Example
This work has b een motivated by some issues of pro cess monitoring in casting applications. In die
casting, as time passes, material is dep osited on the inside wall of the die. This foreign material
can cause an unacceptable level of p orosity in the output of the casting pro cess. After accumulated
material reaches a certain level, some of the output of the casting pro cess no longer meets the
sp eci cations and the pro cess must b e stopp ed to clean the die. Sudden changes in output quality
are also common in casting pro cesses. The degree of p orosity of the output of the casting pro cess
changes suddenly if, for example, one op ens the do or of the pro duction facility therebychanging
the lab oratory temp erature, causing an immediate larger accumulation of foreign material. Also
day-to-dayvariation in weather, changes in humidity, and other factors can b e resp onsible for this
kind of change.
1.2 On-line vs. O -line Change Detection Algorithm
Let y ;y ;::: b e a sequence of observed pro cess output values (such as the degree of p orosity) with
1 2
conditional density f (y jy ;:::;y ; ). Let the unknown time of change b e t . In on-line change-
k k 1 1 0
detection algorithms, the ob jective is to detect a change as so on as p ossible, if not immediately after
it o ccurs. Detection of the change-time is p erformed by considering all past data and stopping at
the rst p oint in time at which there is sucient evidence that a change of imp ortance has o ccurred. 1
Mathematically, such a stopping-time rule can b e expressed as:
t =minf (y ;:::;y ) g
a n 1 n
n
where ; ;::: is a family of functions of n co-ordinates indexed by time and is a threshold
1 2
sp eci ed to control the probability of detection errors. For example, may b e the probability
n
of exceeding the critical level at the n th insp ection. Another alternativewould b e to de ne
n
n
n
as max log ; where is the likeliho o d ratio for the observations from time j to time n (The
j j
1j n
likeliho o d ratio is generally de ned as the ratio of the probability of the data maximized over all
pro cess states to the probability when the pro cess is op erating correctly.)
O -line algorithms, on the other hand, can b e lo oked up on as p ostmortem analyses. They are
designed to collect data and test if there had b een anychange in the level of the pro cess sometime
during the past. If it is suggested that there was a change, these algorithms try to estimate the
unknown change time. In this pap er we will fo cus mainly on the on-line algorithms.
1.3 Overview
Section 2 provides a brief survey of literature and describ es the basic problem of detecting a change of
known magnitude. This basic problem is imp ortant for understanding the subsequentdevelopments
in the following sections. In section 3 we will generalize to more realistic situations of multiple
changes of unknown magnitude, and trend in the pro cess mean. Section 4 will b e devoted to the
discussion of rejection sampling and its use in Bayesian up dating of the distributions used in making
decisions. In section 5 we will use a simulated example to illustrate the b ehavior of the metho dologies
develop ed in sections 2 and 3. In section 6 we will formulate a decision theory-based metho d to
determine an optimum insp ection interval. Section 7 illustrates the metho dology of section 6 with
an example. Finally, in section 8, we discuss the p ossibility of extending the metho dology describ ed
in this pap er to a hierarchical Bayes formulation and provide some concluding remarks.
2 Brief Review of Literature
2.1 Bayes Typ e Algorithm for Detecting Changes in Pro cess Monitoring
ABayesian change detection approachhasseveral advantages over non-Bayesian approaches. It
is technically simple and is easier to implement and allows incorp oration of available engineering
information. There is a large amount of literature on Bayesian changep oint detection problems.
Smith (1975) presents the Bayesian formulation for a nite sequence of indep endent observations.
In particular he gives details for binomial and normal distribution mo dels. Some other works in this
area include
Changep oint in univariate time series : Bo oth and Smith (1982), West and Harrison (1986).
Gammatyp e random variables and Poisson pro cesses : Diaz (1982), Hsu(1982), Raftery and
Akman (1986). 2 process level -2024681012
0 20 40 60 80 100
time
Figure 1: Increase in pro cess mean, pro cess variance remaining the same .
Changep oint in linear mo dels : Bacon and Watts (1971), Ferreira (1975), Holb ert and Bro emel-
ing (1977), Choy and Bro emeling (1980), Mo en, Salazar and Bro emeling (1985), Smith and
Co ok (1990).
Hierarchical Bayes formulation of changep oint mo del : Carlin, Gelfand and Smith (1992).
Most of these references provide metho dology for o -line problems. We are interested in pro cess
control applications where on-line algorithms are needed. The next subsection describ es the simplest
p ossible on-line scenerio.
2.2 Single Jump - Before and After-Change Parameter Values Known
In the simplest case, the parameter values (e.g., mean pro cess level) b efore and after the change,
= and = resp ectively, are b oth known. Figure 1 shows a pro cess where the mean level
0 1
changes after 50 cycles, but pro cess variance remains the same. Figure 2 shows a pro cess where the
mean is constantbutvariance increases after 50 cycles. These kinds of changes are typical in many
industrial pro cesses. Detection of suchchanges has b een discussed in detail by several authors in
di erent contexts. Here we describ e brie y the solution to this problem to motivate our following
developments. Some of the pioneering work for this mo del is due to Girshick and Rubin(1952)
and Shirayaev(1961) and is describ ed nicely in Basseville and Nikiforov(1993). Our notation will
follow closely that in Basseville and Nikiforov(1993). Assume that the prior distribution of (discrete)
change time t is Geometric() and is given by,
0
k 1
P (t = k )=(1 ) ;k =1; 2;:::
0 3 process quality -4-20246
0 20 40 60 80 100
time
Figure 2: Increase in pro cess variance, pro cess mean remaining the same . porosity -1 0 1 2 5101520 time Bayesian Updating
rho=0.10 rho=0.25 rho=0.50 Posterior probability 0.0 0.4 0.8 5101520
Inspection time
Figure 3: Bayesian up dating when pro cess mean changes. Top : Porositylevel, Bottom: Up dated
probability that the pro cess parameter has changed 4 porosity -1.0 0.0 1.0 2.0 5101520 time Bayesian Updating
rho=0.10 rho=0.25 rho=0.50 Posterior probability 0.0 0.2 0.4 0.6 0.8 0 5 10 15 20
Inspection time
Figure 4: Bayesian up dating when there is no change in the pro cess mean.Top : Porositylevel,
Bottom: Up dated probability that the pro cess parameter has changed
where is the probabilityofchange in each pro duction cycle, an estimate of whichisavailable from
pro cess history. Let 0 and 1 denote, resp ectively, the pro cess states b efore and after the change.
The asso ciated transition matrix is given by
! !
p(0j0) p(1j0) 1
P = = :
p(0j1) p(1j1) 0 1
Here p(ijj ) is the transition probability from state j to state i at each t ;i =1; 2;:::.We will denote
i
by p(0) = 1 and p(1) = the prior probabilities asso ciated with the states 0 and 1 resp ectively
at time 0. Then p osterior probability that the pro cess is at state 1 at the k th insp ection/pro duction
cycle can b e calculated using the Bayes rule and is given by,
(1)f (y ; )+ (1 (1))::f (y ; )
k 1 k 1 k 1 k 1
; (1) =
k
(1)f (y ; )+ (1 (1))::f (y ; )+ (1 (1))(1 )f (y ; )
k 1 k 1 k 1 k 1 k 1 k 0
where y is the observation at the k th insp ection/pro duction cycle and f (y ; ) is the likeliho o d at
k k
the k th cycle , = ; :
0 1
The stopping-time rule is :
t =minf (1) g:
a k
k
That is, a change is detected when the p osterior probabilityofachange (1) exceeds for the rst
k
time. The value of is chosen to satisfy certain criteria, such astohave a sp eci ed probabilityof
having a false detection (i.e., a detect when the = ).
0 5 process level 0 5 10 15 20 25
0 50 100 150 200 250 300
time
Figure 5: Multiple jumps in the pro cess level.
3 Mo dels for Pro cess Degradation
Generally prior information ab out the distribution of the change time is available from the past
history of the pro cess. In the following description the pro cess characterization parameter is a
scalar. The theory,however, can b e extended easily to the case when the parameter is a vector of
twoormorequantities.
3.1 Multiple-Jump Case
In practice, the multiple-jump situation is more common than the single jump situation. Although it
is usual in the industrial pro cess control applications to know the b efore-change parameter value (for
example, when a pro cess starts, typically the machine parameters are set to some xed ideal values),
once a pro cess is running, more than one jump might o ccur b etween two consecutive insp ection
p oints. Also the pro cess is generally not insp ected at every pro duction cycle, but it is done at some
xed time interval. Thus, it is necessary to mo dify and extend the simple mo del of the previous
section. When a pro cess jumps several times, in an on-line approach, our goal is to detect a change of
an imp ortant magnitude as so on as p ossible after the underlying pro cess characterization parameter
has reached a critical level.
Let us denote the pro duction cycle times by t ;t ;:::. Supp ose that the actual measurements of
1 2
(1) (2) (k ) (k )
pro cess output are taken at t ;t ;:::.Thus t = t for some j k ,say t = t ;k 1. Let
j i 0
k
(known) b e the target for the pro cess. Also, when the pro cess starts or it is readjusted, we assume
that its level is reset to :
0
Ateach pro duction cycle the pro cess level either jumps (with probability q ) or remains at the same 6
level (with probability1 q ), and if there is a jump, the magnitude of the jump is a random variable
with cumulative distribution function H (:; ): So the jump at the i th pro duction cycle is Y = X
i i i
~
where the 's are indep endent Bernoulli random variables with P ( =1)=q; P ( =0)=1 q;
i i i
and
iid
H (:; ); X
i
~
(k )
The level of the pro cess after the k th measurement is denoted by . This quantity can b e
calculated recursively as
i i
k k
X X
(k ) (k 1)
= + Y = + Y :
i 0 j j
k
j =1 j =i +1
k 1
The p osterior densityof (expressing the state of knowledge given the available past data) after
k th measurement is given by
R
(k 1) (k 1) (k 1) (k 1)
( ) :g( j ) :f(y ; ) d
k
(k ) (k )
RR
; (1) ( ) ( jy )=
k
(k 1) (k 1) (k 1) (k 1)
( ) :g( j ) :f(y ; ) d d
k
f (y ; )g ( )
k
R
=
f (y ; )g ( )d
k
R
(k 1) (k ) (k 1) (k 1) (k 1) (k 1) (k 1)
where g (j ) is the p df of given and g ( )= ( )g ( j )d ; is
the new prior just b efore the k th measurement. The stopping rule is formulated as in section 2.2.
3.2 Several Jumps Approximation to Trend
Nowwe consider the case when the pro cess has a sto chastic trend. In such a situation weare
interested in detecting the change b efore the pro cess deviates to o much from the target, typically
when the pro cess level go es b eyond a critical level. This case can b e thoughtofasacombination
ofanumb er of small jumps with random size. This is a sp ecial sub case of the several jumps case
with q =1: Wemodeleachjumpasagamma( ; ) increment. Then the sum of several jumps also
follows a gamma distribution:
0 1
i
k
X
@ A
Y Gamma ((i i ) ; ) ; (2)
j k k 1
j =i +1
k 1
h i
[ i i ]
k k 1
(i i ) 1
k k 1
(k 1) (k 1) (k 1) (k 1)
: exp ( ) : g j ; > : =