Práctica 1: PL 1a: Entorno de programación MathWorks: Simulink



Similar documents
Introduction to Simulink

Simulink Getting Started Guide

Building a Simulink model for real-time analysis V Copyright g.tec medical engineering GmbH

New Server Installation. Revisión: 13/10/2014

Module 2 Introduction to SIMULINK

Propiedades del esquema del Documento XML de envío:

PC Agent Quick Start. Open the Agent. Autonomy Connected Backup. Version 8.8. Revision 0

Personal Geodatabase 101

EE 1130 Freshman Eng. Design for Electrical and Computer Eng.

Exercise 10: Basic LabVIEW Programming

Introduction to the use of the environment of Microsoft Visual Studio 2008

Lab 3: Introduction to Data Acquisition Cards

Raster to Vector Conversion for Overlay Analysis

Física Computacional Conceptos de programación.

Market Pricing Override

Module 1: Getting Started With Altium Designer

This Skill Builder demonstrates how to define and place sketched symbols in drawings.


An Introduction to Using Simulink

Sales Management Main Features

Application. 1.1 About This Tutorial Tutorial Requirements Provided Files

Create a New Database in Access 2010

MATLAB. Creating Graphical User Interfaces Version 6. The Language of Technical Computing. Computation. Visualization. Programming

Data Mining. SPSS Clementine Clementine Overview. Spring 2010 Instructor: Dr. Masoud Yaghini. Clementine

Adobe Acrobat: Creating Interactive Forms

IBM Operational Decision Manager Version 8 Release 5. Getting Started with Business Rules

Dials & Gauges Blockset

Introduction to MS WINDOWS XP

HPN Product Tools. Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.

Work with Arduino Hardware

Microsoft Office System Tip Sheet

Citrix EdgeSight for Load Testing User s Guide. Citrx EdgeSight for Load Testing 2.7

Introduction to MATLAB Gergely Somlay Application Engineer

How to program a Zumo Robot with Simulink

Tutorial: Time Of Day Part 2 GUI Design in NetBeans

Maple Quick Start. Introduction. Talking to Maple. Using [ENTER] 3 (2.1)

E-Map Application CHAPTER. The E-Map Editor

Composite.Community.Newsletter - User Guide

Introduction to ROOT and data analysis

EET 310 Programming Tools

Microsoft Office System Tip Sheet

Citrix EdgeSight for Load Testing User s Guide. Citrix EdgeSight for Load Testing 3.8

Práctica #1: Ambiente de Desarrollo Integrado: Tornado.

WebSphere Business Monitor V6.2 Business space dashboards

Creating a Patch Management Dashboard with IT Analytics Hands-On Lab

Xilinx ISE. <Release Version: 10.1i> Tutorial. Department of Electrical and Computer Engineering State University of New York New Paltz

MATLAB 7 Creating Graphical User Interfaces

MATLAB Control System Toolbox Root Locus Design GUI

PowerLogic ION Enterprise 6.0

Ejercicios propuestos C. Alexander IV.2 Parametric VaR

Build Your First Web-based Report Using the SAS 9.2 Business Intelligence Clients

6.094 Introduction to Programming in MATLAB

File Manager Pro User Guide. Version 3.0

Scicos is a Scilab toolbox included in the Scilab package. The Scicos editor can be opened by the scicos command

Changing Your Cameleon Server IP

PROGRAMA DE GRAFICACIÓN DE VELOCIDADES EN VENTANAS DE MAPINFO

Instructions for Use. CyAn ADP. High-speed Analyzer. Summit G June Beckman Coulter, Inc N. Harbor Blvd. Fullerton, CA 92835

SECURE USER GUIDE OUTLOOK 2000

Qlik Sense Cloud. Qlik Sense Copyright QlikTech International AB. All rights reserved.

Printer Sharing of the PT-9500pc in a Windows Environment

