Está en la página 1de 6

Soft Sensor Modeling Based on Fuzzy System

Optimization
Yan Sun
1
, Li-Biao Zhang
2
and Ming Ma
1,
1
College of Information Technology , Beihua University, Jilin 132013, China
ma9063@163.com
2
College of Computer Science and Technology, Jilin University, Changchun 130012, China
Abstract. In order to implement real-time control or optimization for variables key
to the process, we need to build soft sensor, and the key step of it is soft sensor
modeling. In this paper, the soft sensor modeling process based on Takagi-Sugeno
(T-S) model and Differential Evolution (DE) were discussed. The proposed algo-
rithm could evolve both the structure of T-S model and parameters, and effectively
solves the problemof soft sensor modeling. The numerical experiments indicate the
effectiveness of the algorithm.
Keywords: Soft sensor, T-S fuzzy model, differential evolution.
1 Introduction
In industrial processes, some important variables are difcult to be detected ,many
hardware sensors usually involve signicant time lags and high investment and
maintenance costs, instead of hardware sensors, soft sensors [1], provide a con-
venient solution to solve this problem. In recent years, many algorithms have been
proposed to build the soft sensor, including using articial neural networks,and sup-
port vector machine etc[2-5].
Data-driven fuzzy modeling has become an active research area in recent years,
and it has been applied to many elds, such as pattern recognition, data mining, clas-
sication, prediction, and process control, and etc [6-9]. In this paper, an algorithm
based on Differential Evolution (DE) is proposed to optimize Takagi-Sugeno (T-S)
model, the proposed algorithm could evolve both the topology and parameters, and
to a problemit can obtain the near-optimal structure of T-S model. The experimental
analysis and calculation shows that the algorithm is good in solving fuzzy system
optimization, and effectively solves the problem of soft sensor.
The rest of this paper is organized as follows: The T-S model is introduced in
Section 2. The proposed algorithm is described in Section 3. The simulation and
experimental results are presented in Section 4. Finally, concluding remarks are
given in Section 5.

Corresponding author.
B.-Y. Cao and X.-J. Xie (Eds.): Fuzzy Engineering and Operations Research, AISC 147, pp. 109114.
springerlink.com c Springer-Verlag Berlin Heidelberg 2012
110 Y. Sun, L-B. Zhang, and M. Ma
2 T-S Model
Takagi-Sugeno (T-S) model is a fuzzy system proposed by Takagi and Sugeno in
1985[10]. As a method of data-driven modeling, it has been successfully used in a
wide variety of applications. In the model the ith fuzzy rule have the form
R
i
: x
1
is A
i1
, ..., x
n
is A
in
then y
i
= c
i0
+c
i1
x
i1
+... +c
in
x
n
, (1)
where n is the number of input variables.i = 1 . . . r ,and r is the number of if-then
rules. A
ij
is the antecedent fuzzy set of the ith rule. y
i
is the consequence of the
ith if-then rule .c
ij
(i = 1 . . . r; j = 1 . . . n) is real number. Then by using center of
gravity method for defuzzication, we can represent the T-S system as:
y =
r

i=1
y
i
n

j=1

Aij
(x
i
)
r

i=1
n

j=1

Aij
(x
i
)
. (2)
3 The Proposed Algorithm
3.1 Differential Evolution
Differential Evolution (DE) is an optimization algorithm proposed by Storn and
Price in 1997[11]. It has shown superior performance in both widely used bench-
mark functions and real-world applications [12-15]. It combines simple arithmetic
operators with the classical events of crossover, mutation and selection to evolve
from a randomly generated starting population to a nal solution. DE executes
its mutation by adding a weighted difference vector between two individuals to a
third individual, and then the mutated individuals will do discrete crossover and
produce offspring, in the nal step, each offspring in the child population is evalu-
ated for tness on a parent, with only the stronger of the two surviving into the next
generation.
Individuals in DE are represented by D-dimensional vectors x
i
, i
(1, , NP), where D is the number of optimization parameters and NP is the
population size. The evolutionary operations of classical DE can be summarized as
follow:
1) Mutation
v
i
= x
r1
+F (x
r2
x
r3
), i = 1, , np, (3)
where r
1
, r
2
, and r
3
are three mutually distinct randomly drawn indices from
(1, , np), and also distinct from i, and 0 < F <= 2.
2) Crossover
u
ji
=

