0 Up votes1 Down votes

212 views8 pageshi

Mar 24, 2013

© Attribution Non-Commercial (BY-NC)

DOC, PDF, TXT or read online from Scribd

hi

Attribution Non-Commercial (BY-NC)

212 views

hi

Attribution Non-Commercial (BY-NC)

- The Woman Who Smashed Codes: A True Story of Love, Spies, and the Unlikely Heroine who Outwitted America's Enemies
- NIV, Holy Bible, eBook
- NIV, Holy Bible, eBook, Red Letter Edition
- Steve Jobs
- Cryptonomicon
- Hidden Figures Young Readers' Edition
- Make Your Mind Up: My Guide to Finding Your Own Style, Life, and Motavation!
- Console Wars: Sega, Nintendo, and the Battle that Defined a Generation
- The Golden Notebook: A Novel
- Alibaba: The House That Jack Ma Built
- Life After Google: The Fall of Big Data and the Rise of the Blockchain Economy
- Hit Refresh: The Quest to Rediscover Microsoft's Soul and Imagine a Better Future for Everyone
- Hit Refresh: The Quest to Rediscover Microsoft's Soul and Imagine a Better Future for Everyone
- The Innovators: How a Group of Hackers, Geniuses, and Geeks Created the Digital Revolution
- Autonomous: A Novel
- Algorithms to Live By: The Computer Science of Human Decisions
- Digital Gold: Bitcoin and the Inside Story of the Misfits and Millionaires Trying to Reinvent Money

You are on page 1of 8

Numerical Integration Lab Assignment

Assigned: March 4, 2013

Due: your next lab meeting (after spring break)

Name: insert name here

MECH 2220 MATLAB Lab 2Numerical Integration Spring 2013 Page 2 of 8

Problem Statement #1:

Write two user written functions to perform numerical integration using the

trapezoid method and Simpsons One Third Method, which you will name

trap_method and Simpsons_1_3 respectively. Your function must accept the

following arguments for both functions: an independent vector of numbers and a

dependent vector of numbers. Your function file must perform the following tasks:

a) Check that both vectors are of equal length.

b) Check that the independent vector in the Simpsons Method has equal

spaced intervals.

c) Compute numerically using trapezoid method and return the

value of the integral.

d) Compute numerically using Simpsons One Third method and

return the value of the integral.

Code for problem #1:

Paste code here

Solution for problem #1:

No output required

Name: insert name here

MECH 2220 MATLAB Lab 2Numerical Integration Spring 2013 Page 3 of 8

Problem Statement #2:

The force on a sailboat mast can be represented by the following function:

Where z is the elevation above the deck and H is the height of the mast. The

total force F exerted by the mast and the line of action d can be determined by

the following integrals

a) Use trapezoidal rule to compute the integral numerically given H=25, n=9.

b) Repeat step (a) using Simpsons 1/3 rule.

Code for problem #2:

Paste code here

Solution for problem #2:

Give solution/output here

Name: insert name here

MECH 2220 MATLAB Lab 2Numerical Integration Spring 2013 Page 4 of 8

Problem Statement # 3:

Problem 3 is based on a water level control simulation.

List of variables:

Tank dimensions:

D=tank diameter

H=tank height

Water level:

y=water level

y

i

=initial water level

y

sp

=desired water level (i.e. setpoint)

Controller:

DT=time step between measurements of water level

BAND=control band centered about the setpoint

k

I

=integration gain constant

Inlet Valve:

V

imax

=maximum inlet volumetric flow rate

Out flow:

V

out

=outlet volumetric flow rate

Name: insert name here

MECH 2220 MATLAB Lab 2Numerical Integration Spring 2013 Page 5 of 8

Name: insert name here

MECH 2220 MATLAB Lab 2Numerical Integration Spring 2013 Page 6 of 8

Problem Statement #3a:

On/Off Control

The length of time between water level measurements/ control adjustments is DT.

If the water level drops to the bottom of the band, the controller drives the inlet

valve to 100% open.

The valve stays 100% open until the water level reaches the top of the band.

When the water level reaches the top of the band, the controller drives the inlet

valve to the fully closed position.

The inlet valve remains fully closed until the water level once again drops to the

bottom of the band.

1. Write a script that prompts the user for the required inputs. Simulate

water level control for the following inputs:

Tank dimensions:

D=5 feet

H=10 feet

Water level:

y

i

=7 ft

y

sp

=5 ft

Controller:

DT=30 seconds

BAND=1 ft

k

I

=not used

Inlet Valve:

V

imax

=100 gallons per minute

Out flow:

V

out

=40 gallons per minute

2. Plot the water level as a function of time. Plot horizontal lines for the

setpoint, upper, and low band limits. Label and legend the plot appropriately:

Name: insert name here

MECH 2220 MATLAB Lab 2Numerical Integration Spring 2013 Page 7 of 8

Problem Statement #3b:

Proportional Control

The length of time between water level measurements/ control adjustments is DT.

The controller drives the inlet valve to a position ranging from 0 to 100%.

If the water level is at or above the top of the band, the proportional output is 0.

If the water level is at or below the bottom of the band, the proportional output to

the inlet valve is 100%.

When the water level is within the limits of the band, the proportional output

varies linearly from 0% at the top of the band to 100% at the bottom of the band.

1. Write a script that prompts the user for the required inputs. Simulate

water level control for the following inputs:

Tank dimensions:

D=5 feet

H=10 feet

Water level:

y

i

=7 ft

y

sp

=5 ft

Controller:

DT=2 seconds

BAND=1 ft

k

I

=not used

Inlet Valve:

V

imax

=100 gallons per minute

