SIMULINK

25
Simulación y Control de Procesos Ing. Ada Patricia Barturén Quispe

description

Representacion de diagrama de bloques en simulink

Transcript of SIMULINK

Diapositiva 1

Simulacin y Control de Procesos

Ing. Ada Patricia Barturn Quispe1REDUCCION DE DIAGRAMA DE BLOQUES CON MATLABPROGRAMANDO UNA FUNCION DE TRANSFERENCIA.Introducir en Matlab la funcin de transferencia polinmica siguiente.

Comando a usar : printsys3Ejecutar una simulacinPoner los parmetros de la simulacinEjecutar una simulacin desde la ventana del modeloPoner y sacar valores en/desde los modelosUtilizar en Matlab los valores obtenidos en la simulacinVariables definidas en Matlab y SimulinkSimular desde la lnea de comandos25REDUCCION DE DIAGRAMA DE BLOQUES CON MATLABSi deseamos obtener la funcin de transferencia de un sistema en lazo abierto, es decir, dentro de un lazo con retroalimentacin unitaria, debemos emplear el comando feedback definindola de la siguiente manera.FEEDBACK

Comando a usar : feedback4REDUCCION DE DIAGRAMA DE BLOQUES CON MATLABEste comando nos brinda la posibilidad de poder multiplicar dos funciones de trasferencias o ser manipuladas como bloque que se encuentran en serie y que pueden ser unidas originando una sola.SERIESComando a usar : series

5EJEMPLO 1

ENCUENTRE LA FUNCION DE TRANSFERENCIA6EJEMPLO 2

ENCUENTRE LA FUNCION DE TRANSFERENCIA7PRACTICA 1Simular la respuesta de un sistema descrito por su funcin de transferencia ante una determinada seal de entrada con Matlab y simulink

8PRACTICA 1Con Matlab se pude obtener la respuesta ante un impulso de Dirac, un escaln, etcNombre del programa : Practica_1clear,clc%ingresamos la funcion de transferencianum=8;dem=[1 4 9];printsys(num,dem)%otra forma de representar la funcion de transferenciaa=tf(num,dem)%otra forma g=tf([8],[1 4 9])%representando el impulso escalnfigure(1)step(g)%representando el impulso de diracfigure(2)impulse(g)9PRACTICA 1

10PRACTICA 1

11PRACTICA 1Simulando la respuesta con Simulink

12EVALUACIONUTILIZANDO MATLAB ENCUENTRE LA FUNCION DE TRANSFERENCIA

13Introduccin a Simulink

Ing. Ada Patricia Barturn Quispe

IndiceQu es SimulinkCmo crear un modeloCmo ejecutar la simulacin de un modelo15At the most basic level, building a model involves four steps: collecting and connecting blocks, simulating the system, analyzing results, and refining the model. Each of these steps will usually be done numerous times over the lifetime of a model. During this course, we are going to look at each of these steps in detail. We will first start with Collecting and connecting blocks. Later on we will simulate a few different types of models, and then we will work with oneof the models to analyze results. Finally we will look at some advanced features which will help you to refine your models.Es una herramienta interactiva,para modelar y analizar sistemas dinmicos, basada en diagramas de bloques. Est fuertemente acoplada con MATLAB Qu es Simulink ?MATLABBlocksetsStateflowToolboxes: Control, Seales Estadsticas, Finanzas,...SIMULINKReal Time Workshop16What is SIMULINK? The course is about SIMULINK, but to understand SIMULINK, you first need to understand something about the environment that SIMULINK lives in: MATLABThe main thing to notice about the picture above is that SIMULINK belongs not at the center of the diagram, but off to the side. MATLAB solidly occupies center stage. So our question about SIMULINK leads to another question: What is MATLAB? I prefer to think of SIMULINK as a child of MATLAB. In order to work, SIMULINK needs MATLAB. The converse is not true.

See: Using SIMULINKPages:1-2 and 1-3Crear un modeloEditar un modeloAbrir la ventana de un nuevo modeloConectar los bloquesAadir bloquesCambiar el tamao de los bloquesModificar etiquetas y aadir anotacionesParametrizar los bloquesGuardar un modelo (formato M-File)Abrir un modelo desde Matlab17See:Using SIMULINKPages:Chapters 2 and 3Abrir la ventana de un nuevo modelo

Escribiendo simulink se inicia el programa. simulink

Seleccionado, en Simulink, en el men File el submen Newse crea la ventana de un nuevo modelo

18See:Using SIMULINKPages:3-3Hacerdoble click en un iconopara desplegarlos bloques dela librera

Aadir bloques

Arrastrar los bloques deseados dentro de la ventana del modelo simulink

19You can get the Signal Generator from the Sources library. Likewise, pull the Gain block from the Linear library and the Scope block from the Sinks library. All you need to do is double click on the block library and then drag the blocks that you need into the new untitled model window.See:Using SIMULINKPages:3-4Conectar los bloquesPara aadir una lnea:

Arrastrar, pulsando el botn derecho del ratn,desde una salida, o desde una entrada,de alguno de los bloques

20See:Using SIMULINKPages:3-15 to 3-19Cambiar el tamao de los bloques

Tras seleccionar el bloque, aparecen en l los puntos,desde los cuales se puede arrastrar para cambiar el tamao del bloquePosteriormente se pueden mover el bloquepara que las lneas de conexin queden rectas

Modificar etiquetas y aadir anotacionesEtiquetasAnotacionesHacer click en la etiqueta y editarlaHacer click en el fondo y escribir el texto

Hacer doble click sobre el bloque que se desea parametrizar

Parametrizar los bloques

Guardar un modeloCrea el fichero del modelo: orden_1.m

Abrir el modelo desde Matlab

24See:Using SIMULINKPages:3-33, Appendix B