# Towards a Maintenance and Servicing Indicator

Pascal Vrignat, Manuel Avila, Florent Duculty, Frédéric Kratz

► To cite this version:

Pascal Vrignat, Manuel Avila, Florent Duculty, Frédéric Kratz. Towards a Maintenance and Servicing Indicator. International Conference on Advances in Production and Management Systems (APMS), Sep 2009, Paris, France. pp.113-120, 10.1007/978-3-642-16358-6_15 . hal-01055862

HAL Id: hal-01055862

https://inria.hal.science/hal-01055862

Submitted on 13 Aug 2014

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Towards a maintenance and servicing indicator

Pascal Vrignat¹, Manuel Avila¹, Florent Duculty¹, Frédéric Kratz²,

¹ Orleans University, Institut PRISME, IUT Indre,
2 Av. François Mitterrand
36000 Châteauroux, France

² ENSIB, Institut PRISME,
88 boulevard lahitolle
18020 Bourges, France
{pascal.vrignat, manuel.avila, florent.duculty}@univ-orleans.fr
frédéric.kratz@ensi-bourges.fr

**Abstract.** This paper deals with a tool which may help maintenance manager to schedule maintenance activities. To help him, we show that by using events which can be observed on a process, like maintenance events, we can predict failures before they occur. Principles are based on the hypothesis that failure is preceded by a typical sequence of events. We also show that Hidden Markov Models can be used according to a good choice of parameters.

**Keywords:** Preventive Maintenance, Maintenance planning, Hidden Markov Model, Failure detection.

## 1 Introduction

Newspaper headlines often present incidents or accidents caused by industrial activities. In some cases, events may be prevented by applying a correct maintenance policy. Some tankers may not have sunk if some maintenance had been correctly applied. Factory should not have exploded with some preventive control or maintenance. In a more classical context, industrial tools may be more useful if they were maintained efficiently. Today, we have sufficient background about maintenance to improve tool effectiveness [1]. In this work, we propose a model that can anticipate the arrival of an accident. If the events can be “learned” by the model, then we can make **prediction** which can be used to help maintenance manager to schedule maintenance actions (Fig. 1).

<figure><img src="image_2.png" /><figcaption>**Fig. 1.** Maintenance monitoring</figcaption></figure>
In more general cases, we try to model a sequence of events which should indicate a failure to come. We assume that a typical failure has a typical temporal or sequential signature which should be learned by Hidden Markov Models (HMM). Our approach can be compared with Zille's work [2]. These works are based on the Stochastic Petri networks and Monte Carlo simulation. In the next part, we recall some bases about HMM. Then, we present our study which is a part of an industrial continuous food process. Finally, we focus on help to be brought to maintenance manager in order to schedule his maintenance actions.

# 2 Hidden Markov models

## 2.1 Introduction of HMM

The aim of this paper is not to present exhaustively the Hidden Markov Model. For readers interested in more details, we recommend to read Rabiner's paper [3] which is already a good tutorial and which presents HMM general problems. In this paper, we use the same notation for models. A model $\lambda = (A, B, \Pi)$ is described by three matrices:

- $A = [\dots a_{ij}\dots]$ corresponding to transition probabilities between hidden states,

- $B = [\dots b_j(k)\dots]$ corresponding to probabilities of observations considering states,

- $\Pi = [\dots \pi_i\dots]$ corresponding to initial state probabilities.

$O = \{O_1, O_2, \dots, O_T\}$ is the sequence of observations which can be made onto the process. HMM have been used in several domains and applications since algorithms to compute easily HMM have been proposed [4], [5], [6]. We can list several applications that use HMM: speech recognition [3], [7]; biosciences [8], [9]; climatology [10]; handwritten word recognition [11], [12]; writer identification [13]; medicine [14]. HMM are characterized by several parameters. One of them is topology as we can see Fig. 2. The choice of topology will influence behavior of the model. Free topology should be used to model some process which may "turn around" like weather estimation. When needs are to match model with an oriented sequence, left to right topologies are better to absorb information. It is the case with speech recognition or handwritten word recognition.

<figure><img src="image_3.png" /><figcaption>Fig. 2. HMM Topologies: (a) free model, (b) left-right model</figcaption></figure>
Another determining parameter is the number of states that may be chosen arbitrarily. There is no rule to find this number, experiment is often used to find a number of states providing some good results. In some cases, we can use the mean value of observation sequences lengths. A good estimation of parameters is the main difficulty for using HMM.

