Simulink Tutorial 1 CPE562

Similar documents
Lab 1: Dynamic Simulation Using Simulink and Matlab

ES205 Analysis and Design of Engineering Systems: Lab 1: An Introductory Tutorial: Getting Started with SIMULINK

Lecture 14 - Using the MATLAB Control System Toolbox and Simulink Friday, February 8, 2013

Simulink Modeling Tutorial

CONTROL SYSTEMS LABORATORY ECE311 LAB 1: The Magnetic Ball Suspension System: Modelling and Simulation Using Matlab

MATLAB BASICS. Instructor: Prof. Shahrouk Ahmadi. TA: Kartik Bulusu

EE 4314 Lab 1 Handout Control Systems Simulation with MATLAB and SIMULINK Spring Lab Information

System Simulation using Matlab

We begin exploring Euler s method by looking at direction fields. Consider the direction field below.

Titrator 3.0 Tutorial: Calcite precipitation

GMS 8.0 Tutorial MT3DMS Advanced Transport MT3DMS dispersion, sorption, and dual domain options

ICM-Chemist How-To Guide. Version 3.6-1g Last Updated 12/01/2009

Calendar Update Energy of Charges Intro to Circuits Ohm s Law Analog Discovery MATLAB What s next?

MATLAB Ordinary Differential Equation (ODE) solver for a simple example 1. Introduction

Linear System Theory

