Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Dialnet MetodologiaParaLaImplementacionDeControladorDifuso PDF
Dialnet MetodologiaParaLaImplementacionDeControladorDifuso PDF
Palabras clave: Controlador lgico programable, IEC 1131-3, lgica difusa, texto estructurado.
Key words: Programmable logic controller, IEC 1131-3, fuzzy logic, structured text.
RESUMEN ABSTRACT
En este artculo se presenta una metodologa para This paper presents a methodology for imple-
implementar controladores basados en lgica di- menting fuzzy logic controllers based on a S7-
fusa en un PLC S7-300 empleando el lenguaje de 300 PLC using the programming language SCL
programacin SCL (Lenguaje de control estruc- (Structured Control Language) in STEP 7. We
turado) de STEP 7. Se presenta el diseo de la present the design of the fuzzy function, variable
funcin difusa, declaracin de variables, diseo declarations, and the evaluation design of mem-
de la evaluacin de las funciones de pertenencia y bership functions and rules of the fuzzy system.
reglas del sistema difuso. A partir de este esque- Since this scheme can be implemented more
ma se pueden implementar modelos difusos ms complex fuzzy models, such as adaptive or Auto
complejos, como adaptativos o autosintonizados. tuner. We present an application example for
Se muestra un ejemplo de aplicacin para un sis- a discrete time simulated in the PLC using a PI
tema de tiempo discreto simulado en el PLC, em- fuzzy controller.
pleando un controlador difuso PI.
44 Tecnura Vol.
Vol.15
15 No.30
No. 30 Julio
pp.-44 - 51 Julio
Diciembre - Diciembre de 2011
de 2011
con-ciencias
* * *
tenidos al evaluar las entradas, mientras que en las Donde n es el nmero de funciones de pertenen-
uniones O se aplica el mximo entre los mnimos cia de la salida, WS[n] contiene el mximo entre
obtenidos por la uniones Y. Las uniones Y y O las reglas que comparten la salida S[n]. El pro-
se usan para denir las reglas difusas. Al nal de grama en SCL de la Ec. (1) para 3 funciones de
las reglas, el consecuente est asociado con una salida, es:
funcin de pertenencia de la salida.
FOR n:=1 TO 3 DO
2.3 Definicin de las reglas num:=WS[n]*S[n]+num;
den:=WS[n]+den;
Para evaluar las reglas se emplea el vector boolea- END_FOR
no de activacin de las funciones de pertenencia
(AFP), de esta manera se hace ms fcil y rpido FC10:=num/den;
evaluar cada regla:
donde nalmente, FC10 devuelve el valor de la
IF AFP[1,1] AND AFP[2,1] THEN salida del controlador difuso. Recordar que num
y den se deben inicializar con 0.
IF EFP[1,1]>EFP[2,1] THEN
temp:=EFP[2,1]; Con los pasos desarrollados en las secciones
ELSE previas se puede crear el bloque de funcin que
temp:=EFP[1,1]; realiza la evaluacin del sistema difuso, como se
END_IF; muestra a continuacin.
N Z P
EN FC10 ENO 1
U1 RET_VAL
U2
-1 0 1
N Z P
Fig. 2. Funcin difusa en forma de bloque del estndar.
El sistema lineal de tercer orden por controlar es Donde r(k) es la referencia, y(k) es la salida de la
simulado en el PLC por medio de una funcin. planta y u(k) es la entrada de la planta en el ins-
El sistema est dado por la siguiente funcin de tante k. Las constantes Ke, Kde y Ku, se utilizan
transferencia [13]: para sintonizar el proceso de control. Las funcio-
e(k) +
Fusificacin
Ke
Base de u(k) u(k)
-
+ e(k) Reglas Ku
y(k) Kde
-
e(k-1)
y(k)
Salida y(k)
Se programa la funcin difusa con la metodologa 0.6
anteriormente descrita, se discretiza el sistema
0.4
dado en Ec. (2) con un tiempo de muestreo igual a
0,2s. Posteriormente se implementa dicho sistema 0.2
de reglas.
0.8
e(k)/'e(k) N Z P
Salida y(k)
N Z P P 0.6
Z N Z P
P N N Z 0.4
REFERENCIAS
[1] H. Li and S. Tso, A fuzzy PLC with gain- [8] P. Siarry and F. Guely, A genetic algorithm
scheduling control resolution for a thermal for optimizing Takagi-Sugeno fuzzy rule bas-
process - a case study, Control Engineering es, Fuzzy Sets and Systems, vol. 99, no. 1,
Practice, vol. 7, pp. 523-529, 1999. pp. 37-47, Oct. 1998.
[2] O. Karasakal, E. Yesil, M. Guzelkaya and I. [9] R. Martnez-Marroqun, O. Castillo and J. So-
Eksin, The implementation and comparison ria, Optimization of membership functions
of different type self-tuning algorithms of of a fuzzy logic controller for an autonomous
fuzzy PID controllers on PLC, World Auto- wheeled mobile robot using ant colony opti-
mation Congress, Sevilla, Jul. 2004. mization, Evolutionary Design of Intelligent
Systems in Modeling, Simulation and Control,
[3] O. Karasakal, E. Yesil, M. Guzelkaya and I.
Springer Berlin / Heidelberg, pp. 3-16, 2009.
Eksin, Implementation of a New Self-Tun-
ing Fuzzy PID Controller on PLC, Turk. J. [10] E. Omizegba and F. Monikang, Fuzzy
Electrical Engeenering & Computer Science, logic controller parameter tuning using par-
vol. 13, no. 2, pp. 277-286, 2005.
ticle swarm algorithm, International Jour-
nal of Modelling, Identication and Control
[4] H. Ferdinando, The Implementation of low
2009, vol. 6, no.1, pp. 26 31, 2009.
cost fuzzy logic controller for PLC TSX 37-
21, International Conference on Intelligent
[11] International Electrotechnical Commis-
and Advanced Systems 2007, Kuala Lumpur,
sion (IEC), IEC 1131 Programmable Con-
Malaysia, Nov. 2007.
trollers. Part 7: Fuzzy Control Programming.
[5] M. Yahyaei, J.E. Jam and R. Hosnavi, Con- IEC 1131-7, Jan. 1997.
trolling the navigation of automatic guided
vehicle (AGV) using integrated fuzzy logic [12] R.W. Lewis, Programming Industrial
controller with programmable logic control- Control Systems Using IEC 1131-3. The Insti-
ler (IFLPLC)stage 1, The International tution of Engineering and Technology, Lon-
Journal of Advanced Manufacturing Technol- don: United Kingdom 1998.
ogy, vol. 47, no. 5-8, pp. 795 - 808, 2010.
[13] H. Li, A comparative design and tuning
[6] X. Liu, J. Geng, S. Teng and C. Li, A fuzzy- for conventional fuzzy control, IEEE Trans-
PID controller with adjustable factor based on actions on Systems, Man, and Cybernetics
S7-300 PLC, International Journal of Mod- Part B: Cybernetics, vol. 27, no. 5, pp. 884-
elling, Identication and Control 2009, vol. 7, 889, Oct. 1997.
no. 4, pp. 371 375, 2009.
[14] I. Altas and A. Sharaf, A generalized
[7] J. Jassbi, S.H. Alavi, P.J. Serra and R. Ribeiro, direct approach for designing fuzzy logic
Transformation of a Mamdani FIS to rst or- controllers in matlab/simulink GUI environ-
der sugeno FIS, IEEE international confer- ment, International Journal of Information
ence on Fuzzy systems, London, United King- Technology and Intelligent Computing, vol. 1,
dom, Jul. 2007. no.4, 2007.