Microsoft Word - CET--006.docx CHEMICAL ENGINEERING TRANSACTIONS VOL. 59, 2017 A publication of The Italian Association of Chemical Engineering Online at www.aidic.it/cet Guest Editors: Zhuo Yang, Junjie Ba, Jing Pan Copyright © 2017, AIDIC Servizi S.r.l. ISBN 978-88-95608- 49-5; ISSN 2283-9216 Research on Accident Prediction in Chemical Industry based on Improved Markov Model Wei Wang, Jing Yang, Zhanbo Liu, Gang Liu* Mudanjiang Mdeical University, Mudanjiang 157011, China giggs1208@sina.com The construction and development of chemical industry park can promote the development of local economy and chemical industry, which also brings new security problems. Because most of the enterprises in chemical industry park are chemical enterprises, the park usually has a large number of major hazards, which frequently causes serious accidents. Generally speaking, most accidents occur mainly in the process of production storage and transportation. So it is very important to analyze and forecast the accidents of chemical enterprise. In the paper, an improved grey Markov model is proposed by combining the classical grey theory and the Markov model. First of all, this paper makes a simple discussion on the grey theory and Markov model. Secondly, we make a Markov prediction on residual random sequence on the basis of grey prediction theory, which realizes the complementary advantages of two traditional models. Finally, the improved prediction model is analyzed by an example, and the results show that the improved Markov prediction model has high prediction accuracy. 1. Introduction As the pillar industry of the country, the chemical industry greatly promotes the development of economy, and it brings a lot of benefits to the people. At present, the country has already formed a production industry based on pesticide, chemical fertilizer, inorganic chemicals and basic organic raw materials, which involves a wide range of fields (Liang, 2016; Zhao et al., 2016; Wehmeier and Mitropetros, 2016; Cui, 2016; Bessarabov et al., 2016). The chemical industry is an industry which uses chemical reactions and other measures to change the nature of the substance in order to make new chemicals (Campbell et al., 1983). Chemical accidents not only bring economic losses, as well as casualties, environmental pollution and other issues, which has a great influence on society (Liu, 2015). Accident prediction is a method of predicting the safety state of an object based on explicit information and intelligence. The purpose of the accident prediction research is to provide enough security information for the managers to make the adjustment and eliminate potential risks according to the results of the prediction, which can help us to optimize the security of the whole system (Valerio et al., 2005). Many scholars at home and abroad have done a variety of research and experiments on prediction models. Von and George (1969) improves the Markov method in the study of the optimal combination of stock price and interest rate. Cao et al., (2013) combines grey theory and neural network algorithm to monitor and predict landslide deformation in mining area. The results show that the proposed method can obtain high precision results when the neuron is trained correctly. Yang and Wang, (2013) proposes a metabolic forecasting model by updating the modeling data constantly. Through a slope deformation monitoring project, he finds that the modified method has high prediction ability. Guo et al., (2014) uses three different grey models to predict the deformation of high speed railway tunnel. The results show that the prediction model can meet the requirements of engineering deformation monitoring of high speed railway tunnel In the process of modeling, the traditional GM(1, 1) prediction model is vulnerable to random data perturbation, which leads to the system error and poor stability (Li et al., 2016; Li, 2016). In this paper, an improved grey Markov model is proposed by combining the classical grey theory and the Markov model. First of all, this paper makes a simple discussion on the grey theory and Markov chain. Secondly, we make a Markov prediction on residual random sequence on the basis of grey prediction theory, which realizes the DOI: 10.3303/CET1759195 Please cite this article as: Wei Wang, Jing Yang, Zhanbo Liu, Gang Liu, 2017, Research on accident prediction in chemical industry based on improved markov model, Chemical Engineering Transactions, 59, 1165-1170 DOI:10.3303/CET1759195 1165 complementary advantages of two traditional models. Finally, the improved prediction model is analysed by an example, and the results show that the improved Markov prediction model has high prediction accuracy. 2. Combination forecasting model with the square sum of minimum prediction errors 2.1 Gray Forecast Model Grey forecasting model is a method of establishing mathematical model and forecasting by a small amount of incomplete information. According to grey system theory, we set a set X0 as the initial data 1 2 3 0 0 0 0 0{ , , , } nX X X X X=  (1) In order to enhance the regularity of data and predict the future development, we get the set X1 by accumulating the initial date. 1 2 3 1 1 1 1 1{ , , , } nX X X X X=  (2) Each element in the set above is obtained by the following formula. 1 1 1 0 2 1 2 1 0 0 1 1 0 1 0 1 m m i m m i X X X X X X X X X− =  =  = +    = = +    (3) The linear differential equation of xt 1 can be obtained by following formula. 1 1 t tdx ax u dt + = (4) Where, α and μ are the parameters to be identified. At the same time, the grey differential equation model is established. 1 1 1[ ]( ) 2 t tx x w t −+ = (5) The cumulative matrix is as follows. 1 1 1 2 1 3 3 1 1 4 4 1 1 1 1 [ ] ,1,1 2 ,1 ,1 ,1 ,1 ,1 ,1 t t n n x x t w w w A w w w w − + −  −     − −    = − = −          − −         (6) And the constant vector can be get by the following formula. 2 0 3 0 4 0 0 n x x C x x        =           (7) Then, the two coefficients can be obtained by least square method. 1166 1( )T T a A A A C u −  = ⋅    (8) Finally, we can get the solutions of linear differential equations as follows. 1 1 1 0ˆ ˆ t atu ux x e a a + −= − + (9) Where, 1 10 1 1ˆ ˆ ˆ t t tx x x+ += − . 2.2 Markov theory model Markov model prediction is a method named after the Russian mathematician Markov, which is a method of establishing a random time series model by probability. Assumed a random function Mt, at the moment t the state is kt. t tM = k , t T⊂ (10) Assume that the function Mt meet the following conditions. 1 0 1 2 1{ | , , ,} { | }t t t tP M M M M M P M M+ += (11) The above formula can also be expressed as follows. (12) The process of the above formula is called Markov process. Define the following formula. 0 0 0 1 0 1 0 2 0 2 1 3 0 3 2 0 1n n n R R P R R P R P R R P R P R R P R P R R K R K− = ⋅  = ⋅ = ⋅  = ⋅ = ⋅  = ⋅ = ⋅   = ⋅ = ⋅  (13) Where, Rn-1 is the state vector at the moment t=n-1. We assume that the possibility of transfer from state Ri to state Rj is pij. Then, we get the state transition probability by the principle that the frequency is equal to the probability. ij ij i N p N = (14) In the above formula, Ni means the number of times the state Ri appears, and Nij is the number of transfer from state Ri to state Rj. The state transition probability matrix of Markov chain is obtained as follows. 11 1 1 0 1 1 1 i n n n n j jn n ni nn p p p R R K R p p p p p −        = ⋅ = ⋅                  (15) 3. Improved grey Markov forecasting model forecasting model The traditional forecasting model is easily affected by the disturbance of random data, which leads to the existence of systematic errors and poor stability. In this paper, a new prediction model is proposed by 1 1 0 0 1 1 2 2 1 1{ | , , ,} { | }t t t t t t t tP M k M k M k M k M k P M k M k+ + + += = = = = = = = 1167 modifying the initial value, background value and residual value based on the state transition matrix of Markov theory model. (1) Calculate the volatility index series 100% n n n i i i n i x x u x − = ⋅   (16) (2) State classification We define the total set of states as follows. 1 2 3( , , )nQ Q Q Q Q=  (17) Assuming that dk a and dk b represent the upper and lower bounds of the state Qk respectively, the volatility index will beat the state k . [ , ]n k ki a bu d d∈ (18) (3) Construct the Primitive state transition matrix Assuming that Numi is the total number of states Qi appears nl ij is the number of transfer times from state Qi to state Qj. Then, the calculation method of element B in transfer matrix is as follows. ij l ijl i n p Num = (19) (4) Construct the predictive state transition matrix We select r primitive objects which are closest to the target and sort them according to the order from near to far. By selecting the state of each object as the initial state and getting the corresponding row vector of state transition matrix, we get the predictive state transition matrix. 1 1 1 1 1 1 k ki kr k kr k ki kr i i ij r r r rp rp rp RP rp rp rp rp rp        =                    (20) (5) Get the prediction equation function According to the following formula, the element rpn rk in the prediction transfer matrix is accumulated. 1 r n k rk n s rp = =  (21) Thus, we can get the vector [S1, S2, S3…Sn]. By setting the corresponding state of the maximum value max{S1, S2, S3…Sn} in the vector as the state of the predicted object, we finally get the prediction equation. 0( ) [1 ( )] k k k a bZ k X d dα= + +  (22) Where, α is the weight coefficient. 4. Simulation experiment and result analysis In this paper, we take the chemical industry related data of a province in china as an example to carry out simulation. The experiment and data analysis are carried out from production accidents and casualties. The accident and casualty data of chemical enterprises during 2007-2016 is shown in Table 1. 1168 Table 1: Number of accidents and casualties 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 Number of accidents 16 18 19 21 23 22 24 26 25 27 Number of casualties 70 78 83 86 91 89 95 99 99 108 In order to show the advantages of the new algorithm more intuitively, the traditional gray level prediction and Markov prediction are also simulated. We use relative error to represent the accuracy of prediction models. The relative error is calculated by the following formula. 100%x v v ac v − = × (23) Where, Vx the predicted value, and v is the actual value. 4.1 Accident quantity prediction According to Table 2 and Figure 1, we know that there are some deviations between the predicted value and the true value. What is more, due to the uncertainty of chemical accident, the deviation of individual years is relatively serious, which leads to the fluctuations of the data. Table 2: Actual and predicted values of the accidents number 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 Actual Value 16 18 19 21 23 22 24 26 25 27 Gray Prediction 16 20 22 25 26 24 25 29 28 30 Markov Prediction 16 17 18 16 22 23 25 24 25 28 Improved prediction 16 19 20 20 23 23 24 25 26 27 Figure 1: Forecast curve of accident quantity 4.2 Casualty prediction Figure 2 shows the error information of the three algorithms in Table 3. Through the curve drawing with the data, we can see that the improved prediction model is more stable and the accuracy is higher than other algorithms. Through example analysis, we find that the error of the improved grey Markov model is much smaller than that of the other two traditional models, which proves the feasibility of the improved grey Markov in the prediction of chemical production accident. Table 3: Actual and predicted values of the casualty number 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 Actual Value 70 78 83 86 91 89 95 99 99 108 Gray Prediction 72 80 82 88 92 90 94 103 104 111 Markov Prediction 68 75 80 83 88 89 92 95 96 103 Improved prediction 69 77 83 85 90 89 95 97 98 107 1169 Figure 2: Forecast curve of casualties quantity 5. Conclusion Although the development of china's chemical industry led to economic development, there is still a long way to go in safety management. In this paper, according to the characteristics of uncertain factors in the occurrence of accidents in chemical industry park, an improved accident prediction method is proposed based on the grey system theory and Markov theory, which can provide data reference for the safety management of chemical production in the future. At last, we do the simulation of accident prediction based on the new model and the simulation results show that the new prediction model has good prediction accuracy. References Bessarabov A., Stepanova T., Zaremba G., Poluboiarinova E., 2016, Cals-based computer-aided support in the chemical industry, Chemical Engineering Transactions, 52, 97-102, DOI: 10.3303/CET1652017 Campbell S., Dietrich J., 1983, The Determinants of Default on Insured Conventional Residential Mortgage Loans. The Journal of Finance, 38(5), 1569-1581. Cao W.C., Liu Z.Y., Zheng L., 2013, Application of gray neural network in the prediction of slope deformation. International Joumal of Applied Mathematics and Statistics, 51(22), 196-204 Cui H.X., 2016, Source profile of volatile organic compounds(vocs) of a petrochemical industry in the yangtze river delta,china, Chemical Engineering Transactions, 54, 121-126, DOI: 10.3303/CET1654021 Guo Y.L., Zhao M.H., Deng Z.W., 2014, Tunnel surrounding rock deformation forecast analysis based on GM and FEM. Electronic Journal of Geotechnical Engineering, 19, 1380-1388 Li K.Z., Li Z.W., Zhao L.J., 2016, An optimized gray model deformation forecasting modeling based onMarkov theory. Science of Surveying and Mapping, 8(41), 2-6 Li Y.J., 2016, The mathematical forecast model of Shandong GDP and the analysis of its influencing factors, Advances in Modelling and Analysis A, 53(2), 150-163. Liang C.F., 2016, Accident Analysis And Prediction of Chemical Production Enterprise. Industrial Production, 8(42), 79-81 Liu R., 2015, Research of accident analysis and prediction of chemical manufacturers. Taiyuan: North University of China, 9-23 Valerio C., Gianfilippo G., Giacomo A., 2005, The assessment of risk caused by domino effect in quantitative area risk analysis. Journal of Hazardous Materials, A127, 14-29 Von F., George M., 1969, Default Risk on FHA - Insured Home Mortgage as a Function of the Terms of Financing: A Quantitative Analysis. Journal of Finance, 24(3), 459-477. Wehmeier G., Mitropetros K., 2016, Fire protection in the chemical industry, Chemical Engineering Transactions, 48, 259-264, DOI: 10.3303/CET1648044 Yang Y.M., Wang Z.G., 2013, Grey prediction research of slope deformation. Electronic Journal of Geotechnical Engineering, 18, 1255-1265 Zhao J.F., Suo C.X., Yang Y., Zhang Z.H., 2016, Current situation and development trend of petrochemical industry emergency logistics, Chemical Engineering Transactions, 51, 193-198, DOI: 10.3303/CET1651033 1170