(t) ), ( ) where t is time, T is the reaction time, u n is the position of the nth car, and the "sensitivity coefficient" λ may depend on un 1(

EE/ME/AE324: Dynamical Systems. Chapter 4: Block Diagrams

Problem 1 (10 points)

Using SPSS for One Way Analysis of Variance

EEE161 Applied Electromagnetics Laboratory 1

MAT 17A - UHP - DISCUSSION #10 December 1, 2015

Laboratory 1. Solving differential equations with nonzero initial conditions

Mathematical Modelling Using SimScape (Electrical Systems)

DEPARTMENT OF ELECTRONIC ENGINEERING

Mathematical Modelling Using Simulink

Mon Jan Improved acceleration models: linear and quadratic drag forces. Announcements: Warm-up Exercise:

MASS ATTENUATION COEFFICIENT OF LEAD

Lab 1 Uniform Motion - Graphing and Analyzing Motion

Computational Chemistry Lab Module: Conformational Analysis of Alkanes

Motion with Constant Acceleration

Using MATLAB with the Convolution Method

PV Module Simulink models ECEN 2060

BMEN 398: MATLAB Module: Higher Order Differential Equations; SIMULINK Fall 2005 Updated 8/21/2005 Hart

WILEY. Differential Equations with MATLAB (Third Edition) Brian R. Hunt Ronald L. Lipsman John E. Osborn Jonathan M. Rosenberg

Model of a DC Generator Driving a DC Motor (which propels a car)

ENED 1091 HW#3 Due Week of February 22 nd

Computer simulation of radioactive decay

Project 2: Using linear systems for numerical solution of boundary value problems

Introduction to ArcMap

Determining the Conductivity of Standard Solutions

Assignment 1 Physics/ECE 176

Step Response of First-Order Systems

1. Open polymath: 2. Go to Help, Contents F1 or Press F1

System Parameters and Frequency Response MAE 433 Spring 2012 Lab 2

Lab 5a: Pole Placement for the Inverted Pendulum

Computational Study of Chemical Kinetics (GIDES)

Temperature measurement

Constants and Conversions: g = 9.81 m/s 2 = 32.2 ft/s 2 ρ water = 1000 kg/m 3 C water = 1 cal/g-k 1 cal = J 1 L = 1.

Numerical solution of ODEs

Boyce/DiPrima 10 th ed, Ch 1.1: Basic Mathematical Models; Direction Fields

2D Plotting with Matlab

Other constants will be given in individual problems as needed.

January 18, 2008 Steve Gu. Reference: Eta Kappa Nu, UCLA Iota Gamma Chapter, Introduction to MATLAB,

Stability and Frequency Response of Linear Systems

LAB 2 - ONE DIMENSIONAL MOTION

Lab 2: Photon Counting with a Photomultiplier Tube

LAB 2: Orthogonal Projections, the Four Fundamental Subspaces, QR Factorization, and Inconsistent Linear Systems

13.4. Lesson 13.4 Changes of State. Overview

Chemical Kinetics I: The Dry Lab. Up until this point in our study of physical chemistry we have been interested in

CHEM 498Q / CHEM 630Q: Molecular Modeling of Proteins TUTORIAL #3a: Empirical force fields

Factoring Polynomials Using the GCF

Lesson 4 Linear Functions and Applications

These videos and handouts are supplemental documents of paper X. Li, Z. Huang. An Inverted Classroom Approach to Educate MATLAB in Chemical Process

CHEMDRAW ULTRA ITEC107 - Introduction to Computing for Pharmacy. ITEC107 - Introduction to Computing for Pharmacy 1

Laboratory 11 Control Systems Laboratory ECE3557. State Feedback Controller for Position Control of a Flexible Joint

Exercises for Windows

This assignment is due the second Thursday of school (September 10)

Lab 3: Quanser Hardware and Proportional Control

Companion. Jeffrey E. Jones

Problem Weight Score Total 100

Lab-Report Control Engineering. Proportional Control of a Liquid Level System

Fin System, Inc. Company Report. Temperature Profile Calculators. Team 1 J. C. Stewards, Lead A. B. Williams, Documentation M. D.

Jaguar DFT Optimizations and Transition State Searches

Requirements for AP Calculus

STATE UNIVERSITY OF NEW YORK COLLEGE OF TECHNOLOGY CANTON, NEW YORK COURSE OUTLINE MATH INTERMEDIATE ALGEBRA

University of Delaware Department of Mathematical Sciences Math 353 Engineering Mathematics III 06S C. Bacuta

PHY 111L Activity 2 Introduction to Kinematics

State Feedback MAE 433 Spring 2012 Lab 7

A First Course on Kinetics and Reaction Engineering Example 26.3

Model Based Simulation of Forced Oscillator using Open Source Application Xcos: A Constructivist Paradigm

Matlab for Review. NDSU Matlab Review pg 1

Introduction to Computer Tools and Uncertainties

Chem 1 Kinetics. Objectives. Concepts

Motion II. Goals and Introduction

Using the Stock Hydrology Tools in ArcGIS

Lesson 7: Thermal and Mechanical Element Math Models in Control Systems. 1 lesson7et438a.pptx. After this presentation you will be able to:

Spis treści Contents List of Examples Preface to Third Edition 21

Cerno Application Note Extending the Limits of Mass Spectrometry

Mechatronics Exercise: Modeling, Analysis, & Control of an Electrohydraulic Valve-Controlled Servomechanism

AP Physics 1 Summer Assignment #

New Mexico Tech Hyd 510

The Geodatabase Working with Spatial Analyst. Calculating Elevation and Slope Values for Forested Roads, Streams, and Stands.

Math Lab 10: Differential Equations and Direction Fields Complete before class Wed. Feb. 28; Due noon Thu. Mar. 1 in class

Lab 4 Numerical simulation of a crane

Homework 1 Solutions

171S1.1 Graphs, Functions, Models August 23, 2012

Engineering Physics 3W4 "Acquisition and Analysis of Experimental Information" Part II: Fourier Transforms

Math 2250 Lab 3 Due September 18, Name:

1 Overview of Simulink. 2 State-space equations

CE 365K Exercise 1: GIS Basemap for Design Project Spring 2014 Hydraulic Engineering Design

Transcription:

Simulink Tutorial 1 CPE562 Week 1 Introduction to Simulink Familiarization with Simulink blocks Sources: Constants Sinks: Display Operations: Sum, Product, Add, Divide. Mathematical operations involving blocks for sources, sinks and operations. Sources Operations Sinks 1 Constant sum Display 0 1 Constant1 Divide 1 Constant2 Tutorial 1. Prepare and run simulink block for the following: a. 1 + 2 = b. 2/3 + 4/5 = c. 3/5*7 4/9*2 + 9*6 = d. 4/(9-5/6) + 3/(8/5-2) = Homework 2. Prepare and run simulink block for the following problems. a. Reynold number D v ρ N = µ where, D = 2 in., v = 10 ft/s, ρ = 62.4 lb/ft3, µ = 0.3 lb/(hr ft)

b. Heat capacity C p = 6.945 + 10.01 x 10-3 T 3.794 x 10-6 T 2 when T = 400 K. C p has the unit of cal/(g mol K). c. Prepare an innovative program to calculate the following heat capacity problem. The following problem is taken from Himmelblau p.533 (1982, 6 th Ed.). For air C p is in Btu/(lb mol- F) where T is in F. C p = 6.9 + 0.02884 x 10-2 T + 0.02429 x 10-5 T 2-0.08052 x 10-9 T 3 For these compounds C p is in J/(g mol- C) and T is in C. SO 2 : C p = 38.91 + 3.904 x 10-2 T - 3.104 x 10-5 T 2 + 8.606 x 10-9 T 3 SO 3 : C p = 48.50 + 9.188 x 10-2 T - 8.540 x 10-5 T 2 + 32.40 x 10-9 T 3 O 2 : C p = 29.10 + 1.158 x 10-2 T - 0.6076 x 10-5 T 2 + 1.311 x 10-9 T 3 N 2 : C p = 29.00 + 0.2199 x 10-2 T - 0.5723 x 10-5 T 2-2.871 x 10-9 T 3

Simulink Tutorial 2 CPE562 Week 2 Familiarization with Simulink blocks Sources: Constants, Step, Ramp. Sinks: Display, Operations: Sum, Product, Add, Divide, Math functions, Special functions. Mathematical operations involving blocks for sources, sinks and operations. Sources Operations Sinks 1 Constant sum Display 0 Ramp Step Divide e u Math Function f(u) Fcn Tutorial 1. Prepare and run simulink block for the following: a. Ramp (slope = 1, start time = 0, initial ouput = 0) b. Ramp (slope = 2, start time = 0, initial ouput = 0) c. Ramp (slope = 2, start time = 0, initial ouput = 5) d. Ramp (slope = 2, start time = 4, initial ouput = 0) e. Step (step time = 1, Init. = 0, Final = 1, sample time = 0) f. Step (step time = 3, Init. = 0, Final = 1, sample time = 0) g. Step (step time = 3, Init. = 2, Final = 1, sample time = 0) h. Step (step time = 3, Init. = 2, Final = 4, sample time = 0)

2. Calculate heat capacity using FCN block. C p = 6.945 + 10.01 x 10-3 T 3.794 x 10-6 T 2 where, T = 400. Doubled and tripled the temperature and observe the effect to C p. Homework 1. Study the effect of D, v, ρ, and µ to Reynold number, N. Reynold number is given by D v ρ N = µ Starting data: D = 2 in., v = 10 ft/s, ρ = 62.4 lb/ft3, µ = 0.3 lb/(hr ft) 2. Study the effect of [H + ] to ph as given by the following relationship. ph = - log 10 [H + ] 10-14 < [H + ] < 10-1 3. A power-law fluid having a density of 1041 kg/m 3 is flowing through 14.9 m of a tubing having an inside diameter of 0.0524 m at an average velocity of 0.0728 m/s. Given that the friction factor is 14.44, calculate the pressure drop as given by the following relationship. p = 4 f ρ L D 2 V 2 Study the effect V to p when the value of V is doubled until V = 1.1648 m/s.

Simulink Tutorial 2 CPE562 Week 3 Familiarization with Simulink blocks Sources: Constants, Step, Ramp. Sinks: Display, Operations: Sum, Product, Add, Divide, Math functions, Special functions. Signal processing blocks: Mux and Demux. Data saving blocks: To Workspace. Data saving at Matlab command window. Mathematical operations involving blocks for sources, sinks, operations and signal splitting. Source Operation Sink Ramp f(u) Fcn Mux Demux Tutorial 1. Prepare and run simulink block for the following: slope = 1 Ramp1 slope = -1 Ramp2 Mux

Result 2. Prepare and run simulink block for the following: slope = 1 Ramp1 1 slope = -1 Mux Demux Ramp2 2 After running, observe 1 and 2. What can you conclude? Homework 1. Prepare an innovative simulink program to calculate the following heat capacity problem. Observe the effect of C p when T is doubled and tripled. You may need other blocks that you had learned last week in order to solve this problem. The following problem is taken from Himmelblau p.533 (1982, 6 th Ed.). For air C p is in Btu/(lb mol- F) where T is in F. C p = 6.9 + 0.02884 x 10-2 T + 0.02429 x 10-5 T 2-0.08052 x 10-9 T 3 For these compounds C p is in J/(g mol- C) and T is in C. SO 2 : C p = 38.91 + 3.904 x 10-2 T - 3.104 x 10-5 T 2 + 8.606 x 10-9 T 3 SO 3 : C p = 48.50 + 9.188 x 10-2 T - 8.540 x 10-5 T 2 + 32.40 x 10-9 T 3 O 2 : C p = 29.10 + 1.158 x 10-2 T - 0.6076 x 10-5 T 2 + 1.311 x 10-9 T 3 N 2 : C p = 29.00 + 0.2199 x 10-2 T - 0.5723 x 10-5 T 2-2.871 x 10-9 T

2. Observe the effect of changing power index from 0.5 to 1.5 for every 0.5 increment of the following relationship: y = x 0.5... (1) y = x 1.0... (2) y = x 1.5... (3) Sample of solution. u(1)^0.5 Ramp Fcn u(1)^1 Fcn1 u(1)^1.5 Fcn2

Simulink Tutorial 4 CPE562 Week 6 Familiarization with Simulink blocks Sources: Constants, Step, Ramp, Digital clock. Sinks: Display, Operations: Sum, Product, Add, Divide, Math functions, Special functions. Signal processing blocks: Mux and Demux. Data saving blocks: To Workspace. Data saving & plot at Matlab command window. Mathematical operations involving blocks for sources, sinks, operations and signal splitting. Tutorial 1. Compare y = x 2 and y = x 3 graphically. Copy the plot to MSWORD. 2. Prepare and run simulink block for the following: Source Operation Sink x To Workspace1 u[1]^3 Clock Fcn y To Workspace 3. Set To Workspace, To Workspace1 data saving format to Array and variable name to y and x respectively. 4. Run the program for Fcn u[1]^2 first. 5. At Matlab command window type >> plot(x,y) 6. Run the program for Fcn u[1]^3 7. At Matlab command window type >> figure(2), plot(x,y) 8. Copy line plot from Figure 2 to Figure. 9. At Figure, click Edit Copy Figure 10. Open MSWORD and paste.

11. 1000 900 800 700 Y 600 500 400 y = x 3 300 200 y = x 2 100 0 0 1 2 3 4 5 6 7 8 9 10 X 12. Get your self acquainted with all command in Figure (File, Edit, View, etc.) esp. Property Editor to label x, y axes and Text Arrow to label line plots.