Out flow:

V

out

=40 gallons per minute

2. Plot the water level as a function of time. Plot horizontal lines for the

setpoint, upper, and low band limits. Label and legend the plot appropriately:

Name: insert name here

MECH 2220 MATLAB Lab 2Numerical Integration Spring 2013 Page 8 of 8

Problem Statement #3c:

Proportional & Integral Control (PI control)

The length of time between water level measurements/ control adjustments is DT.

The controller drives the inlet valve to a position ranging from 0 to 100%.

The controller output is set by the following:

SV= ( )

sp

0

min max +.5+k y y , 0 ,1 *100%

t

sp

I

y y

dt

band

1 _

1

' ;

1 , ]

1. Write a script that prompts the user for the required inputs. Simulate

water level control for the following inputs:

Tank dimensions:

D=5 feet

H=10 feet

Water level:

y

i

=7 ft

y

sp

=5 ft

Controller:

DT=2 seconds

BAND=1 ft

k

I

=.007

Inlet Valve:

V

imax

=100 gallons per minute

Out flow:

V

out

=40 gallons per minute

2. Plot the water level as a function of time. Plot horizontal lines for the

setpoint, upper, and low band limits. Label and legend the plot appropriately:

- Folio Additional Mathematics Project Work 1 - IntegrationUploaded bySiti Nur Hidayah
- Lecture HW 05 Linear Least SquaresUploaded bysmashthecommienwo
- Lab Report 8Uploaded bySarwar Hosen Simon
- lab report 8.docxUploaded bySarwar Hosen Simon
- (Atlantis Studies in Mathematics 3) B.G. Pachpatte (Auth.)-Analytic Inequalities_ Recent Advances-Atlantis Press (2012)Uploaded byInês Vieira
- SynderUploaded byRenny Daniel
- Lecture 008Uploaded byMahmoud El-Mahdy
- New Microsoft Word DocumentUploaded bykprk414
- integration and the fundamental theoremUploaded bySharada Prasad Panda
- Integration - The definite integralUploaded byOsman Villanueva
- AppendixUploaded byicml2011
- mcqsuniti-v-150813122121-lva1-app6892Uploaded bymsurfudeen6681
- All Chapter 11Uploaded bykmoiz
- Hourglass Dyna FileUploaded byZishan Naveed
- Differential Equations - Convolution IntegralsUploaded byJonathan Majaw
- Complex Plane IntegrationUploaded byGharold Garcia
- calculus guidelines and proceduresUploaded byapi-311648062
- LeibnizUploaded byadil
- numerical methods for Civil Engineering.pdfUploaded byq_giovanni
- IndicesUploaded byakma
- Gate SyllabusUploaded byParoma Roy
- 10 29 10Uploaded byRichard Shih
- Block 3 MEC 003 Unit 7Uploaded byAbhishek Patra
- Discrete IntegrationUploaded byJuan Pablo Poujade
- Trigonometric substitutionUploaded byKenneth Santacera
- Tirgul_12Uploaded byTom Hen
- DocumentUploaded byVenkadesh Kannan
- Iit Mathematics Test Jam 2015 SyllabusUploaded byShoaib Shaik
- Triple Integrals in Rectangular Coordinates.pdfUploaded byASHISH KUMAR.
- Cal II Fall 2016 Syllabus.pdfUploaded bycn fv

- Scientific work placeUploaded bypeloton10
- CH04_4A.pdfUploaded byWajdi Sadik
- Differentiation method for integralsUploaded byAnastasios26
- M.sc. MathemeticsUploaded byŠtŸløžx Prıı'nc Aadi
- pdf-5Uploaded byJames Bund
- Differential Equations Workbook for Dummies Chapter 1Uploaded byandrei
- lec3Uploaded byindifferentj
- Gaussians, And Inter-universal Teichmuller TheoryUploaded byAdrián López Cruces
- btech1stsUploaded byKKushal Mishra
- Solution of First Order Linear Differential EquationUploaded bynishagoyal
- Algoritmo Holmberg Persson VoladurasUploaded bygaguillo
- Supp Notes CalculusUploaded byd3mn
- Advanced XFEM AnalysisUploaded byandersonarizae
- Leibniz fundamental theorem of calculusUploaded byΧάρης Φραντζικινάκης
- 1 Integral Le Be SgueUploaded byLauraSerranoOrtigosa
- Hereditary Mechanics and BoltzmannUploaded bynadamau22633
- Chap 08 Real Analysis: Improper Integrals.Uploaded byatiq4pk
- 01.CivilUploaded byPrasobh Shamohan
- Mathematics Notes and Formula for Class 12 chapter 7. Integrals .pdfUploaded bysbarathi
- Casaseminar Eno Weno SchemeUploaded bynavala_pra
- SYMBOLS.docxUploaded byHemprasad Badgujar
- 17 Full Paper 2ndISFM Ronald M.hutauruk UNRIUploaded byRonald Mangasi Hutauruk
- syllabusbtechcivil.pdfUploaded byAmol Amoll
- 04604770Uploaded byAryce_
- hp 48gII user's guide EnglishUploaded bySean Ma
- Integral Calculator • With Steps!Uploaded byHera ley
- IOE Syllabus(civil-1st year)Uploaded bySibeshKumarSingh
- A Numerical, Thermo-mechanical Model for the Welding and Subsequent Loading of a Fabricated Structure.Uploaded byDebabrata Podder
- Finite Element procedureUploaded byGuatavo91
- Code MATH Course DetailsUploaded byMALIK BILAL

## Much more than documents.

Discover everything Scribd has to offer, including books and audiobooks from major publishers.

Cancel anytime.