205 views

Uploaded by smashthecommienwo

hi

- Makalah Integral Tak Tentu English Language
- Full Text
- Syllabus MA202 online2013
- New Microsoft Word Document
- A 2.5D Finite-difference Algorithm for Elastic Wave
- Lecture HW 05 Linear Least Squares
- EM hahaha
- Applied Calculus
- ili04
- Historical Comments on Finite Elements Oden
- Quispesaldana MATH2260 Summer-2017
- Course Outline - MATH 1007 - Carleton University
- 10.1.1.86
- 007137714 x
- ISE is IAE
- bt_mech_syl
- Prelim Exam
- 4311
- AAMIR BILAL BBA 6B 22733.docx
- Volumes of Solids of Revolution _ Applications of Integration _ Integral Calculus Review

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:

- Makalah Integral Tak Tentu English LanguageUploaded byMujahid Ghoni Abdullah
- Full TextUploaded bygargichaudhuri
- Syllabus MA202 online2013Uploaded byChris Bochen
- New Microsoft Word DocumentUploaded bynithinnithinnithin
- A 2.5D Finite-difference Algorithm for Elastic WaveUploaded byNANKADAVUL007
- Lecture HW 05 Linear Least SquaresUploaded bysmashthecommienwo
- EM hahahaUploaded byRommel Jagus
- Applied CalculusUploaded byginotrucheli
- ili04Uploaded byFabian Molina
- Historical Comments on Finite Elements OdenUploaded bylalbagh
- Quispesaldana MATH2260 Summer-2017Uploaded byBert Staire
- Course Outline - MATH 1007 - Carleton UniversityUploaded bymrhockey2442
- 10.1.1.86Uploaded byvenukumarvemula
- 007137714 xUploaded byAthalberth Athalberth Marqez
- ISE is IAEUploaded byAishah Yuri
- bt_mech_sylUploaded bySuren Sirohi
- Prelim ExamUploaded byRomeo Jr Pacheco Opena
- 4311Uploaded bySuperheavy Rockshow Go't
- AAMIR BILAL BBA 6B 22733.docxUploaded byAamir Sonu
- Volumes of Solids of Revolution _ Applications of Integration _ Integral Calculus ReviewUploaded byimrancenakk
- Miii Sample 2012Uploaded byxyza304gmailcom
- Understanding CalculusUploaded byFawaz Mohammed Al-Jubori
- Kim's Plan Ppt [Autosaved]Uploaded bykimberly lucanas
- nc-cap35[1]Uploaded byMelanie Sanchez
- MATLAB1.pdfUploaded byMatthew Sullivan
- integration calc3Uploaded byGhassen Rojbi
- CalcII_Complete.pdfUploaded bytasos_rex3139
- dm-recurrences.pdfUploaded bymanny oluan
- Academic Landscape DetailUploaded byabnu98
- A note on Smarandache number related trianglesUploaded byDon Hass

- KrasnovUploaded bysmashthecommienwo
- was stalin a jUploaded bysmashthecommienwo
- Lecture HW 05 Linear Least SquaresUploaded bysmashthecommienwo
- Lecture HW 04 RootsUploaded bysmashthecommienwo
- KrasnovUploaded bysmashthecommienwo
- InfoUploaded bysmashthecommienwo
- Advanced ADAMS/View Training GuideUploaded byliphaell
- Russian NazismUploaded bysmashthecommienwo

- Mazin ThesisUploaded byAndrew Jaffe
- PMI-PBA-Exam-Preparation1.pdfUploaded byhatimalhaj
- dyn1.pdfUploaded bymadhur_time17
- AlchemyUploaded byJaime Pascual Sempere
- 2012 MSc Thesis Bikky Kumar.pdfUploaded byFarida Nur Aziza
- Angelic LanguageUploaded byusmarel
- Layout DesignUploaded bydharma_panga8217
- Optimisation of thermal processing—a review.pdfUploaded byAfini Exo K
- AI_and_Law-Achievements_and_failures.pdfUploaded byHai Dai Gia
- Chemdur 54Uploaded byghazanfar
- keyestudio+advanced+study+kit+for+Arduino+Uploaded byLavicrep Jeffrey Henwood
- Caterpillar r1600g LhdUploaded byCarlos Abel Conza Lopez
- Hydraulic Seal Identification ChartUploaded byAnonymous K6mLK72Aa
- Preparation and Properties of Natural Rubber Composites Reinforced With Pretreated Carbon NanotubesUploaded byAmir Aziz
- Hydraulic AccumulatorUploaded byAnonymous pC7MGO
- Daftar Isi eBook Farmasi IndustriUploaded byitung23
- V F DUploaded bychethan
- ReserveUploaded byMohd Zulhafizi
- Problemi propostiUploaded byDavide Zuccarini
- pornografia internet.pdfUploaded byFîlî Björn
- 01 de Thi Thu Dh 2014 Tieng Anh de 01Uploaded byDương Anh Bùi
- Star StudiesUploaded byfedericovitella
- LAND USE CHANGE AND PERCEPTION MAPPING ON THE DYNAMICS OF LIVELIHOODS IN THE SATELLITE TOWN, SRIPERUMBUDUR, CHENNAIUploaded byImpact Journals
- Evolution from quality management to an integrative management system based on TQM and its impact on the profession of quality managers in industryUploaded bytasinasi
- Pseudo Sonic ArticleUploaded byjose_regueiro_4
- plotting_workflow.pdfUploaded bymarian07k
- AutoPlugUploaded byakozy
- ISTQBTRANUploaded byAndreiBorsete
- MF-VI-IG-78-9001_PRELIMINARY OPERATION and MAINTENANCE MANUAL Combined Pressure , Humidity and Tepmprature TransmitterUploaded bySyed Zakir
- l-f-sUploaded byDonika Markande