Sie sind auf Seite 1von 24

SERVICIO NACIONAL DE APRENDIZAJE SENA

REGIONAL VALLE DEL CAUCA


CENTRO DE ELECTRICIDAD Y AUTOMATIZACIÓN INDUSTRIAL
PROGRAMA DE FORMACIÓN CONJUNTA

METODOLOGIA PARA EL DISEÑO E IMPLEMENTACION DE


SISTEMAS DE CONTROL FUZZY EN AUTOMATAS
PROGRAMABLES
PLANTEAMIENTO DEL PROBLEMA

Se requiere diseñar e implementar un sistema de control Fuzzy para regular el nivel


en el Tanque TK102, como elemento final de control se utiliza la válvula LCV100.
La válvula LCV102 se utiliza para generar cambios de carga en el sistema. Con la
bomba P100 se impulsa el agua desde el tanque de almacenamiento TK100, hasta
El tanque de proceso TK102. La figura 1 muestra el diagrama del proceso.

Figura 1. Diagrama del proceso


DISEÑO DEL SISTEMA DE CONTROL FUZZY
El sistema de control Fuzzy está conformado como lo muestra la figura 2.

Figura 2. Sistema de control Fuzzy


1. Adecuación de las señales del proceso.

La variable del proceso Nivel, es entregado en un rango de 0 – 100% por el modulo

De entrada análogo del PLC, es necesario adecuarla al universo de discurso en el

Bloque de fuzificación, que generalmente es de [-1 1]

El elemento final de control recibe una señal de 4 – 20 mA , 0 – 100% desde la


Salida análoga del PLC.

Para lograr esta tarea se diseña la función de escalado.


FUNCIÓN DE ESCALADO

ESCALADO

out IN1
IN2
in4
IN3

IN4

in3 IN5 OUT


in5
in1 in2
FUZIFICACIÓN DE LAS SEÑALES DE ENTRADA AL SISTEMA DE CONTROL

Conversión de un valor de entrada a los grados de pertenencia de la variable a las


funciones de pertenencia definidas.

Para esto se determinan las características de los conjuntos borrosos


CONJUNTOS BORROSOS

Representa el grado en el que u  U, pertenece al conjunto


borroso F
FUNCIONES DE PERTENENCIA

La función de inclusión o pertenencia (membership function) de un conjunto


borroso consiste en un conjunto de pares ordenados

Alto

Temperatura
0 a b c
Función de Tipo Triangular

Trianmf
a
b

OUT
Función de Tipo Trapezoidal

Alto
1

Trapmf
a
Temperatura b
0 a b c d
c

OUT
u
Función de Tipo Gaussiana

Gaussianamf

Desv

media
Sal_Gaussmf
In OUT
Especificaciones del sistema de Control.
FUNCIONES DE PERTENENCIA ENTRADAS
FUNCIONES DE PERTENENCIA SALIDAS
BASE DE REGLAS

ERROR
REGLAS
NGE NPE ZE PPE PGE
NGINTE CERRADO CERRADO POCOCERRADO PABIERTO ABIERTO
NPINTE CERRADO CERRADO POCOCERRADO MABIERTO ABIERTO
INTERROR ZINTE CERRADO POCOCERRADO PABIERTO MABIERTO ABIERTO
PPINTE CERRADO POCOCERRADO PABIERTO MABIERTO ABIERTO
PGINTE CERRADO POCOCERRADO PABIERTO MABIERTO ABIERTO
(* REGLA 1

SI ERROR ES NGE= Sal_Error[1] Y IntERROR ES NGINTE= Sal_IntError[1] ENTONCES VALVULA


ES CERRADA

Regla[1]:=MIN(Sal_Error[1], Sal_IntError[1]);*)

(*REGLA 2

SI ERROR ES NGE= Sal_Error[1] Y IntERROR ES NPINTE= Sal_IntError[2] ENTONCES VALVULA


ES CERRADA *)

(*Regla[2]:=MIN(Sal_Error[1], Sal_IntError[2]);*)

(*REGLA 3

SI ERROR ES NGE= Sal_Error[1] Y IntERROR ES ZINTE= Sal_IntError[3] ENTONCES VALVULA


ES CERRADA *)

(*Regla[3]:=MIN(Sal_Error[1], Sal_IntError[3]);*)

(*REGLA 4

SI ERROR ES NGE= Sal_Error[1] Y IntERROR ES PPINTE= Sal_IntError[4] ENTONCES VALVULA


ES CERRADA *)

(*Regla[4]:=MIN(Sal_Error[1], Sal_IntError[4]);*)

(*REGLA 5

SI ERROR ES NGE= Sal_Error[1] Y IntERROR ES PGINTE= Sal_IntError[5] ENTONCES VALVULA


ES CERRADA *)