v
ji
, if randb CR or j = randr,
x
ji
, if randb > CR or j = randr,
(4)
Soft Sensor Modeling Based on Fuzzy System Optimization 111
where i = 1, , NP, j = 1, , D, and CR (0, 1) is the crossover rate, and
randr is a random integer in [1, D].
This ensures at least some crossover, one component of u
i
is selected at random
to be from v
i
.
3) Selection
If the objective value f(u
i
) is lower than f(x
i
), then u
i
replaces x
i
in the next
generation. Otherwise, we keep x
i
.
3.2 Description of the Algorithm
In the proposed algorithm, we use n dimensional real-valued vector to represent a
solution, as shown in follows:
X = (x
1
, x
2
, , x
n
), (5)
where n is the number of all the real-valued parameters, it include the parame-
ters of membership functions and consequence parameters c
ij
(i = 1, , r; j =
1, , n).
The following functions have been used for evaluation of DE.
F(x) =
1

K
(O T)
2
, (6)
where K is the number of sample, T is the teacher signal, and O is the output.
The proposed algorithm is formed of two phases. In the rst phase, through mu-
tation, crossover and tness-based selection, it evolves from an initial randomly
generated population to a solution. However DE cant be immediately applied to
update parameters of membership functions, compared with the consequence pa-
rameter, the optimization of membership functions only adjusts a little. This paper
has made some improvement on mutation and crossover, DE doesnt execute muta-
tion, and the crossover is shown as follows:
u
ji
=

r
ji
, if randb CR or j = randr,
x
ji
, if randb > CR or j = randr,
(7)
where r is a randomly drawn index from (1, , np), and distinct from i. i =
1, , NP, j = 1, , D, and CR (0, 1) is the crossover rate, and randr is a
random integer in [1, D].
If the xed precision is achieved, then go to the second phase. In the second
phase, we used the effective sample to cut redundant fuzzy rules. In the T-S model
an antecedent of the ith fuzzy rule has the form:
x
1
is A
i1
x
2
is A
i2
, ..., x
n
is A
in
. (8)
The possibility that the ith rule will re is given by the product of all the membership
functions associated with the ith rule.
112 Y. Sun, L-B. Zhang, and M. Ma
u
i
(x
k
) =
n

