Improved Hidden Markov Model and Its Application for Fault Prediction

The fault prediction is an important problem which can improve the production efficiency during the process of automatic production. With the continuous development of technology, the way of using threshold to detect faults has been applied to production. Threshold detection, however, can’t predict the occurrence of fault. It can only judge whether there is any fault after getting the data. In this paper, we proposed an improved Hidden Markov Model for fault prediction. This algorithm obtains a model by training the previous data, and then it uses the model to deal with the new data so that it could forecast the fault successfully. Experiment shows that this algorithm can better adapt to different production occasions with high accuracy. It also has strong anti-interference ability, and satisfactory effect.


Introduction
In recent years, with the development of the economy and the progress of the society, the requirement of automatic production is higher and higher.However, on the road to the intelligence, we have met many challenges.One is that, in the unattended production line, how to predict the equipment fault and take corresponding processing.Under the continuous exploration and unremitting efforts, people widely adopt the method of threshold value judgment for fault detection and diagnosis.This method is very effective, however, it exists a few obvious shortcomings: (1) By using this method, people can only determine whether there is a fault through the data, and then take corresponding measures.It is not hard to see that people are in a passive state in this process; (2) For different occasions, the threshold is always different.Threshold method is difficult to avoid the above shortcomings.With the rapid development of intelligent manufacturing technology, new methods have been applied more and more widely.Such as fault tree analysis or Bayesian network model, and so on.
Fault tree analysis is a very effective fault prediction method.It uses the event that the system does not want to happen as the top event, and then find out all the direct factors that lead to the occurrence of the top event.Such as the logic diagram shown in Fig. 1.
These bottom events also known as basic events and their data is known.Fault tree analysis adopts logic method which has the characteristics of intuitive, explicit.It can do qualitative analysis as well as quantitative analysis.However, the traditional fault tree analysis also exists some weaknesses: (1) It can't solve the problem of probability fuzzy between the top events and the bottom events.
(2) It can't solve the problem that the intersection of the fault tree; (3) The structure of the fault tree is according to a certain amount of knowledge by people.
In order to overcome the defects of the methods above, this paper puts forward the Improved Hidden Markov Model for fault prediction.This method includes two processes.The whole process is not affected by the people's subjective factors so that it can improve the production efficiency.

Improved Hidden Markov Model(IHMM)
Hidden Markov Model(HMM) as a statistical analysis model, founded in 1970s.Its state cannot be observed directly, but it can be obtained by the observation vector sequence.Now, it has been successfully used in behavior recognition, character recognition, fault prediction and diagnosis.
There are two hypotheses in the HMM model: one is the output observation is strictly independent, and the other is the process of state transition, the current state is only related to the previous state, which is called the first-order Markov model.As shown in Fig. 2.    to represent a HMM.The Improved Hidden Markov Model(IHMM).The traditional HMM is a single state matching a single observed value.However, in the actual production, it often has multiple sensors, at the same time, to collect data from multiple monitoring points, that is to say, we can have more than one state, corresponding to a number of observations, so that the traditional model cannot be used directly.
Compared with the traditional model, we find that each state of the state set represents only a single state, such as "normal", and each observation value of the observation set is only a single index, such as 95r/s.However, when there are multiple sensor data, each state is not only a single state, but a state set, for example, the system has five kinds of equipment, we will get the state set of (health, fault, sub-health, health, health), and the corresponding observations will be a collection of five observations, at this time, each element of the state set S and the observation set O is treated as a set, then we can use the follows methods to implement the learning and prediction processes.
The Learning of IHMM.The purpose is to train the IHMM parameters A , B and  under the conditions of the given observation sequence O .And in this way, the input of the training algorithm is a unlabeled observation sequence O , the output ( , , ) A B    is the parameters of IHMM.We can use the classic HMM training algorithm -Baum-Welch algorithm.The purpose of these algorithms is to estimate the transition probability ij a and the observation probability ( ) i t b o .The Baum-Welch algorithm can be described as follows: (1) Initialize 0 n  ，and , ) and ( 1) 1 ( )  are converges or reaches a given error range.
(3) Get the parameters ) The Prediction of IHMM.The purpose is to get the hidden state based on the observation We can use Viterbi algorithm to solve this problem.The Viterbi algorithm can be described as follows: (1) Initialize

Experiment and Result
Through the previous introduction, we know that the application of IHMM algorithm for fault prediction need to go through two stages: one is the training phase, and the other is prediction stage.These two stages can be done by learning system and prediction system.
Model training.In this experiment, we collected some industrial data from the production site, a total of 20000 rows of these data in 10 columns, each of the first five columns of the columns represents a kind of sensor data, the latter five columns represent the state of the device.We put these data into two groups, one is called the training set.It includes 16000 rows; the other is called the test set contains the remaining 4000.
Then, execute the training and testing command, we can get the accuracy of the test data.By changing the number of training samples, the accuracy of the test data will change accordingly, as shown in Fig. 3.
Compare with other method.We compared our method with the FTA model, the result is shown in Fig. 4. As can be seen from the figure, with the increasing in the number of samples, the IHMM model will achieve better results.This is because the increasing in the number of samples lead to the IHMM model to get more data to learn, therefore, it will get higher accuracy.

Conclusions
Through the above experiments, we can see that IHMM in the prediction of a large number of data, can achieve very good results.Moreover, with the increasing of the amount of data, the anti-jamming ability of the model increases.

Fig. 2
Fig. 2 Hidden Markov Model diagram Generally, we can use the three tuple ( , , ) A B

Fig. 3
Fig. 3 The curve of the accuracy of the test data with the number of training samples