(*Regla[4]:=MIN(Sal_Error[1], Sal_IntError[5]);*)
(* REGLA 6

SI ERROR ES NPE= Sal_Error[2] Y IntERROR ES NGINTE= Sal_IntError[1] ENTONCES VALVULA


ES CERRADA

(*Regla[6]:=MIN(Sal_Error[2], Sal_IntError[1]);*)

(*REGLA 7

SI ERROR ES NPE= Sal_Error[2] Y IntERROR ES NPINTE= Sal_IntError[2] ENTONCES VALVULA


ES CERRADA *)

(*Regla[7]:=MIN(Sal_Error[2], Sal_IntError[2]);*)

(*REGLA 8

SI ERROR ES NPE= Sal_Error[1] Y IntERROR ES ZINTE= Sal_IntError[3] ENTONCES VALVULA


ES POCOABIERTA *)

(*Regla[8]:=MIN(Sal_Error[2], Sal_IntError[3]);*)

(*REGLA 9

SI ERROR ES NPE= Sal_Error[2] Y IntERROR ES PPINTE= Sal_IntError[4] ENTONCES VALVULA


ES POCOABIERTA *)

(*Regla[9]:=MIN(Sal_Error[2], Sal_IntError[4]);*)

(*REGLA 10

SI ERROR ES NPE= Sal_Error[2] Y IntERROR ES PGINTE= Sal_IntError[5] ENTONCES VALVULA


ES POCOABIERTA *)

(*Regla[10]:=MIN(Sal_Error[2], Sal_IntError[5]);*)
(* REGLA 11

SI ERROR ES ZE= Sal_Error[3] Y IntERROR ES NGINTE= Sal_IntError[1] ENTONCES VALVULA ES


POCOABIERTA

(*Regla[11]:=MIN(Sal_Error[3], Sal_IntError[1]);*)

(*REGLA 12

SI ERROR ES ZE= Sal_Error[3] Y IntERROR ES NPINTE= Sal_IntError[2] ENTONCES VALVULA


ES POCOABIERTA *)

(*Regla[12]:=MIN(Sal_Error[3], Sal_IntError[2]);*)

(*REGLA 13

SI ERROR ES ZE= Sal_Error[3] Y IntERROR ES ZINTE= Sal_IntError[3] ENTONCES VALVULA ES


POCOABIERTA *)

(*Regla[13]:=MIN(Sal_Error[3], Sal_IntError[3]);*)

(*REGLA 14

SI ERROR ES ZE= Sal_Error[3] Y IntERROR ES PPINTE= Sal_IntError[4] ENTONCES VALVULA ES


POCOABIERTA *)

(*Regla[14]:=MIN(Sal_Error[3], Sal_IntError[4]);*)

(*REGLA 15

SI ERROR ES ZE= Sal_Error[3] Y IntERROR ES PGINTE= Sal_IntError[5] ENTONCES VALVULA


ES POCOABIERTA *)

(*Regla[15]:=MIN(Sal_Error[3], Sal_IntError[5]);*)
(* REGLA 16

SI ERROR ES PPE= Sal_Error[4] Y IntERROR ES NGINTE= Sal_IntError[1] ENTONCES VALVULA


ES POCOABIERTA

(*Regla[16]:=MIN(Sal_Error[4], Sal_IntError[1]);*)

(*REGLA 17

SI ERROR ES PPE= Sal_Error[4] Y IntERROR ES NPINTE= Sal_IntError[2] ENTONCES VALVULA


ES MEDIOABIERTA *)

(*Regla[17]:=MIN(Sal_Error[4], Sal_IntError[2]);*)

(*REGLA 18

SI ERROR ES PPE= Sal_Error[4] Y IntERROR ES ZINTE= Sal_IntError[3] ENTONCES VALVULA ES


MEDIOABIERTA *)

(*Regla[18]:=MIN(Sal_Error[4], Sal_IntError[3]);*)

(*REGLA 19

SI ERROR ES PPE= Sal_Error[4] Y IntERROR ES PPINTE= Sal_IntError[4] ENTONCES VALVULA


ES MEDIOABIERTA *)

(*Regla[19]:=MIN(Sal_Error[4], Sal_IntError[4]);*)

(*REGLA 20

SI ERROR ES PPE= Sal_Error[4] Y IntERROR ES PGINTE= Sal_IntError[5] ENTONCES VALVULA


ES MEDIOABIERTA *)

(*Regla[20]:=MIN(Sal_Error[4], Sal_IntError[5]);*)
(* REGLA 21

SI ERROR ES PGE= Sal_Error[5] Y IntERROR ES NGINTE= Sal_IntError[1] ENTONCES VALVULA


ES POCOABIERTA

(*Regla[21]:=MIN(Sal_Error[5], Sal_IntError[1]);*)

(*REGLA 22

SI ERROR ES PGE= Sal_Error[5] Y IntERROR ES NPINTE= Sal_IntError[2] ENTONCES VALVULA


ES MEDIOABIERTA *)

(*Regla[22]:=MIN(Sal_Error[5], Sal_IntError[2]);*)

(*REGLA 23

SI ERROR ES PGE= Sal_Error[5] Y IntERROR ES ZINTE= Sal_IntError[3] ENTONCES VALVULA


ES MEDIOABIERTA *)

(*Regla[23]:=MIN(Sal_Error[5], Sal_IntError[3]);*)

(*REGLA 24

SI ERROR ES PGE= Sal_Error[5] Y IntERROR ES PPINTE= Sal_IntError[4] ENTONCES VALVULA


ES MEDIOABIERTA *)

(*Regla[24]:=MIN(Sal_Error[5], Sal_IntError[4]);*)

(*REGLA 25

SI ERROR ES PGE= Sal_Error[5] Y IntERROR ES PGINTE= Sal_IntError[5] ENTONCES VALVULA


ES MEDIOABIERTA *)

Regla[25]:=MIN(Sal_Error[5], Sal_IntError[5]);
INFERENCIA FUZZY
SI ERROR ES NGE= Sal_Error[1] Y IntERROR ES NGINTE= Sal_IntError[1] ENTONCES VALVULA
ES CERRADA

Regla[1]:=MIN(Sal_Error[1], Sal_IntError[1]);*)
AGREGACION

𝑤1 𝑦1 + 𝑤2 𝑦2
𝑆𝑎𝑙𝑖𝑑𝑎𝐹𝑢𝑧𝑧𝑦 =
𝑤1 + 𝑤2
INTERCAMBIO DINÁMICO DE DATOS DDE

IPC_DATA

CODSYS EXCEL FST PLC FEC


0

CODESYS

Das könnte Ihnen auch gefallen