j=1
A
ij
(x
j
(k)). (9)
A sample (x
k
) is dened as the effective sample if u
i
(x
k
) > a, where a is a
threshold.
Calculate the value for each sample according to equation (9), all the effective
samples of ith fuzzy rule can be obtained. If a fuzzy rule has no effective sample
or number of effective samples are small enough, that is to say the fuzzy rule is
redundant, then cut the fuzzy rule.
Initialize the population again, and loop the above process until it achieves the
termination condition, we will obtain a suitable T-S model.
3.3 The Execution of the Algorithm
The algorithm:
1. Randomly generate an initial population, and evaluate the tness of each
individual.
2. Mutation, crossover, selection.
3. Evaluate the tness of each individual.
4. If the termination condition is achieved then stop, otherwise go to 5.
5. If the xed precision is achieved then go to 6 otherwise go to 2.
6. Picked the best individual to optimize fuzzy rules according to the effective
sample.
7. Changed the structure of all individuals according to the best individual,
go to 1.
4 Numerical Simulations
We used the proposed algorithm to build the soft sensor modeling. Reaction tem-
perature, propylene ow rate, air ow rate and ammonia gas ow rate are selected
as the secondary variables to predict the yield coefcient of acrylonitrile.The 80
samples were used as training data, and the 40 samples as test data to validate the
models performance.
In our algorithm we used 3 fuzzy sets for each input, and the Gaussian member-
ship function is used for each fuzzy subset. We randomly set the population size to
60, probability of crossover CR to 0.8, let F=0.6, and stopping condition: 3000 gen-
erations. Before the execution of the algorithm the T-S model has 81 fuzzy rules.
The algorithm which immediately used DE to optimize T-S model is called algo-
rithm 1, the proposed algorithm is called algorithm 2, and the comparative results
between two algorithms are summarized in Table 1.
From this table we can observe that the proposed algorithm achieves the better
result in the test data, with a relatively small number of fuzzy rules. The results have
proved that the proposed algorithm is applicable and efcient.
Soft Sensor Modeling Based on Fuzzy System Optimization 113
Table 1. Comparative results
Algorithm Number of Fuzzy rules MSE(Training date) MSE(Test date)
algorithm 1 81 0.29 1.64
algorithm 2 32 0.33 0.76
5 Conclusion
Based on DE and T-S model, the proposed algorithm can obtain suitable fuzzy rules
and optimize parameters of model.It can solve the soft sensor modeling problem. A
real-world simulation was presented to show the advantage of the algorithm.
References
1. Martin, G.: Consider soft sensors. Chemical Engineering Progress 66(7), 6670 (1997)
2. Bhartiya, S., Whiteley, J.R.: Development of Inferential measurements Using Neural
Networks. ISA Transactions 40(4), 307323 (2001)
3. Chen, W., Li, J.M.: Adaptive Output-feedback Regulation for Nonlinear Delayed Sys-
tems Using Neural Network. International Journal of Automation and Computing 5(1),
103108 (2008)
4. Yan, W.W., Shao, H.H., Wan, X.F.: Soft sensing modeling based on support vector
machine and Bayesian model selection. Computers and Chemical Engineering 28(8),
14891498 (2004)
5. Zhang, Y., Su, H.Y., Liu, R.L., Chu, J.: Fuzzy Support Vector Regression Model of 4-
CBA Concentration for Industrial PTA Oxidation Process. Chinese J. Chem. Eng. 13(5),
642648 (2005)
6. Setnes, M., Roubos, H.: GA-fuzzy modeling and classication: complexity and perfor-
mance. IEEE Trans. Fuzzy Systems 8(5), 509522 (2000)
7. Mastorocostas, P.A., Theocharis, J.B., Petridis, V.S.: A constrained orthogonal least-
squares method for generating TSK fuzzy models: application to short-term load fore-
casting. Fuzzy Sets and Systems 118(2), 215233 (2001)
8. Xing, Z.Y., Jia, L.M., Yong, Z.: A Case study of data-driven interpretable fuzzy model-
ing. Acta Automatica Sinica 31(6), 815824 (2005)
9. T-Sekouras, G., Sarimveis, H., Kavakli, E., Bafas, G.: A hierarchical fuzzy clustering
approach to fuzzy modeling. Fuzzy Sets and Systems 150, 245266 (2005)
10. Takagi, T., Sugeno, M.: Fuzzy identication of system s and its app lication to modeling
and control. IEEE Trans. on Systems, Man and Cybernetics 15(1), 116132 (1985)
11. Storn, R., Price, K.: Differential Evolution - A Simple and Efcient Heuristic Strategy
for Global Optimization over Continuous Spaces. Journal of Global Optimization 11,
341359 (1997)
12. Vesterstrom, J., Thomsen, R.: A Comparative Study of Differential Evolution. Particle
Swarm Optimization, and Evolutionary Algorithms on Numerical Benchmark Problems.
Evolutionary Computation 2, 19801987 (2004)
114 Y. Sun, L-B. Zhang, and M. Ma
13. Storn, R.: System Design by Constraint Adaptation and Differential Evolution. IEEE
Transactions on Evolutionary Computation 2, 82102 (1999)
14. Yang, Z.Y., Tang, K., Yao, X.: Self-adaptive differential evolution with neighborhood
search. In: Proc. of 2008 IEEE Congress on Evolutionary Computation, pp. 11101116
(2008)
15. Das, S., Abraham, A., Konar, A.: Automatic Clustering Using an Improved Differen-
tial Evolution Algorithm. IEEE Transactions on Systems, Man and Cybernetics, Part A:
Systems and Humans 38(1), 218237 (2008)

También podría gustarte