Accelerated Multiple Alarm Flood Sequence Alignment For Abnormality
Accelerated Multiple Alarm Flood Sequence Alignment For Abnormality
a r t i c l e i n f o a b s t r a c t
Article history: Alarm floods can interfere with operators and may therefore cause or aggravate industrial accidents. A
Received 27 March 2017 novel algorithm is proposed for pattern mining in multiple alarm floods. Unlike traditional methods which
Received in revised form 7 May 2019 either cannot deal with multiple sequences with time stamps or suffer from high computational cost,
Accepted 5 June 2019
the computational complexity of this proposed algorithm is reduced significantly by introducing a gen-
Available online 23 August 2019
eralized pairwise sequence alignment method and a progressive multiple sequence alignment approach.
Two types of alignment refinement methods are developed to improve the alignment accuracy. The
Keywords:
effectiveness of the proposed algorithm is tested using a dataset from a real chemical plant.
Alarm flood analysis
Industrial alarm monitoring © 2019 Elsevier Ltd. All rights reserved.
Time-stamped sequences
Multiple sequence alignment
Smith–Waterman algorithm
1. Introduction can only handle the abnormal event based on his/her experience
or even take no actions, likely leading to improper executions for
1.1. Background and motivation important abnormalities. As a result, based on operators’ normal
response time [2], both EEMUA, ISA and IEC standards [3,1,4] rec-
As the scale of industrial plants grows, process monitoring ommend to set the upper limit of alarms announced to an operator
becomes indispensable for ensuring the safety and efficiency of to be 6 alarms/h, and the alarm rate threshold for alarm floods to
operation. An alarm is defined as an audible and/or visible means of be 10 alarms/10 min per operator.
indication to the operator an equipment malfunction, process devi- One way to reduce alarm floods is to study univariate alarms, as
ation, or abnormal condition requiring a responses [1]. In a typical pointed out in [5]: “an alarm flood reduction will almost certainly
modern control system, a Message Processor program is employed require a rationalization exercise to challenge each and reduce
to handle the alarms which are detected by the data acquisition the number of configured alarms.” Usually a majority of univari-
subsystem. An alarm message is a text message or digital message ate alarms are chattering alarms, which can be removed efficiently
generated by the alarm system and stored in the alarm log. To be by applying delay timers or dead-bands. Techniques for designing
more specific, when a process value exceeds one of its predeter- delay timers and dead-bands have been proposed in [6–8].
mined thresholds, an alarm message is generated. Alarms can be Another way to reduce alarm floods is to rationalize conse-
easily configured on a Distributed Control Systems (DCS), which quential alarms. A alarm sequence pattern is usually generated
reduces the cost of alarm design and configuration, but on the other when there is an abnormality propagating through physical con-
hand prolongs the life-cycle of alarm rationalization, targeted to nections or information paths in a process. This type of pattern
avoid poor alarm designs. One consequence of poor alarm designs is can be obtained by applying pattern mining algorithms. The dis-
an increase in both the number and intensity of alarm floods. Alarm covered pattern can be potentially used in the advanced methods
floods can interfere with operators and may therefore cause or mentioned in the EEMUA standard [3], such as predictive alarming,
aggravate industrial accidents because even an experienced oper- online alarm attribute modification, and online alarm suppression.
ator can be overwhelmed by tens or hundreds of alarms raised in a Using pattern alarm sequences, causality analysis, either based on
short period of time. Without enough time for analysis, an operator process data [9–11] or alarm data (event logs) [12], can also be
conducted to investigate the root cause.
The authors in [13] summarized and categorized the existing
∗ Corresponding author. studies on the alarm overloading problem and formulated nine
E-mail addresses: [email protected] (S. Lai), [email protected] (F. Yang), fundamental research problems to be solved. In this paper, we
[email protected] (T. Chen), [email protected] (L. Cao). propose an accelerated multiple sequence alignment algorithm
https://doi.org/10.1016/j.jprocont.2019.06.004
0959-1524/© 2019 Elsevier Ltd. All rights reserved.
S. Lai et al. / Journal of Process Control 82 (2019) 44–57 45
for pattern mining in multiple alarm floods, which potentially appears in a data set with frequency no less than a user-specified
can be used in solving the 5th and 6th listed problems, namely, threshold. For example, a subsequence, buying first a PC, then a
“whether there exists any nuisance alarms in the historical data, digital camera, and then a memory card, if it occurs frequently
worthy of redesigning alarm generation mechanisms” and “how in a shopping history database, is a sequential pattern. In [16],
to design mechanisms to generate predictive alarms in order to an A priori-like algorithm was proposed to mine frequent pat-
predict upcoming critical abnormal events.” terns by combining short sequences into longer ones. The authors
in [17] developed an algorithm to achieve patterns based on tree
1.2. Alarm flood analysis structures. In [18], a vertical data format was utilized to generate
patterns, which did not require multiple scans over the database.
To give further explanation of our contribution in solving the 5th
Algorithms based on projections were proposed in [19,20], which
and 6th listed problems, we need to have a detailed survey on alarm
had improvements on efficiency.
flood analysis, which contains univariate alarm analysis, offline pat-
In the biology area, a very large number of pattern mining algo-
tern mining of alarm floods, online alarm flood pattern matching,
rithms have been proposed, most of which were modifications of
and causality analysis. Usually, a large proportion of an alarm flood
the pairwise sequence alignment methods [21–24]. Mainly two
are nuisance alarms, of which chattering alarms form an impor-
types of modifications exist: the exhaustive search approach, as
tant part. Some methods, such as delay-timers [14], have been used
in [25], which can guarantee global optimality, and the progressive
to reduce such chattering alarms. However, these methods cannot
pairwise approach, such as [26] and [27], which can approximate
totally suppress nuisance alarms during alarm floods, the major-
global optimal solutions. There is another type of algorithm based
ity of remaining alarms are consequential alarms, which can be
on profile Hidden Markov Models (HMM), such as [28]. However,
caused by three reasons: (1) process state changes such as start-
in [29], the authors pointed out that: “a suitable HMM architec-
up and shutdown; (2) bad alarm configurations such as redundant
ture (the number of states, and how they are connected by state
measurements on a single process; and (3) causal relationships
transactions) must usually be designed manually.”
among measured variables. In this case, alarm flood analysis is use-
While a large amount of pattern mining algorithms exists in
ful to reveal connections of alarm messages and discover possible
the literature, most of them cannot be directly applied to find
patterns in alarm flood sequences.
patterns in alarm and event logs, due to the special format of
Fig. 1 shows the procedures of alarm flood analysis. The purpose
alarm data (every message comes with a time stamp). A variety
of the offline part is to set up a pattern database for offline analysis
of pattern mining methods have been developed to analyze alarm
and the use of online pattern matching. During the offline part,
floods. The authors in [30] manually selected some alarm tags to
data preprocessing is carried out first to remove chattering alarms
be the target tags at first, then applied the extracted patterns as
before the extraction of alarm floods. Usually an off-delay timer is
the basis for discovery of local relationships by identifying pri-
used since it will not introduce detection delays when alarms are
mary and consequential alarms. It is an event-based segmentation
raised. After preprocessing, an alarm rate threshold recommended
strategy which data segmentation takes place in an event-based
by ISA standard is used to extract alarm floods. The periods during
context. In [31], the authors proposed a way to capture the rela-
which the alarm rate is higher than the threshold is extracted. The
tions of alarm messages in an alarm flood using first-order Markov
extracted alarm flood sequences are then numbered and saved for
chains; then, the Euclidean distance between the transition prob-
further pattern analysis.
ability matrices of two alarm floods was used to cluster the alarm
In the next step, pattern mining algorithms can be applied to
floods into groups. The authors in [32] developed a pattern growth
automatically find a common pattern sequence for each of the clus-
method to obtain patterns from alarm floods. However, the authors
ters and save the patterns into a database for offline and online
pointed out “the proposed method was sensitive to disturbances
analysis. The pattern database can provide early prediction for an
so that the pattern in sequences had to be exactly the same in
incoming alarm flood by matching the online alarm sequence with
order to be recognized.” A dissimilarity-based method was pro-
the patterns in the database and obtain their similarity scores; then,
posed in [33] to extract alarm sequence templates of given faults
based on these scores, identify whether the online sequence is sim-
and a Needleman–Wansch based algorithm was developed to iso-
ilar to any of the patterns in the database and thereafter predict the
late alarm sequences caused by certain known faults in [34]. In [35],
incoming alarm flood if a matching can be found [15]. In Fig. 1,
the authors proposed a method to re-order alarms during alarm
potential dynamic alarm management could be predictive alarm-
floods by assigning their priorities values and designed an interface
ing, online alarm attribute modification, and online alarm suppres-
for a better operator support during flood scenarios.
sion. Causality analysis can also be applied once the patterns are
Time information is also very important. On one hand, two
obtained to help recover the connections between the correspond-
sequences with the same alarms and their ordering but different
ing tags in the pattern sequences and target the root cause.
time intervals in between the alarms can be caused by totally dif-
1.3. Literature survey ferent faults. On the other hand, even the orders of some alarms in
two alarm sequences are different, they still can be alarm sequence
This subsection contains a detailed literature survey on recent patterns. Because of this, methods have been proposed to take time
work for sequence pattern mining and alarm flood pattern analysis. intervals between alarms into consideration when studying the
Expert consultation and operator experience, by far, are still the sequences.
two approaches that have been used by most industrial compa- For example, for two alarm sequences, take into account the
nies when dealing with alarm floods. Expert consultation provides time information as shown below:
good and accurate results; however, without doubts, its efficiency
is extremely low because of the involvement of a relatively large S1 = < (4, 00 : 01), (5, 00 : 02),
amount of process knowledge. The approach based on the opera- (3,00:05),(2,00:06),(1,00:08),(3,00:19),(4, 00 : 20) >
tor experience is usually faster, but its accuracy is not guaranteed
S2 = < (3, 00 : 00), (2, 00 : 01),
since it depends heavily on human judgments. Many pattern min-
ing algorithms have been developed to facilitate the study of alarm (3,00:03),(2,00:04),(1,00:05),(3,00:09),(5, 00 : 12) >
floods.
Sequence pattern mining finds relevant parts in data examples where the first one of each pair is the type of alarm and the second
that appear repeatedly. A sequential pattern is a subsequence that one is the corresponding time stamp. By analyzing the time infor-
46 S. Lai et al. / Journal of Process Control 82 (2019) 44–57
mation, we may find that the bold part may not be alarm sequence ple sequence alignment approach. Based on this work, a pattern
pattern due to the consideration of time stamps. database can be set up, which can provide early prediction for an
For two alarm sequences, incoming alarm flood by matching the online alarm sequence with
the patterns in the database and predict an incoming alarm flood
S3 = < (4, 00 : 01), (5, 00 : 02), if a matching can be found. The discovered patterns can help train
(3,00:05),(1,00:06),(2,00:08),(3,00:13),(4, 00 : 20) > operators to handle corresponding series of alarm messages more
efficiently in order to prevent the overwhelming situation during
S4 = < (3, 00 : 00), (2, 00 : 01),
alarm floods. Some badly configured parts in alarm systems can be
(3,00:05),(2,00:06),(1,00:08),(3,00:12),(5, 00 : 17) > revealed by the alarm flood patterns as well.
The rest of the paper is organized as follows. The problem
even the orders of some alarms in two alarm sequences are differ- description and algorithm principle are given in section 2. In sec-
ent, they may be an alarm sequence pattern due to the fact that the tion 3, an industrial case study is provided to test both efficiency and
time interval of alarms occurrences is relatively close, the similarity accuracy of the proposed algorithm and comparisons are made with
of these two alarm sequences may be high. the exhaustive search approach in [39]. Detailed discussions on the
In [36], Generalized Sequential Patterns (GSP) was applied to accuracy, computational complexity, algorithm convergence, and
search for pattern alarm sequences in alarm floods; the algorithm some potential problems are carried out in section 4, followed by
was able to blur the orders of alarms if they are raised in quick the conclusions in section 5.
succession and thus their order becomes less important. Algo-
rithms for pattern matching of two sequences were developed in 2. Algorithm principle
[37] and [38], based on the Smith-Waterman [22] and BLAST [23]
algorithms, respectively. In both papers, a weighted time distance Our intended problem is to find the optimal alignment for a
and vector were used to take the relative time between alarms cluster of alarm floods, so that based on this alignment an alarm
into account during the alignment. In [39], the authors proposed a sequence pattern can be easily found.
method for pattern mining in multiple alarm flood sequences using
a sequence alignment approach. However, the computational cost 2.1. Problem formulation
of the algorithm does not scale well with the number and length of
sequences to be aligned. 2.1.1. Alarm system and alarm message analysis
To offer a comprehensive explanation of alarms and alarm mes-
1.4. Contribution and organization of the paper sages, we give the figure of the alarm system dataflow and the figure
of alarm message log from industry. Fig. 2 shows a typical schematic
In this work, we propose an accelerated multiple pattern min- of alarm system dataflow. The basic Process Control System (BPCS)
ing algorithm to find a suitable alignment of multiple alarm flood and Safety Instrumented System (SIS) are the two important com-
sequences and obtain the pattern for a selected alarm flood clus- ponents that control the process and generate alarms based on
ter. Unlike traditional methods which either cannot deal with sensor measurements and predefined logics. In our work, we focus
multiple sequences with time stamps or suffer from high com- on the alarms from safety instrumented systems based on the
putational cost, the computational complexity of this proposed standard IEC 62682 [4], the design and management of safety
algorithm is reduced significantly by introducing a generalized instrumented systems are excluded from this standard. Please refer
pairwise sequence alignment method and a progressive multi- to the standard IEC 61511 [40]. The panel and the Human Machine
S. Lai et al. / Journal of Process Control 82 (2019) 44–57 47
Interface (HMI) allow the operator to intervene the control of the where e1m , e2n ,..., eJo ∈ (the set of alarm types) and t1m , t2n ,...,
process and view alarm logs. tJo are the corresponding time stamps, respectively. S1 , S2 ,..., SJ are
In a DCS engaged plant, all monitored process variables and similar sequences detected by running pairwise sequence match-
alarms are collected onto the DCS server, where alarms are for- ing algorithms such as [37]. The objective is to obtain the optimal
matted and stored in alarm logs. Generally, in alarm logs, an alarm alignment of these sequences by adding gaps (represented by “[]”)
message contains important information such as time stamp, tag and deleting unrelated alarm messages, for example:
name, alarm type (identifier), priority, and acknowledgment state.
An alarm message may also include descriptive information such as < (e16 , t16 ), (e17 , t17 ), (e18 , t18 ), [ ] , (e19 , t19 ) >,
trip value, event, and description. Time stamp indicates the occur- < (e22 , t22 ), [ ] , (e23 , t23 ), (e24 , t24 ) , (e25 , t25 ) >,
rence time of an alarm. Tag name is a unique code of a system
variable that is being monitored; it indicates the process vari- ...
able that has caused the alarm. Alarm type, or identifier, is the <[ ] , (eJ1 , tJ1 ), (eJ2 , tJ2 ), [ ] , (eJ3 , tJ3 ) > .
alarm type related to the monitored variable (e.g., PVLO when
the variable is under its low limit). Priority shows the importance
of alarms. Acknowledgment state shows the status of an alarm, 2.2. Generalized pairwise sequence alignment
namely, Return to Normal (RTN) or Alarm (ALM).
Fig. 3 gives an example of a segment of an alarm log. It is nec- In this subsection, to explain the principles of generalized pair-
essary to point out that there are different kinds of alarm logs in wise sequence alignment, three elements, including time distance
different process or situations. Therefore, we need to give spe- and weight vectors, generalized similarity score and generalized
cific explanations according to different situations. The definitions dynamic programming procedure, will be introduced.
in this example cannot be applied directly to other examples. In
the example, a PVLO alarm was raised for tag A at 2013-09-01
2.2.1. Time distance and weight vectors
0:13 because its corresponding process variable went below the
Time stamps are important components of alarm messages; two
trip value, which was set as 131. Then, this PVLO alarm for tag
alarm messages with different time intervals could indicate totally
A returned to normal at 2013-09-01 0:13 since the correspond-
different problems in the process. In [37], it introduces the time
ing process variable went back to its normal range. The priority
information into the Smith-Waterman algorithm to evaluate alarm
of this alarm is JOURNAL, which means the lowest priority. Nor-
sequence alignment, which is called the modified Smith-Waterman
mally, we connect the tag name and the tag identifier of an alarm
algorithm. The Smith-Waterman algorithm is proposed for the local
together with a dot in between while processing alarm messages,
alignment of sequences in the field of biological informatics. Its
e.g., A. PVLO, and replace ALM and RTN messages with 1 and 0 for
objective is to find a pair of segments, one from each of two long
computing purposes.
sequences, such that there is no other pair of segments with greater
similarity (homology) [22].
2.1.2. Mathematical representation The Smith-Waterman algorithm is a dynamic programming
Consider the following alarm message sequences: algorithm, which contains two main steps. The first step is calculat-
ing the similarity score of two sequences and forming a similarity
S1 = < (e11 , t11 ), (e12 , t12 ), ..., (e1m , t1m ), ..., (e1M , t1M ) >, matrix or table, the similarity score of the mismatch and gap-match
is negative as a penalty. The similarity score function can be defined
S2 = < (e21 , t21 ), (e22 , t22 ), ..., (e2n , t2n ), ..., (e2N , t2N ) >, as follows:
...
1, ifexi = eyj
SJ = < (eJ1 , tJ1 ), (eJ2 , tJ2 ), ..., (eJo , tJo ), ..., (eJO , tJO ) >, (xi , yi ) = (1)
, ifexi =
/ eyj
48 S. Lai et al. / Journal of Process Control 82 (2019) 44–57
1 , d2 , ..., dk , ..., dK ]
dm = [dm m m m
(4)
k = |t − t |,
dm m k
Fig. 4. Smith–Waterman algorithm. where K is the total number of alarm messages in the sequence.
Thus, dm k gives the absolute time distance between (e , t ) and (e ,
m m k
tk ) in the sequence. The time weight vector for (em , tm ) is defined
as:
wm = 1 , w 2 , ..., w k , ..., w K ]
[wm m m m
(5)
1 ), f (d2 ), ..., f (dk ), ..., f (dK )],
= [f (dm m m m
The element of similarity matrix H can be recursively calculated by where is the standard deviation, controlling how much weight to
the following equation: be put on the close-by alarm messages to blur their orders in the
alignment. The function also normalizes the real time distance to [0,
Hi+1,j+1 = max Hi,j + s xi , yj , Hi,j+1 + ı, Hi+1,j + ı, 0 (2)
1]; a large output indicates a short time distance. Correspondingly,
where ı is uniform gap penalty. The second step is backward path for modified Smith-Waterman algorithm, the element of similarity
search based on similarity table. Go backward from this highest matrix H can be recursively calculated by the following equation
value until meet an entry with value 0 (Figs. 4 and 5). with a uniform gap penalty ı:
For the modified Smith-Waterman algorithm in [37], it intro-
duces the time information in sequences, which can be reflected Hi+1,j+1 = max Hi,j + s (ei , ti ) , ej , tj , Hi,j+1 + ı, Hi+1,j + ı, 0
by the change of similarity score function:
(7)
s ((ea , ta ) , (eb , tb )) = max wak × wbk (1 − ) + (3)
1≤k≤K
S. Lai et al. / Journal of Process Control 82 (2019) 44–57 49
2.2.2. Worked example of time distance and weight vectors they are from the same alignment, while P and Q may not be the
Here is a demonstration of how the time distance and weight same value.
vectors are calculated for an alarm sequence. Consider the following The formula for calculating the similarity score S(TAp , TBq )
alarm sequence between the tuples TAp and TBq is as follows:
1 −
M N
(2, 2), (1, 3), (3, 3.5), (1, 5), (4, 5.2),
p p q q
S(TAp , TBq ) = + × S((eAi , tAi ), (eBj , tBj )), (8)
where there are 5 alarm messages and 4 alarm types. The time MN
i=1 j=1
distance vector d1 for message (2, 2) is calculated as: d11 = 2 − 2 =
p p q q
0, d12 = 3 − 2 = 1, d13 = 3.5 − 2 = 1.5, d14 = 5 − 2 = 3, and d15 = 5.2 − where S((eAi , tAi ), (eBj , tBj )) is the similarity score between two
2 = 3.2. The time distance matrix formed by vectors d1 , d2 , d3 , d4 , alarm messages and is obtained by
and d5 is p p q q
S((eAi , tAi ), (eBj , tBj ))
⎡ ⎤
0.0 1.0 1.5 3.0 3.2 p p q q
= max{ s((eAi , tAi ), (eBj , tBj )), (9)
⎢ 1.0 0.0 0.5 2.0 2.2 ⎥
⎢ ⎥ q q p p
[d1 , d2 , d3 , d4 , d5 ] = ⎢ ⎥
T T T T T s((eBj , tBj ), (eAi , tAi ))},
⎢ 1.5 0.5 0.0 1.5 1.7 ⎥ .
⎣ 3.0 2.0 1.5 0.0 0.2 ⎦ where
3.2 2.2 1.7 0.2 0.0 p p q q
s((eAi , tAi ), (eBj , tBj ))
⎧ q
By applying the weighting function (with = 1) on the time distance ⎪ k
max {wAi,p k
: eAi = eBj }, if the set isn’t empty
⎪
⎪
matrix, the time weight matrix is obtained: ⎪
⎨
1≤k≤P
(10)
⎡ ⎤ =
q q
and eBj , tBj is not a gap
1.00 0.61 0.32 0.01 0.01
⎪
⎪
⎢ 0.61 1.00 0.88 0.14 0.09 ⎥ ⎪
⎪
⎢ ⎥ ⎩
[wT1 , wT2 , wT3 , wT4 , wT5 ] = ⎢ ⎥
⎢ 0.32 0.88 1.00 0.32 0.24 ⎥ .
0, otherwise,
⎣ 0.01 0.14 0.32 1.00 0.98 ⎦ q q p p
s((eBj , tBj ), (eAi , tAi ))
0.01 0.09 0.24 0.98 1.00 ⎧ k k p
⎪ max {wBj,q : eBj = eAi }, if the set isn’t empty
⎪
⎪ 1≤k≤Q
p p
⎨ (11)
and eAi , tAi is not a gap
2.2.3. Generalized similarity score =
⎪
⎪
In [37], the authors proposed a way to calculate the similarity ⎪
⎩
score between two alarm messages in two alarm sequences. Here 0, otherwise.
we generalize it to calculate the similarity score between two tuples
in two alarm sequence alignments. The definition of a tuple is illus- The negative parameter in Eq. (8) is the mismatch penalty. The
trated by the example in Fig. 6. In the figure, there are two alarm similarity score S(TAp , TBq ) between the two tuples TAp and TBq
sequence alignments (A1 , A2 , . . ., AM and B1 , B2 , . . ., BN ); the tuples is obtained by averaging all the pairwise similarity scores of the
(TA1 , TA2 ,. . ., TAP and TB1 , TB2 ,. . ., TBQ ) are formed by alarm mes- alarms in the two tuples. The value of S(TAp , TBq ) is always within
sages or gaps located at the same position of the corresponding [, 1]; a larger value means a stronger similarity. The similarity
p p q q p p
alignment. The lengths of the alignments are P and Q, respectively. score S((eAi , tAi ), (eBj , tBj )) between two alarm messages (eAi , tAi )
q q
Notice the lengths of A1 , A2 , . . ., AM are always the same because and (eBj , tBj ) is achieved by selecting the larger value between
50 S. Lai et al. / Journal of Process Control 82 (2019) 44–57
Fig. 7. A numerical example for the calculation of the generalized similarity scores.
p p q q q q p p
s((eAi , tAi ), (eBj , tBj )) and s((eBj , tBj ), (eAi , tAi )), as the commutative
p p q q
law does not hold. When both (eAi , tAi )
and (eBj , tBj ) are gaps, their
score will be assigned as 0. Note that the pairwise similarity score
formula in [37] is a special case of the generalized similarity score
calculation proposed in this paper; when the two alignments are
reduced to two alarm sequences (e.g., M = N = 1), the two formulae
will give exactly the same output.
Fig. 8. An illustrative example on how to obtain the generalized dynamic program-
ming matrix.
2.2.4. Worked example of generalized similarity score
Consider the example of two alarm sequence alignments in
Fig. 7, where M = N = 2 and the lengths of the two sequence align- WA2 = [wTA , wTA , wTA , wTA , wTA ]
2 ,1 2 ,2 2 ,3 2 ,4 2 ,5
ments are both 5. The time weight matrices of A1 , A2 , B1 , and B2 are ⎡ ⎤
obtained as WA1 , WA2 , WB1 , and WB2 , given = 1. The fourth row 1.00 0.88 0.14 0.01 0
and column of WB2 are empty since the fourth element in B2 is a ⎢ 0.88 1.00 0.32 0.04 0 ⎥
⎢ ⎥
gap. Let = −1, the similarity score for the pair of tuples TA4 and =⎢ ⎥
⎢ 0.14 0.32 1.00 0.61 0.14 ⎥
TB4 is calculated as ⎣ 0.01 0.04 0.61 1.00 0.61 ⎦
0 0 0.14 0.61 1.00
1 + 1
2 2
4 4 4 4
S(TA4 , TB4 ) = −1+ × S((eAi , tAi ), (eBj , tBj )) = −0.12,
2×2
i=1 j=1
WB1 = [wTB , wTB , wTB , wTB , wTB ]
1 ,1 1 ,2 1 ,3 1 ,4 1 ,5
⎡ ⎤
where 1.00 0.61 0.14 0.04 0.01
⎢ 0.61 1.00 0.61 0.32 0.14 ⎥
4
S((eA1 4 4 4
)) = max{wA3 , wB3 } = 0.88, ⎢ ⎥
=⎢ ⎥
, tA1 ), (eB1 , tB1
1 ,4 1 ,4
⎢ 0.14 0.61 1.00 0.88 0.61 ⎥
⎣ 0.04 0.32 0.88 1.00 0.88 ⎦
4 4 4 4 0.01 0.14 0.61 0.88 1.00
S((eA2 , tA2 ), (eB1 , tB1 )) = max{wA3 , wB3 } = 0.88,
2 ,4 1 ,4
Table 1
Statistics of the dataset
Description Number
Table 2
Information of the alarm sequences in each selected cluster
Cluster A B C D
Fig. 12. Clustering result of the extracted alarm floods and the four selected clusters.
Fig. 13. Percentage of alignment score difference between the proposed algorithm
and the exhaustive search approach.
Fig. 11. Flowchart of the proposed algorithm. 3.2.1. Efficiency comparison of two algorithms
Fig. 14 shows the efficiency of the two algorithms as the num-
ber of sequences to be aligned grows. The execution times of both
from each of the four clusters, presented by the red and blue lines algorithms increases when the number of sequences grows; how-
respectively. ever, the growth rate of the proposed algorithm is much smaller
A very noticeable spike can be found in all the three lines than that of the exhaustive search approach. When the number of
in Fig. 13, showing that the average alignment score difference sequences reached 5, the proposed algorithm was almost 10,000
between the two algorithms was large for the tests in cluster D. times faster than the exhaustive search approach.
The reason for this is because the pattern length in cluster D was Fig. 15 indicates there is a positive relation between the com-
too short (only 2). Thus, the alignment can be easily influenced putational cost of the exhaustive search approach and the average
by the similar terms among the sequences that are not related to sequence length, but this trend is not evident for the proposed algo-
the pattern. Also, since the pattern length is too short, the per- rithm. The reason is because the pattern length, as numbered on
centage of alignment score difference caused by a small defect in the figure, influences the execution time of the proposed algorithm
the alignment would be amplified. In addition to the big spike as well. Detailed explanation will be provided in the discussion
caused by cluster D, the accuracy of the proposed algorithm is section.
high, with no more than 10% difference compared to the exhaustive
search approach. Fig. 13 also shows that there is no evident rela- 3.2.2. Execution time analysis of the proposed algorithm
tion between the accuracy of the proposed algorithm and number More efficiency tests were conducted to cover the testing region
of sequences to be aligned or the average sequence length. that had not been touched by the accuracy tests. Since the exhaus-
54 S. Lai et al. / Journal of Process Control 82 (2019) 44–57
Fig. 14. Efficiency comparison of the two algorithms when the number of sequences Fig. 17. Execution time of the proposed algorithm to align 10 sequences as the
increases. average sequence length grows.
Fig. 15. Efficiency comparison of the two algorithms when the average sequence Fig. 18. Execution time of the algorithm with respect to the upper limit iteration
length increases. number for the random-division refinement.
Fig. 19. The number of refinement iterations needed before reaching the conver-
gence when the number of sequences to be aligned increases.
Fig. 21. Examples of the optimums achieved by the two types of refinement meth-
ods: (a) when the random-division refinement method was better; (b) when the
leave-one-out refinement method was better.
as shown in the industrial case study section, the accuracy of the a higher score will be fed to the next iteration. Thus, the align-
proposed algorithm is acceptable (within 10% range) when the pat- ment score is monotonically increasing, while there must be an
tern length is not too small (larger than 3). For the cases where the upper bound for the alignment score of certain sequences. There-
pattern sequence is too short, the algorithm may not perform well fore, the convergence is guaranteed for both of the refinement
since the alignment can be easily influenced by the similar terms methods. The leave-one-out refinement method converges when
among the sequences that are not related to the pattern, and the no more improvement can be made to the alignment for a full round
improvement on the primitive alignment that could be made by of iterations (every sequence has been left out once). However,
the two refinement methods will be very limited as well. the convergence of the random-division refinement can hardly be
We need to point out that there is a trade-off between algo- identified, as there does not exist a full round of iterations. Thus,
rithm’s efficiency and accuracy. Our algorithm does not guarantee an upper limit number of iterations should be configured for the
to find the optimal solution like the method in [39] does. However, random-division refinement method.
based on our tests, the accuracy of the proposed algorithm is still Convergence speeds of the two refinement methods are worthy
suitable for applications, averaging 5% difference when compared studying too. The leave-one-out refinement method usually, but
to the results given by the method in [39]. The efficiency of the pro- not always, converges faster than the random-division method. The
posed algorithm is higher than the method in [39] by several orders reason is because for both of the refinement methods, there are two
of magnitude. Thus, given a large scale dataset, the proposed algo- main steps: separate the alignment into two bunches of sequences,
rithm is able to complete fast with usable results while the method and re-align them. The leave-one-out refinement method has a cer-
in [39] may stuck for hours or even days. tain order to separate the alignment, and only one sequence is
separated from the rest during one iteration. While the random-
4.2. Computational complexity discussion division refinement method does not; thus there is a much bigger
pool of ways of separating the sequences in the alignment that the
The computational complexity of the proposed algorithm is random-division refinement method can select from.
composed of five parts: (1) calculation of time weight matrices Regarding the convergence value, both refinement methods
N cannot guarantee the global optimum, and neither of them can
O( i=1 Li2 ), where N is the sequence number and Li is the sequence
always achieve a better alignment score than the other. How-
length; (2) formation of the dendrogram O(N 3 ); (3) generation of
ever, by combining them together we could have a better chance
the primitive alignment using progressive multiple sequence align-
N−1 to reach the global optimum, because each method improves the
ment method O( j=1 Aj1 Aj2 ), where Aj1 and Aj2 are the lengths of
alignment from a different perspective. The leave-one-out refine-
the two sequences (can be either a sequence or an alignment) for ment method can recover the part of the sequence that has been
the generalizedpairwise sequence alignment; (4) leave-one-out incorrectly deleted during the generation of the primitive align-
I1
refinement O( k=1 Ak1 Ak2 ), where I1 is the number of iterations ment because in each iteration, one sequence in the alignment is
before convergence is reached, and Ak1 and Ak2 are the lengths of the replaced by its original sequence and re-aligned with the rest of the
two sequences (can be either a sequence or an alignment) for the sequences in the alignment. However, the random-division refine-
generalized pairwise
I2 sequence alignment; and (5) random-division ment method cannot do so because no separated sequences will be
refinement O( t=1 At1 At2 ), where I2 is the upper limit iteration replaced by their original ones. Even though it cannot recover the
number, and At1 and At2 are the lengths of the two sequences (can incorrectly deleted sequence part, it still has an advantage over the
be either a sequence or an alignment) for the generalized pairwise leave-one-out refinement method — a much bigger pool of ways of
sequence alignment. Thus the whole computational complexity is separating the sequences in the alignment to choose from, which
means more chances to improve the alignment by re-arranging the
⎛ ⎞ gaps and matchings. Thus, by applying the leave-one-out refine-
N
N−1
I1
I2
ment followed by the random-division refinement method, we will
O⎝ Li2 + N 3 + Aj1 Aj2 + Ak1 Ak2 + At1 At2 ⎠ .
be able to first recover the incorrectly deleted sequence parts, and
i=1 j=1 k=1 t=1
then modify the ways of placing gaps and matchings in the existing
alignment to achieve a better alignment score. This is why in the
Based on the computational complexity analysis, the efficiency
algorithm flowchart shown in Fig. 11, the leave-one-out refinement
of the proposed algorithm is determined by many factors, among
is applied before the random-division refinement.
which the number of sequences, sequence length, and alignment
length are the three main elements. The highest order of sequence
4.4. Parameter tuning discussion
or pattern length in the computational complexity is only quadratic
for the proposed algorithm. Notice the computational complexity
Parameter tuning can be an obstacle for applying the proposed
of the exhaustive search approach in [39] is
algorithm. As mentioned in [37], the variance of the Gaussian func-
N
N tion , the gap and mismatch penalties ı and need to be tuned
O(( Lk ) × ( Lk )), to meet users’ requirements. The variance of the Gaussian function
k=1 k=1 controls the size of the time span within which the algorithm
blurs the occurrence orders between the alarm messages. When the
which increases exponentially with the sequence number and value of goes to infinity, the algorithm totally ignores the orders of
length. Thus, the proposed algorithm achieves a significant alarms in the alignment and simply counts the alarm occurrences.
improvement in efficiency, which has also been confirmed in the On the contrary, if = 0, the orders of alarms have to be exactly
industrial case study section. the same in the two sequences in order to get a match. The gap
and mis-match penalties, and , determine the algorithm’s tol-
4.3. Convergence discussion erance to including gaps and mis-match terms in alignments. When
these two parameters get larger, the algorithm places more toler-
The convergence can be guaranteed by both refinement meth- ance on the irrelevant alarms raised within a pattern sequence.
ods. The proof is simple and does not require any mathematical Besides the ones in [37], a new parameter is introduced in the
derivations. Since in every refinement iteration, the new alignment proposed algorithm: the upper limit number of iterations I2 for
score will be compared with the old one, and the alignment with the random-division refinement. With a higher I2 , there will be a
S. Lai et al. / Journal of Process Control 82 (2019) 44–57 57
greater chance that the global optimum is reached, but at the cost [11] P. Duan, F. Yang, S.L. Shah, T. Chen, Transfer zero-entropy and its application
of higher computational cost. for capturing cause and effect relationship between variables, IEEE Trans.
Control Syst. Technol. 23 (3) (2015) 855–867.
During the generation of the primitive alignment, the sequences [12] F. Yang, S.L. Shah, D. Xiao, T. Chen, Improved correlation analysis and
are progressively aligned by the descending order of their pairwise visualization of industrial alarm data, ISA Trans. 51 (4) (2012) 499–506.
similarity. The reason for choosing this order is because once an [13] J. Wang, F. Yang, T. Chen, S.L. Shah, An overview of industrial alarm systems:
main causes for alarm overloading, research status, and open problems, IEEE
alignment is obtained, the gaps and the matchings between the Trans. Autom. Sci. Eng. 13 (2) (2016) 1045–1061.
two sequences are fixed and will be propagated into the primitive [14] N. Ahmed Adnan, I. Izadi, T. Chen, On expected detectiondelays for alarm
alignment. Thus, by aligning the most similar sequence pair first systems with deadbands and delay-timers, J. Process Control 21 (9) (2011)
1318–1331.
and leaving the most divergent pair to the last would improve the
[15] S. Lai, F. Yang, T. Chen, Online pattern matching and prediction of incoming
correctness of placing gaps and matchings in the alignment. alarm floods, J. Process Control 56 (2017) 69–78.
[16] R. Agrawal, R. Srikant, Mining sequential patterns, in: Proceedings of the 11th
International Conference on Data Engineering, IEEE, 1995, pp. 3–14.
5. Conclusions
[17] J. Han, J. Pei, Y. Yin, Mining frequent patterns without candidate generation,
ACM SIGMOD Record, no. 2 (2000) 1–12.
An accelerated multiple sequence alignment algorithm for pat- [18] M.J. Zaki, Efficient enumeration of frequent sequences, in: Proceedings of the
seventh International Conference on Information and Knowledge
tern mining in multiple alarm sequences has been proposed. A
Management, ACM, 1998, pp. 68–75.
progressive multiple sequence alignment mechanism has been [19] J. Han, J. Pei, B. Mortazavi-Asl, Q. Chen, U. Dayal, M.-C. Hsu, Freespan: frequent
introduced to accelerate the generation of the primitive alignment. pattern-projected sequential pattern mining, in: Proceedings of the Sixth
Two types of refinement methods have been developed to improve International Conference on Knowledge Discovery and Data Mining, ACM,
2000, pp. 355–359.
the primitive alignment. A dataset from a real chemical plant has [20] J. Pei, J. Han, B. Mortazavi-Asl, H. Pinto, Q. Chen, U. Dayal, M.-C. Hsu,
been used to test the effectiveness of the proposed algorithm and PrefixSpan: Mining sequential patterns efficiently by prefix-projected pattern
compare it with the exhaustive search approach in [39]. The results growth, in: Proceedings of 29th International Conference on Data
Engineering, IEEE, 2001, pp. 215–224.
show the proposed algorithm has a significant improvement in [21] S.B. Needleman, C.D. Wunsch, A general method applicable to the search for
efficiency with a small accuracy cost. Based on this work, we can similarities in the amino acid sequence of two proteins, J. Mol. Biol. 48 (3)
provide early prediction for an incoming alarm flood by matching (1970) 443–453.
[22] T.F. Smith, M.S. Waterman, Identification of common molecular
an online alarm sequence with a pattern database and conduct- subsequences, J. Mol. Biol. 147 (1) (1981) 195–197.
ing similarity calculation. The discovered patterns are also helpful [23] S.F. Altschul, W. Gish, W. Miller, E.W. Myers, D.J. Lipman, Basic local
in alarm management and causality analysis. In the future, tech- alignment search tool, J. Mol. Biol. 215 (3) (1990) 403–410.
[24] W.R. Pearson, D.J. Lipman, Improved tools for biological sequence
niques to improve the accuracy and methods for parameter tuning
comparison, Proc. Natl. Acad. Sci. 85 (8) (1988) 2444–2448.
may be studied. [25] M.S. Johnson, R.F. Doolittle, A method for the simultaneous alignment of three
or more amino acid sequences, J. Mol. Evol. 23 (3) (1986) 267–278.
[26] D.-F. Feng, R.F. Doolittle, Progressive sequence alignment as a prerequisitetto
Acknowledgments
correct phylogenetic trees, J. Mol. Evol. 25 (4) (1987) 351–360.
[27] J.D. Thompson, D.G. Higgins, T.J. Gibson, CLUSTAL W: improving the
This work was supported by NSERC and the National Natural Sci- sensitivity of progressive multiple sequence alignment through sequence
weighting, position-specific gap penalties and weight matrix choice, Nucleic
ence Foundation of China (Grant No. 61433001 and 61873142). We
Acids Res. 22 (22) (1994) 4673–4680.
would like to thank Suncor for providing the data in the industrial [28] S.R. Eddy, Multiple alignment using hidden Markov models, Proceedings of
case study. International Conference on Intelligent Systems for Molecular Biology (1995)
114–120.
[29] S.R. Eddy, Profile hidden Markov models, Bioinformatics 14 (9) (1998)
References 755–763.
[30] S. Kordic, P. Lam, J. Xiao, H. Li, Analysis of alarm sequences in a chemical plant,
[1] ISA 18.2, Management of Alarm Systems for the Process Industries, The in: Lecture Notes in Computer Science, Springer, 2008, pp. 135–146.
International Society of Automation, Research Triangle Park, 2016. [31] K. Ahmed, I. Izadi, T. Chen, D. Joe, T. Burton, Similarity analysis of industrial
[2] C.R. Dal Vernon, J.L. Downs, D. Bayn, Human performance models for response alarm flood data, IEEE Trans. Automat. Sci. Eng. 10 (2) (2013) 452–457.
to alarm notifications in the process industries: an industrial case study, in: [32] J. Folmer, B. Vogel-Heuser, Computing dependent industrial alarms for alarm
Proceedings of the Human Factors and Ergonomics Society Annual Meeting, flood reduction, in: Proceedings of 9th International Multi-Conference on
SAGE Publications, 2004, pp. 1189–1193. Systems, Signals and Devices, IEEE, 2012, pp. 1–6.
[3] EEMUA, Alarm Systems — A Guide to Design, Management and Procurement, [33] S. Charbonnier, N. Bouchair, P. Gayet, Fault template extraction to assist
Engineering Equipment and Materials Users Association, London, 2013. operators during industrial alarm floods, Eng. Appl. Artif. Intel. 50 (2016)
[4] IEC 62682, Management of Alarm Systems for the Process Industries, 32–44.
International Electrotechnical Commission, 2014. [34] S. Charbonnier, N. Bouchair, P. Gayet, A weighted dissimilarity index to isolate
[5] C. Timms, Hazards equal trips or alarms or both, Process Saf. Environ. Protect. faults during alarm floods, Control Eng. Pract. 45 (2015) 110–122.
87 (1) (2009) 3–13. [35] E.N. Satuf, E. Kaszkurewicz, R. Schirru, M.C.M.M. de Campos, Situation
[6] S.R. Kondaveeti, I. Izadi, S.L. Shah, T. Chen, On the use of delay timers and awareness measurement of an ecological interface designed to operator
latches for efficient alarm design, in: 19th Mediterranean Conference on support during alarm floods, Int. J. Ind. Ergon. 53 (2016) 179–192.
Control & Automation, IEEE, 2011, pp. 970–975. [36] P. Cisar, E. Hostalkova, P. Stluka, Alarm rationalization support via correlation
[7] S.R. Kondaveeti, I. Izadi, S.L. Shah, D.S. Shook, R. Kadali, T. Chen, Quantification analysis of alarm history, in: Proceedings of 19th International Congress of
of alarm chatter based on run length distributions, Chem. Eng. Res. Design 91 Chemical and Process Engineering, Prague, Czech Republic, 2010, pp. 1–6.
(12) (2013) 2550–2558. [37] Y. Cheng, I. Izadi, T. Chen, Pattern matching of alarm flood sequences by a
[8] E. Naghoosi, I. Izadi, T. Chen, A study on the relation between alarm modified Smith-Waterman algorithm, Chem. Eng. Res. Des. 91 (6) (2013)
deadbands and optimal alarm limits, in: Proceedings of 2011 American 1085–1094.
Control Conference, IEEE, 2011, pp. 3627–3632. [38] W. Hu, J. Wang, T. Chen, A local alignment approach to similarity analysis of
[9] F. Yang, S. Shah, D. Xiao, Signed directed graph based modeling and its industrial alarm flood sequences, Control Eng. Pract. 55 (2016) 13–25.
validation from process knowledge and process data, Int. J. Appl. Math. [39] S. Lai, T. Chen, A method for pattern mining in multiple alarm flood
Comput. Sci. 22 (1) (2012) 41–53. sequences, Chem. Eng. Res. Des. 117 (2017) 831–839.
[10] P. Duan, F. Yang, S.L. Shah, T. Chen, Direct causality detection via the transfer [40] IEC 61511, Functional Safety: Safety Instrumented Systems for the Process
entropy approach, IEEE Trans. Control Syst. Technol. 21 (6) (2013) 2052–2066. Industry Sector, International Electrotechnical Commission, 2015.