Available online at www.sciencedirect.com
Mathematics and Computers in Simulation 86 (2012) 92–99
Original article
Application of T-S fuzzy neural network based on declination compensation in soft sensing Ying Zhang College of Information Engineering, Shanghai Maritime University, Shanghai 200135, China Received 23 August 2010; received in revised form 10 October 2010; accepted 18 December 2010 Available online 25 January 2011
Abstract Soft sensing can be used in the case of watching the variables which are difficult or unable to be measured, or can be measured only with a high cost and significant delays. The key problem for soft sensing is that the method of system identification should meet the accuracy requirement of the real system. An improved T-S fuzzy neural network based on declination compensation is proposed in this paper, which increases the accuracy of system identification by constructing networks of declination compensation. The input of the samples is regarded as the input of the corrected network, the system declinations are regarded as the output samples of the corrected network, the output variables can be compensated by the output of this corrected system dynamically. The testing in catalytic cracking processes demonstrates that the improved T-S fuzzy neural network achieves better results in soft sensing compared with the original network. © 2011 IMACS. Published by Elsevier B.V. All rights reserved. Keywords: Soft sensing; System identification; T-S fuzzy neural network; Declination compensation
1. Introduction Fuzzy neural network is one of the methods of soft computing. As we know, fuzzy system has advantages of expressing the knowledge with fuzzy and qualitative features. It can deal with the uncertainty, non-linear and ill-posed problems. Neural network has the better ability of learning, parallel processing and fault tolerance to approach a complex non-linear system. Fuzzy neural network has both advantages of fuzzy system and neural network. The basis of the system is that a fuzzy logic system can be parsed as a kind of neural network with layered structures, and can be regarded as the universal approach model using the recursion algorithms of back propagation [9,2,4]. Takagi and Sugeno proposed that the back-end of fuzzy rules can be presented as the linear combination of input variables, this kind of fuzzy system was named as T-S fuzzy model [5,11]. When T-S fuzzy system was applied into general fuzzy neural network, it brings to T-S fuzzy neural network, this model has a wide application in system modeling [6,3,7]. Fuzzy neural network has been used in soft sensing in recent years [12], there are some experiences accumulated by the application, some of them is represented on the problems of training effect and prediction accuracy, these performances are always the goals to be improved and approached. We proposed a kind of improved model of T-S fuzzy neural network in soft sensing by constructing declination compensation networks in the fuzzy neural system, it can promote the accuracy of soft sensing, and has a better effect for generalization.
E-mail address:
[email protected] 0378-4754/$36.00 © 2011 IMACS. Published by Elsevier B.V. All rights reserved. doi:10.1016/j.matcom.2010.12.032
Y. Zhang / Mathematics and Computers in Simulation 86 (2012) 92–99
93
Soft sensing can solve the problem of on-line measuring for some variables which are difficult to measure with common instruments commendably. Essentially the method is a kind of state prediction based on system modeling. Considering the effect of approach deviation in modeling, the precision of measurement is a critical problem when this method is used in practical application. The different requirements for precision can determine whether the method will be used or not in practice, if we just want to know the variation of the variables qualitatively, it can be adopted even though the precision of soft sensing is not very high. However, if it requires a high precision for state prediction to adapt to the whole measurement system or process control system, we should check the measurement precision of the soft sensing method by system simulation, at this rate the system should be designed with a high requirement of approach precision for system modeling. T-S fuzzy neural network is a kind of effectual method for system identification. As we know, any kind of modeling methods cannot always keep a high approach precision under any kind of situation, especially when some of the features of the object have been changed a little bit more or less as the time past. The soft sensing based on T-S fuzzy neural network can also meet the status that the modeling precision goes down sometimes, and give a distinct declination in prediction, which brings adverse effectiveness to soft sensing in practical application. In this paper, the improved T-S fuzzy neural network based on declination compensation can construct the self-adaptive compensator by fuzzy BP networks with the deviation of approach changes in calibration stage. This compensation network can compensate the deviation in system modeling dynamically. It extends the parameter space of the T-S fuzzy neural network, and promotes the precision of soft sensing. This method can adjust the structure parameters of the compensation network self-adaptively according to the variation of declination. It is propitious to restrain the invalidation occurring for soft sensing when the condition of system characters or environment changes to some extent. Soft sensing can estimate the key variables which are either too difficult to measure, or too expensive to measure in the process by soft computing. Soft sensing develops system models that relate these key variables with assistant variables (or the second measuring variables) that can be easily measured, these key variables can be predicted from the system model based on the measured values of assistant variables. This method can meet the requirement of response for on-line measuring, and continuously provide information for the key variables in chemical process. Soft sensing generally has 4 aspects: the choice of assistant variables, data acquisition and process, soft sensing modeling, and online testing. The method of system modeling based on system identification, such as: T-S fuzzy neural network, can fulfill the tasks of the last 2 aspects [1,12,10,13,14]. 2. The structure of the T-S fuzzy neural network with declination compensation 2.1. The common structure of T-S fuzzy neural network j
i For a MISO system, the input variable X = [x1 x2 · · · xn ]T , T (xi ) = {A1i , A2i , . . . , Am i }, i = 1, 2, . . ., n, Ai (j = 1, 2, . . . , mi ) is the language variable of the sequence number j for xi , it is a fuzzy set defined in the domain of Ui , the corresponding membership function is μAj (xi ), i = 1, 2, . . ., n; j = 1, 2, . . ., mi . The rules of T-S fuzzy system i can be represented as:
j
j
j
Rj : if x1 is A1 and x2 is A2 . . . and xn is An , then yj = pj0 + pj1 x1 + . . . + pjn xn ,
j = 1, 2, . . . , m, m ≤
n mi . i=1
If we choose fuzzier by single value, product deduction, defuzzier by center average, we can describe the system by the following network system diagram, which consists of two parts: the front-end network and the back-end network. The front-end network includes four layers, the first layer is input layer with input variable X = [x1 x2 · · · xn ]T . The node number of this layer is n. The function of the second layer is to calculate the fuzzy membership function of each j language variables corresponding to each input sub-variable μi , i = 1, 2, . . ., n, j = 1, 2, . . ., mi . Here mi is the fuzzy division number of xi . The third layer matches the front-end of fuzzy rules, calculates the applicability of each rules. The forth layer takes on the calculation of converting the results into unitary form. The back-end network is a neural network which has three layers. The first layer is input layer, it has the function to provide the value of input variables. The second layer has the function to calculate the back-end of each rules. The
94
Y. Zhang / Mathematics and Computers in Simulation 86 (2012) 92–99
third layer takes on the calculation for system output. The Pji can be regarded as the learning weights of the neural network. the output of the front-end network are the connection weights of the third layer in the back-end network. 2.2. The learning method of T-S fuzzy neural network Considering this MISO system, we can set up an error cost function: 1 (ydi − yi ) 2 n
E=
(1)
i=1
Here ydi and yi are the expected output and real output respectively, if we use the gradient method for optimization and choose the Gauss function as the fuzzy membership function, the learning parameters can be got by partial derivative method. These parameters are the connection weights of back-end network: pji , the center values and the width value of the membership function of the nodes in the second layer of the front-end network: cij and σ ij . The learning recursive formula of pji can be represented as: pji (k + 1) = pji (k) + β(yd − y)α¯ j xi
(2)
of learning, yd and y are the expected output Here j = 1, 2, . . ., m, i = 0, 1, . . ., n, β ∈ (0, 1) is the rate n and real output respectively,k is the number of sampling. α¯ j = αj / m p=1 αp , thereinto, j = 1, 2, . . ., m, m = i=1 mi , αj = μi11 μi22 . . . μinn , in ∈ {1, 2, . . ., mn }, apparently α¯ j fulfill the unitary normalized calculation for αj . When fixing the parameter pji , the whole structure is similar to the network of the typical fuzzy BP network essentially. The learning formula of cij and σ ij can be described as below [8]: cij (k + 1) = cij (k) + β(yd − y)(yj − y)α¯ j
2(xi − cij (k)) σij2 (k)
(3)
σij (k + 1) = σij (k) + β(yd − y)(yj − y)α¯ j
2(xi − cij (k))2 σij3 (k)
(4)
Here i = 1, 2, . . ., n, yj is the back-end network output of number j fuzzy rule, the others are as the same meaning as describing in formula (2). 2.3. Improved T-S fuzzy neural network with declination compensation Although T-S fuzzy neural network performs better than the ordinary fuzzy neural network in some cases, there are still some problems in practice application, especially to handle the sample data with limited number, more peaks and more jump changes, and this type of sample data is common for some chemical process. It requires a more reasonable and powerful network structure in this modeling to achieve a better performance in accuracy. Fig. 2 is a structure of the improved T-S fuzzy neural network with declination compensation compared with the common T-S fuzzy neural network in Fig. 1. A corrected network based on fuzzy systems is added to the original system, it only performs the training work for the data of output error. In practice, we do the training work with the sample data in the original front-end and back-end networks first, when the result of training achieves steady state, the error between the output of the system network and the output samples should be treated as the output of this compensation network, and the related input samples will still be regarded as the input data of this network. After training the network to the steady state, a corrected network will be built finally. When this network is used in practice, the output of the whole system will be the calculation result by the original T-S fuzzy neural network adding the compensation output of the corrected network. This method improves the accuracy of the original network, and the degree of the improvement is dependent on the result of error training of the corrected network. The better the corrected network learns, the better the system error will be reduced. Although Fig. 2 is the network structure for MISO system, this method is also adapted to the MIMO system, since a MIMO system can always be synthesized with multiple MISO systems.
Y. Zhang / Mathematics and Computers in Simulation 86 (2012) 92–99
95
Fig. 1. Structure of Takagi–Sugeno fuzzy neural network based on MISO system.
For the corrected network, we can also regard one couple of the input and the output data as one fuzzy rule [14], and the rules of this fuzzy system can be represented as: j
j
Rj : if x1 is A1 and x2 is A2 . . . and xn is Ajn , then yej isEj
(5)
j
Ai and Ej are the fuzzy sets defined on Uei ⊂ R and Ve ⊂ R respectively. Apparently the corrected network is a typical fuzzy BP network, which can be treated as a universal approacher, and its learning parameters can be calculated by the recursive algorithm: yej (k + 1) = yej (k) + β(yed − ye )α¯ ej cije (k + 1) = cije (k) + β(yed − ye )α¯ ej σije (k + 1) = σije (k) + β(yed − ye )α¯ ej
(6)
2(xi − cije (k)) σije (k)2 2(xi − cije (k))2 σije (k)3
(7)
(8)
yej is the output of number j fuzzy rule about system error, ye is the output of the corrected network, yed is the real error between real output and prediction output of model system, β ∈ (0, 1) is the rate of learning step. The learning algorithm of the corrected network is similar as that of the original front-end network. The learning method of their parameters is based on the typical fuzzy BP learning algorithm. The structure of the improved T-S fuzzy neural network for a MIMO system can be built as describing in Fig. 3, which has multi-corrected networks to compensate the declination dynamically. In Fig. 3, the number of the corrected networks is equal to the number of the output variables, one output variable corresponds to one corrected network, so each corrected network is a MISO system. 3. The improved T-S fuzzy neural network applied in soft sensing in catalytic cracking process Considering a catalytic cracking process of a petrochemical refinery, its products are some light oil: gasoline, light diesel oil, oil slurry, liquefied gas. The yields of these light oils cannot be detected by some instruments directly, but this performance is important for process control of the system, generally the yields of these light oils will be obtained by off-line analysis on physics and chemistry. Here we adopted soft sensing to solve the problem of predicting these variables in the process.
96
Y. Zhang / Mathematics and Computers in Simulation 86 (2012) 92–99
Fig. 2. Structure of the improved T-S fuzzy neural network based on MISO system.
Fig. 3. Structural map of the improved method for T-S fuzzy neural network based on MIMO system.
Y. Zhang / Mathematics and Computers in Simulation 86 (2012) 92–99
97
46 44 42 samples
40
not corrected
a
38 36
0
corrected
10
20
30
40
50
60
46 44 42 samples
40
36
not corrected
b
38 0
corrected
5
10
15
20
25
30
35
Fig. 4. The effect of soft sensing for the yield of gasoline ((a) the training result for sample data; (b) the verifying result for testing data).
We can structure a soft sensing model for this MIMO system by the improved T-S fuzzy neural network. Firstly we chose 6 variables as the assistant variables of the soft sensing system: the amount of feed-in raw material oil, the flux of circle refine oil, the temperature of catalysis reaction, the temperature of the top of the key fractionating tower, the drawing out temperature of light diesel oil, and the temperature of the bottom of the temperature tower, and these assistant variables can be detected by the ordinary instruments, apparently these 6 variables are the input variables of the soft sensing system. The yield of gasoline, the yield of light diesel oil and the yield of liquid gas will be regarded as the key output variables of soft sensing model. So this model has 6 input variables and 3 output variables, we can train an improved T-S fuzzy neural network system according to the sample data about these 9 variables acquired from the production process, the data of the 3 output variables will be got from the off-line analysis. The results of soft sensing regarding the yield of gasoline, the yield of light diesel oil and the yield of liquid gas are illustrated as Figs. 4–6. The number of fuzzy rules is configured as 52, the initial values of the weights for the neural network in the back-end system are configured as some random small values, the rate of learning step is set as 0.5. After training, we can build the model of soft sensing, the results of soft sensing for that 3 output variables are illustrated as the three figures above, and the verification data is the draw-out data from the everyday records in the plant, which had never been used in the training process. In each figure, the dash dotted line represents the sample data, the dashed line represents the result of soft sensing with the traditional model, and the real line represents the result of soft sensing with the improved model based on declination compensation. 26 24 22 20
samples
18 16
not corrected
a 0
corrected
10
20
30
40
50
60
26 24 22 20
16
samples
b
18 0
not corrected corrected
5
10
15
20
25
30
35
Fig. 5. The effect of soft sensing for the yield of gasoline ((a) the training result for sample data; (b) the verifying result for testing data).
98
Y. Zhang / Mathematics and Computers in Simulation 86 (2012) 92–99 20 samples
18
not corrected corrected
16 14 12 10
a 0
10
20
30
40
50
60
20 samples
not corrected
18
corrected
16 14 12 10
b 0
5
10
15
20
25
30
35
Fig. 6. The effect of soft sensing for the yield of liquid gas ((a) the training result for sample data; (b) the verifying result for testing data). Table 1 MSD comparing between the improved method and the original method in soft sensing. Yield of diesel oil
Yield of gasoline
MSD of training MSD of verifying
Yield of liquid gas
Uncorrected
Corrected
Uncorrected
Corrected
Uncorrected
Corrected
0.0078 0.0100
2.7956E−6 0.0011
0.0054 0.0095
3.5587E−6 0.0028
0.0084 0.0087
0.0018 0.0024
In order to describe the accuracy of soft sensing, MSD (mean square deviation) is used as the performance index to the tracing error, Table 1 is the comparing results for these soft sensing. Apparently the result with the improved method of soft sensing is better than the original way. It indicates that the soft sensing with the original method can just trace the real trend basically from Figs. 4–6, and there are remarkable tracing errors in somewhere. After using the improved model based on declination compensation, the three key variables can be predicted more accurately. From the view of generalization for the verified testing, it indicates that the result of soft sensing with the improved method can also predict the changing trend better with the variety of the input variables. 4. Conclusion To promote the accuracy of modeling in soft sensing, an improved T-S fuzzy neural network based on declination compensation is proposed, these corrected networks can remember all the error changes in the training process, and provide declination compensation to the output of the system. The corrected networks have the similar network structure to the front-end network, it is easy to be built and implemented by programming in practice. Fuzzy BP network has the character of on-line calculation, so this kind of soft sensing system has the capability of on-line prediction with the variety of input variables. References [1] K. Desai, Y. Badhe, S. Tambles, Soft-sensor development for fed-batch bioreactors using support vector regression, Biochemical Engineering Journal 27 (2006) 225–239. [2] T. Feuring, W.M. Lippe, The fuzzy neural network approximation lemma, Fuzzy Sets and Systems 102 (1999) 227–236. [3] M. Han, Y.N. Sun, Y.N. Fan, An improved fuzzy neural network based on T-S model, Expert Systems with Applications 34 (2008) 2905–2920. [4] P.Y. Liu, Analyses of regular fuzzy neural networks for approximation capabilities, Fuzzy Sets and Systems 114 (2000) 329–338. [5] T. Takagi, M. Sugeno, Fuzzy identification of system and its application to modeling and control, IEEE Transactions on Systems, Man, and Cybernatics 15 (1985) 116–132.
Y. Zhang / Mathematics and Computers in Simulation 86 (2012) 92–99
99
[6] R.J. Wai, Z.W. Yang, Adaptive fuzzy neural network control design via a T-S fuzzy model for a robot manipulator including actuator dynamics, IEEE Transactions on Systems, Man, and Cybernatics 38 (2008) 1326–1346. [7] F. Wang, Y.R. Xu, L. Wan, Y. Li, Modified learning of T-S fuzzy neural network control for autonomous underwater vehicles, in: ITCS (International Conference on Information Technology and Computer Science), vol. 1, pp. 361–365. [8] L.X. Wang, Adaptive Fuzzy System and Control: Design and Stability Analysis, PTR Prentice Hall, New Jersey, 1994. [9] S. Yan, M. Masaharu, A new approach of neuro-fuzzy learning algorithm for tuning fuzzy rules, Fuzzy Sets and Systems 112 (2000) 99–116. [10] H. Yang, T.Y. Chai, Component content soft-sensor based on neural networks in rare-earth countercurrent extraction process, ACTA Automatica Sinica 32 (2006) 489–495. [11] H. Ying, Sufficient conditions on uniform approximation of multivariate function by general Takagi–Sugeno fuzzy systems with linear rule consequent, IEEE Transactions on Systems, Man, and Cybernatics 28 (1998) 515–520. [12] J.S. Yu, Soft sensing technology and its application, Process Automation Instrumentation 29 (2008) 1–7. [13] P.F. Yu, J.G. Lu, Y.L. Wu, Y.X. Sun, Soft sensor based on kernel principal component analysis and radial basis function neural network for microbiological fermentation, in: WCICA, vol. 1, pp. 4851–4855. [14] P. Yuan, Z.Z. Mao, F.L. Wang, The modeling method of sofT-Sensor based on layered T-S fuzzy system, Journal of Northeast University 27 (2006) 1071–1074.