14.1. bs^ir^qfkd=obcib`qflk= Ñçê=emI=rkfuI=~åÇ=léÉåsjp=eçëíë

DbSchema Tutorial with Introduction in SQL Databases

Visión general de la integración con asanetwork

CLC Bioinformatics Database

BID2WIN Workshop. Advanced Report Writing

Práctica 5. MS SQL Server

Using the SAS Enterprise Guide (Version 4.2)

Web Conferencing Demo and Tutorial

Knowledgebase Article

Introduction. Chapter 1

Walkthrough: Creating and Using an ASP.NET Web Service in Visual Web Developer

Access 2010: The Navigation Pane

Desktop, Web and Mobile Testing Tutorials

LabVIEW Day 1 Basics. Vern Lindberg. 1 The Look of LabVIEW

WEB TRADER USER MANUAL

DataPA OpenAnalytics End User Training

Learn how to create web enabled (browser) forms in InfoPath 2013 and publish them in SharePoint InfoPath 2013 Web Enabled (Browser) forms

NETWORK PRINT MONITOR User Guide

Microsoft Access Introduction

Mesa DMS. Once you access the Mesa Document Management link, you will see the following Mesa DMS - Microsoft Internet Explorer" window:

How to create pop-up menus

TECHNICAL TRAINING LAB INSTRUCTIONS

Example #1: Controller for Frequency Modulated Spectroscopy

Making the Most of Files & Folders. Schoolwires Centricity2

GOOGLE DOCS APPLICATION WORK WITH GOOGLE DOCUMENTS

Lab A: Deploying and Managing Software by Using Group Policy Answer Key

A Tutorial Introduction to Control Systems Development and Implementation with dspace

Topography of an Origin Project and Workspace

Creating Online Surveys with Qualtrics Survey Tool

ArcScan Tutorial. Copyright Esri All rights reserved.

USING STUFFIT DELUXE THE STUFFIT START PAGE CREATING ARCHIVES (COMPRESSED FILES)

Introduction to LabVIEW for Control Design & Simulation Ricardo Dunia (NI), Eric Dean (NI), and Dr. Thomas Edgar (UT)

Census Data: Access, Mapping and Visualization

28 What s New in IGSS V9. Speaker Notes INSIGHT AND OVERVIEW

Introduction to Simulink & Stateflow. Coorous Mohtadi

Outlook 2007 EXPLORE THE OUTLOOK USER INTERFACE. Microsoft. Basic Tasks

Working with Office Applications and ProjectWise

Getting Started with Crystal Reports Session Description:

Transcription:

Práctica 1: PL 1a: Entorno de programación MathWorks: Simulink 1

Objetivo... 3 Introducción Simulink... 3 Open the Simulink Library Browser... 3 Create a New Simulink Model... 4 Simulink Examples... 4 Simulink Library Browser... 4 Simulink Editor... 5 Simulate the Simple Model... 5 Subsystems and Masks... 5 Creating a Subsystem... 6 Create a Subsystem Mask... 6 Move Data Between MATLAB and Simulink Model... 6 Import Data from the MATLAB Workspace... 6 Export Simulation Data to the MATLAB Workspace... 6 Import Signal Data with Signal Builder from excell (ex_signaldata.xls)... 7 Ejercicio Simulink (Ejercicio PL1a)... 8 2

Objetivo. El objetivo de esta práctica es familiarizarse con los entornos software con los que se trabajará a lo largo de la asignatura. En esta práctica únicamente se realizarán simulaciones numéricas con Simulink (MathWorks). Medios: Guión de prácticas, manuales Mathworks. Introducción Simulink Simulink is a block diagram environment for multidomain simulation and Model Based Design. It supports system level design, simulation, automatic code generation, and continuous test and verification of embedded systems. Simulink provides a graphical editor, customizable block libraries, and solvers for modeling and simulating dynamic systems. It is integrated with MATLAB, enabling you to incorporate MATLAB algorithms into models and export simulation results to MATLAB for further analysis. Simulink provides a graphical user interface (GUI) for building models as block diagrams. If these blocks do not meet your needs, however, you can also create your own blocks. The third step in modeling a system is to formulate the mathematical equations that describe the system. For each subsystem, use the list of system components that you identified to describe the system mathematically. Your model may include: Algebraic equations Logical equations Differential equations, for continuous systems Difference equations, for discrete systems You use these equations to create the block diagram in Simulink. Open the Simulink Library Browser You need MATLAB running before you can open the Simulink Library Browser. 1 Start MATLAB, and then in the MATLAB Command Window, enter simulink The Simulink Library Browser opens. 3

Create a New Simulink Model Create a new Simulink model from the Simulink Library Browser. From the Simulink Library Browser menu, select File > New > Model. An empty model opens in the Simulink Editor. In the Simulink Editor, select File > Save. In the Save As dialog box, enter a name for your model, and then click Save. Simulink Examples modeling concepts and Simulink features. You can access these examples from the Help menu or from the documentation. From the Simulink Editor, select Help > Simulink > Examples. From the Help > Simulink > Help, click Examples at the top of the product landing page. Simulink Library Browser The Simulink Library Browser displays the block libraries installed on your computer. You start to build models by copying blocks from a library into a Simulink Editor model window. Task View the blocks in a library Search for a specific block Get summary information about a block Get detailed information about a block View block parameters Copy a block from the Library Browser to a model Action to Perform Using the Library Browser In the left pane, select a library name, or in the right pane, double-click a library icon. In the block search field, enter the name of a block, and then click the find block icon. Select View > Show Block Descriptions. Then select the block. Select the block, and then select Help > Help for the Selected Block. The Help browser opens with the reference page for the block. Right-click a block, and then select Block parameters. Drag a block from the Library Browser to a Simulink Editor model window. 4

Simulink Editor The Simulink Editor contains a block diagram of your model. You build models by dragging blocks from the Simulink Library Browser window to the Simulink Editor model window. In the model window, you build a block diagram by arranging the blocks logically, connecting the blocks with signal lines, and setting the parameters for each block. Example: To create this simple model, you need four blocks: Sine Wave Generates an input signal for the model. Integrator Processes the input signal. Mux Combines the input signal and processed signal into one signal. Scope Visualizes the signals. Simulate the Simple Model Before you simulate a model, you have to set simulation options. Specify options, such as the stop time and solver, using the Model Configuration Parameters dialog box. In the Simulink Editor, select Simulation > Model Configuration Parameters. The Configuration Parameters dialog box opens to the Solver pane In the Stop time field, enter 20. In the Max step size field, enter 0.2 In the Simulink Editor, select Simulation > Run Double click the Scope block. From the Scope block toolbar, click the Parameters button Subsystems and Masks. In the MATLAB Command Window, enter: sldemo_househeat 5

Fahrenheit to Celsius masked Subsystem block : Diagram > Mask > Look Under Mask. Creating a Subsystem click and drag a bounding box around the blocks you want to group Diagram > Subsystem & Modeling Reference > Create Subsystem from Selection Create a Subsystem Mask You can customize the appearance of a subsystem by using a process known as masking Right-click the new subsystem block. In the context menu, select Mask > Create Mask. The Icon & Ports pane enables you to define the block icon. See Icon & Ports Pane. The Parameters pane enables you to define and describe Mask Parameters dialog box parameter prompts, and to name the variables associated with the parameters. See Parameters Pane. The Initialization pane enables you to specify initialization commands. See Initialization Pane. The Documentation pane enables you to define the mask type and specify the block description and the block help. See Documentation Pane. Move Data Between MATLAB and Simulink Model Import Data from the MATLAB Workspace Sources library In1 block Simulation > Model Configuration Parameters From the menu on the left side of the Configuration Parameters dialog box, select Data Import/Export. On the Data Import/Export pane, select the Input check box. In theinput field, enter [z,y], where Z and y are Workspace variables. Export Simulation Data to the MATLAB Workspace Library Browser. Sinks library Out1 block Simulation > Model Configuration Parameters. 6

From the menu on the left side of the Configuration Parameters dialog box, select Data Import/Export. On the Data Import/Export pane, select the Time and Output check boxes. Import Signal Data with Signal Builder from excell (ex_signaldata.xls) Double click the Signal Builder block. A Signal Builder window opens and displays one data group with an Amplitude signal. From the Signal Builder menu, select Group > Copy. A second group named Group 2 appears in the Active Group drop down list. Select Group > Rename, and enter more meaningful names that describes the input data. For example, rename Group 1 and Group 2 to Impulse Input and Ramp Input From the Signal Builder menu, select File > Import from File. In the Import File dialog box, click the Browse button From the Placement for Selected Data list, select Append selected signals to different groups (in order). Signal Builder converts the data on each sheet into a group. Click the Confirm Selection button Select the Select All check box. Running the Simulation from Signal Builder click the Run all button ==> The Simulation Data Inspector opens. Select the signals that you want to display. In the Simulation Data Inspector window, click the Compare Signals Create, Save, and Print a Figure In the Simulation Data Inspector window, select the Plot options button in the upper right of a signal plot. From the submenu, select Plot in new figure A MATLAB figure window opens with the selected signals. In the Figures window, select File > Save as 7

Ejercicio Simulink (Ejercicio PL1a) Genera la función de transferencia FT s 2 10000 70s 1000 a) Obtén la respuesta escalón. Visualiza en el mismo gráfico la entrada escalón y la respuesta. Los datos de entrada, salida y el array temporal deben almacenarse en una variable del workspace. Configura Configuration Parameters >> Data Import/Export b) Generar con el Signal Generator una variable u que contenga 50 puntos de un ciclo de una senoidal de 1Hz y 2Vpp. Genera también el vector temporal (t) correspondiente. El esquema de simulink a utilizar es el siguiente: Configura el Out1 y el Signal Generator para obtener 50 puntos. Configura Configuration Parameters >> Data Import/Export para que la variable de salida sea u. Observa que se generan 51 puntos. Elimina el valor 51 tanto del vector t como del u. Guarda el resultado en las variables t_50 y u_50. 8