## 2.2 Implementation of HMM

In literature, there are three problems to solve before using HMM. They consist in computing easily and quickly: $P(O|\lambda)$. Considering a sequence $O=\{O_1, O_2, ..., O_T\}$, and the model $\lambda = (A, B, \Pi)$, it consists in computing the probability of the observation sequence, given the model, given a sequence $O=\{O_1, O_2, ..., O_T\}$, how do we choose the corresponding state sequence $Q=\{q_1, q_2, ..., q_T\}$ which “best” explains the observations ? How do we adjust the parameters (A, B, $\pi$) of the model $\lambda$ to maximize $P(O|\lambda)$ ? The solution to the first problem can be found in [3]. We do not use it in this study. To solve the second problem, i.e. find the state sequence which has the maximum probability, we use the Viterbi algorithm [6], [3], [15]. The last problem consists in “learning” some observation sequences to provide a model estimation of (A, B, $\Pi$). We use the classical algorithm of Baum-Welch [4], [5], [16]. The principle of the algorithm is Expectation and Modification (EM). It consists in starting with a set of matrices (chosen randomly or arbitrary). Then, likelihoods of sequences are computed. The model is recalculated to maximize likelihood and then parameters are re-estimated. The more frequent a sequence is, the higher the transition probability associated becomes.

# 3 Study case: part of a continuous food process

To test our method, we use data coming from a part of a continuous food process. The data were provided by an industrial baker. Maintenance activities for the process can be preventive or remedial. Maintenance policy consists in cleaning or replacing some “critical” parts of machines to prevent failure. But in some cases, maintenance team is to repair the failure situation. In this case, priority is given to remedial maintenance. In some other cases, capacity of maintenance team being fixed to enable production going on and preventive maintenance cannot be done on time. All maintenance actions are collected and stored in a database (Table 1).

## 3.1 Situation of the study

The studied part, in this work, is located in the middle of a complete line of bread production (Fig. 3). At the beginning of the process, there is a storing zone where different ingredients are weighted according to the cooking recipe. Then, all products are mixed according to the recipe. Then, pancake mixture can be weighted with
accuracy to form bread or others bakery products. Our study deals with this part. After this stage, dough balls are placed in moulds. Moulds pass through an oven and then get cold to enable bread to be extracted of mould. Finally, the bakery product is prepared to be sent with several controls and conditionings, with an adequate packaging.

<figure><img src="image_4.png" /><figcaption>Fig. 3. Continuous food process</figcaption></figure>

Table 1 shows a part of collected information on the scale of line called M2. This database is composed of maintenance activities. Like name of maintenance worker, day, kind of work, activity code, time spent, etc...

<table><caption>**Table 1.** Database sample</caption><thead><tr><th>Number in the list</th><th>NAME</th><th>TEAM</th><th>DATE</th><th>LINE</th><th>NAME OF THE MACHINE</th><th>WORK PERFORMED</th><th>OBS</th><th>CODING OF THE MAINTENANCE ACTIVITIES</th><th>TI (min)</th><th>PARTS CHANGED</th><th>REF</th></tr></thead><tbody><tr><td>1</td><td>M.Dupond</td><td>PM</td><td>03/01/2005</td><td>M2</td><td>Balance</td><td>The incharge request</td><td></td><td>Pro-Adj</td><td>20</td><td></td><td></td></tr></tbody></table>

Entire production line can be stopped by a failure occurring on one of the subsystems placed previously on the line. These situations should involve loss of several hours of production (some hundred kg of bakery products). To prevent such cases, preventive maintenance is scheduled. We dispose of about two years of recording - between January 2005 to March 2007 - which represent about a thousand of events. The model was trained using the database from "2005" recording. We used 2006 and 2007 data for testing.

## 3.2 Description of model vs system

The aim of this study is to show that Hidden Markov Model should correctly learn specific sequences of maintenance activities to provide a failure detector. Events collected in database will form observations of a Hidden Markov Model. The model states can inform us about the availability level of the studied part. Table 2 lists different events that may be observed on recordings. Each of them is explained in the table. Some events can be grouped: maintenance actions (Pro-Adj, Pre, Pre-visit, Dis and Mak); observing actions (Obs, Ano, Sec); repairing action (Rep which means system is stopped); no action (Not).
<figure><img src="image_5.png" /><figcaption>**Table 2.** Events list</figcaption></figure>

In order to provide a daily evaluation of our indicator, we insert a specific symbol Not (Nothing to report) every day when no event is recorded (Fig. 4). If more than one symbol is observed during a day, it means that the estimated state can change several times in the same day and consequently increase the sensibility of our indicator.

<table><caption>**Fig. 4.** Symbols insertion</caption><thead><tr><th>Pro-Adj</th><th>Pro-Adj</th><th>Sec</th><th>Not</th><th>Not</th><th>Not</th><th>Sec</th><th>Pre</th><th>...</th></tr></thead><tbody><tr><td>2</td><td>2</td><td>6</td><td>10</td><td>10</td><td>10</td><td>6</td><td>5</td><td>...</td></tr></tbody></table>

Fig. 5 shows estimated states on the system (hidden layer) from visible observations.

<figure><img src="image_6.png" /><figcaption>**Fig. 5.** Hidden layer and visible observations</figcaption></figure>

We want the model to give us information about maintenance and servicing level. To do this, we force model at learning stage. Starting (or restarting after maintenance action) of the machine must take place at the state which represents the “max level” of maintenance and servicing (S4). In the same way, when we observe a remedial maintenance action, it means that the system stopped. This is represented by the “stop” state (S1). According to these conditions: we train model on training database.

### 3.3 Choice of topology

The maintenance service manager should use servicing indicators to schedule dynamically preventive maintenance. After several tests, we chose a left to right topology which correctly fit observation sequences (Fig. 6). The reader can refer to the paper [17].
<figure><img src="image_7.png" /><figcaption>Fig. 6. Left to right topology (a), results with left to right topology (b)</figcaption></figure>

We chose four states. This is the choice made in a common situation. For example: "Plan vigipirate" in France with four levels; "Plan canicule" in France with four levels; ...

## 3.4 Training the model

To train the model, we use one year of recording (2005). We test the model with "unknown" sequences of year 2006 or 2007. To initialize training phase, we choose arbitrary parameters in model matrix. We use same initial probability for each element of matrix except for some specific symbols or a topology i.e. zero probability. For example: the symbol "Rep" will be plugged only on state S1 (Remedial action means that machine is stopped); probability from state S4 to state S1 is fixed to zero; ... Baum-Welch algorithm is used to estimate the model iteratively. This algorithm provides a model which maximizes probability $P(O|\lambda)$.

$$ \lambda^* = \arg\max_{\lambda} P(O = o|\lambda) \qquad (1) $$

## 3.5 Find the best way

The Viterbi procedure (segmental k-means algorithm) maximizes the probability of observations sequences by the basic learning only along the optimal way obtained by Viterbi decoding. The variable $\delta(t,i)$ is defined as the maximum probability:

$$ \delta(t,i) = \max_{q_1 \dots q_{t-1}} P(o_1 \dots o_t, q_1 \dots q_t = i | \lambda) \qquad (2) $$

## 3.6 Some results

In Fig. 7(a) and Fig. 7(b), we can see results provided by our model on two different sequences of test database. In these graphs, abscise is graduated with day scale. The most likelihood state is calculated each day using event provided by the test database or using Not symbol in case of no action. In Fig. 7(a), first, we begin at state S4. We can suppose that when system is started, probability that a failure occurs is low. On the third day, indicator begins to go down which means that the failure probability failure is growing. We can note that two Pre-visit events (preventive control) are
observed. Model has learnt that these events preceded a failure. But when maintenance actions are provided (Pre) indicator goes up because of constraints use to learn model; Rep associated to state S1; State S1 will always be proposed by the model when Rep is observed. But it's too late. Preventive maintenance cannot be scheduled. What we need to evaluate is presence of state S2 days before failure occurs. Then maintenance manager can schedule specific actions. A quick remedial maintenance is needed to avoid losses of production. Tests on database do not allow prevention of the failures. We cannot go back to the future, but the model should have predicted the state the day before. Performance of our method can be evaluated on estimation days before failure: not too late but not too early either. In test database, all stop state (S1) was preceded by state S2.

<figure><img src="image_8.png" /><figcaption>Fig. 7. Test on a first observation sequence (a), test on a second observation sequence (b)</figcaption></figure>

In Fig. 7(b), analysis is different. We can observe a series of Pre events. When many preventive actions are effectively done, it means that maintenance planning has been modified because of some doubts about availability of the system. Pre-visit events' following confirms the maintenance manager's doubts. Then Pro-Adj events (regulating of the machine) that follows and "Not symbol" (event number 10, Table 2) show that the system has been correctly repaired as indicated by the high level of servicing.

## 4 Conclusion

In this paper, we try to perform maintenance and servicing indicator using a Hidden Markov Model. Results show that our method can give a good level of system availability. As it has been shown earlier, choosing correctly model parameters (topology, ...), can lead to a good prediction of failure. But how to use this information to help maintenance manager? As we can see it in Fig. 8, servicing indicator is at S2 state which means that failure risk is important. What can the manager decide, a preventive action coming soon?

<figure><img src="image_9.png" /><figcaption>Fig. 8. Which decision to make?</figcaption></figure>
If we have same indicators for different parts of the entire process, we could help the manager comparing values of different indicators. In this example, the manager of maintenance team has a constant volume of maintenance activity. These indicators should help him to better organize his maintenance actions.

## References

1. Vrignat, P., Avila, M., Duculty, F., Kratz, F.: Conventional approaches to the modelling of a dysfunctional process in the context of maintenance activity, IEEE Melecon Region 8, t1-sf0008 (2008)

2. Zille, V., Bérenguer, C., Grall, A.: Modelling and simulation of complex maintenance strategies for multi-component systems, Maintenance and facility Management (2007)

3. Rabiner, L. R.: A tutorial on hidden Markov models and selected applications in speech recognition, 77(2), pp. 257 -- 286. Proceeding of the IEEE (1989)

4. Baum, L.E., Petrie, T.: Statistical inference for probabilistic functions of Markov chains, 37, pp. 1554 -- 1563. Annals Math. Stat (1966)

5. Baum, L.E.: An inequality and associated maximisation technique in statistical estimation for probabilistic functions, 3, pp. 1 -- 8. Inequalities (1972)

6. Viterbi, A.J.: Error bounds for conventional codes and asymptotically optimum decoding algorithm, 13, pp. 260 -- 269. IEEE Trans. on Information Theory (1967)

7. Doss, M. M.: Using Auxiliary Sources of Knowledge for Automatic Speech Recognition, Thèse de doctorat, Ecole Polytechnique Fédérale, Lausanne (2005)

8. Grundy, W. N., Bailey, T. L., Baker, M. E.: Meta-MEME: Motif-based Hidden Markov Models of protein families, 13(4), p. 397. Computer applications in the biosciences (1997)

9. Schbath, S.: Les chaînes de Markov cachées : présentation et usage en analyse de séquences bioliques, Unité Mathématique, Informatique & Génome, INRA (2007)

10. Hugues, J. P., Guttorp, P.: A hidden Markov model for downscaling synoptic atmospheric patterns to precipitation amounts, 15(1), p. 1. Climate research (2000)

11. Avila, M.: Optimisation de modèles Markoviens pour la reconnaissance de l'écrit, Thèse de doctorat, Université, Rouen (1996)

12. Belaïd, A., Anigbogu, J.: Hidden Markov Models in Text Recognition, International journal of pattern recognition and, 9(6) (1995)

13. Schalapbach, A., Bunke, H.: Using HMM-based recognizers for writer identification and verification Proc. 9th Int., pp. 167 -- 172. Workshop on frontiers in Handwriting Recognition (2004)

14. Vialatte, F. B.: Aide au diagnostic d'anomalies cardiaques, mémoire de DEA de Sciences Cognitives, Paris VI, Paris (2002)

15. Rabiner, L. R., Juang, B. H., Levinson, S. E., Sondhi, M. M.: Recognition of isolated digits using hidden Markov models with continuous mixture densities, 64, pp. 1211 -- 1222. AT&T Technical Journal (1986)

16. Brouard, T.: Hybridation de Chaînes de Markov Cachées : conception d'algorithmes d'apprentissage et applications, Thèse de doctorat, Université François Rabelais, Tours (1999)

17. Vrignat, P., Avila, M., Duculty, F., Kratz, F.: Modélisation des dysfonctionnements d'un système dans le cadre d'activités de maintenance, lm16, Communication 4A-1, (2008)