联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp

您当前位置:首页 >> Matlab编程Matlab编程

日期:2018-12-02 10:27

UNIVERSITY OF TORONTO

FACULTY OF APPLIED SCIENCE & ENGINEERING

First Year Program – Core 8 and TrackOne

FIRST YEAR PROGRAM

ENGINEERING PROBLEM SOLVING LABS

MAT188: Laboratory #12

Final Project

0 1 2 3 4 5 6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

1.2

Time (s)

ECG recording

Engineering Problem Solving Labs MAT188: Lab #12 Final Project

Faculty of Applied Science & Engineering 2 University of Toronto

FINAL PROJECT

Engineering Problem Solving Using MATLAB

In this series of labs you have gained a strong introduction to MATLAB and how it can be used to

understand situations and solve problems. You have been introduced to many fundamental functions

and commands and these have been summarized in the MATLAB Summary.

The purpose of this final project is to review the material presented in the past MATLAB labs and

exercises and use your engineering problem solving skills to better understand a real-life scenario.

Through this project you will work with on a real-life situation and create a script that will perform

simple analysis or computation so that you can draw conclusions from your analysis. Although the

suggested examples are chosen to be reasonably straightforward, they demonstrate how engineers

face real-world problems and how they use numeric and symbolic computation to help them reach

solutions.

For this final lab, select ONE PROJECT that is most interesting to you and work towards

finding a solution to the problem. Each project must have the following components:

1) Clearly Defined Problem Statement: Each project must have a clear problem statement,

which needs to be solved. This doesn’t mean that the problem is such that there is only one

“right” answer.

2) Real-World Scenario (Mathematical Model): Each project must be based on a real-world

situation, which includes a mathematical model that represents the situation using

fundamental scientific principles.

3) Design Parameter: At least one “design” or decision parameter must be included in the

problem, such that either the use of for loops and/or conditional statements (e.g., if-elseifelse-end)

are a required part of the analysis.

4) Deliverables: The submission for each project must include:

a) Script: You will need to create an m-file that generates all the plots and carries out your

analysis. It should include every calculation that you do and should include comments

throughout your script describing what variables and functions you are using and why.

b) Plots: You will need to create at least one two-dimensional plot for your project. Some

projects may require multiple plots or three-dimensional plots as well. Plots must be

properly labeled (axis and title) and include legend.

c) Concluding Statement: You will write a short paragraph that summarizes your analysis

and what your suggestion is for a “solution” to the problem.

d) A Description of your Engineering Problem Solving Process: You will also submit short

descriptions of how you have addressed each of the four key aspects of Pólya’s Problem

Solving Process that we have discussed in this course (see details below).

Preparation (Required to do before you come to the Lab session)

1. Read through this lab document and the suggested problems below.

2. Choose one of the six suggested problems.

Engineering Problem Solving Labs MAT188: Lab #12 Final Project

Faculty of Applied Science & Engineering 3 University of Toronto

George Pólya’s Problem Solving Process

Understanding the Problem

What is the unknown? (GOAL)

What relevant information is provided? (KNOWNS)

What is the condition? What fundamental principles are related? (FOUNDATION)

Draw a diagram. (VISUALIZATION)

Devising a Plan

Consider the unknown. What are the possible connections between the information

provided and the unknown.

Can the problem be restated in a more useful manner?

Do you know a related problem? Can you use its answer or its method?

Carrying Out the Plan

Check each step as you carry out the plan. Is it leading you in the right direction?

Looking Back

Can you check the result? How about the solution?

Is the answer complete? Have you solved the problem asked?

Submission for Final Project

You have ONE WEEK (7 DAYS) to complete this assignment, from the date of your lab. As part of this

lab, you must submit, your brief descriptions of:

1) Step 1: Understanding the Problem: What is your goal? What relevant information have you

been given? What are the fundamental scientific and/or mathematical concepts that you will

have to use to solve this problem? Include a simple hand-sketched diagram if it would be

helpful.

2) Step 2: Devising a Plan: Without writing or including in your submission ANY MATLAB

code, write out your step-by-step process that you plan on using in order to address this

problem. This might include:

a. The plot or plots you will generate to support your assessment and solution. What do

the x and y (or x, y, and z) axes represent?

b. The “algorithm”, or step-by-step process you will use in your MATLAB script. This

should be written in plain English, no need to use proper or exact MATLAB syntax. If

appropriate, include a graphical interpretation (flowchart) for your problem solving

process. Please also include any decisions/assumptions that you have made

3) Step 3: Carrying Out Your Plan: What did you do? How did you use MATLAB to solve the

problem? This should include:

a. The final version of your MATLAB script,

b. Any relevant plot or plots that you created to support your assessment, and

c. A brief description of ways in which you had to adapt your plan from that which you

originally envisioned in Step 2 above.

4) Step 4: Looking Back: How do you know that you have adequately addressed the problem?

How are you sure that you have achieved your goal? Is there anything you have learned

about the fundamental scientific and mathematical concepts and/or how to use MATLAB for

engineering problem solving? Make sure to include a short Concluding Statement that

summarizes your analysis and what your suggestion is for a “solution” to the problem.

Engineering Problem Solving Labs MAT188: Lab #12 Final Project

Faculty of Applied Science & Engineering 4 University of Toronto

SUBMISSION GUIDELINES

Please submit a single PDF file of maximum 4 pages of text, PLUS your MATLAB files (script,

plot, etc.) -- be clear and concise with your writing.

Your MATLAB script should run without any adjustments by the user (i.e., the TA). Make sure you

test and run your code before submission. Each student works must have an independent

submission.

Engineering Problem Solving Labs MAT188: Lab #12 Final Project

Faculty of Applied Science & Engineering 5 University of Toronto

Engineering Problem #1: Analysis of an Annotated ECG Signal

Background

Electrocardiography (ECG) is the process of recording the electrical activity of the heart over a

period of time using electrodes placed on a patient's body. ECG can help the physician in

primary diagnosis of different abnormalities in the electrical activity of the heart (arrhythmia). A

typical ECG tracing is a repeating cycle of three electrical entities: a P-wave, a QRS complex

and a T-wave (see Fig.1).

Fig 1. Representation of a normal heartbeat of the human1

.

Heart beat (rate) measurement is one of the simplest analyses of the heart activity. A heart rate

between 60 and 100 beats per minute is considered normal. A heart rate slower than 60 beats per

minute is said to be bradycardic and a rate faster than 100 beats per minute is said to

be tachycardia.

Problem Statement

Consider the ECG signals for three patients that have been posted on the course website. These

files, ecg1.mat, ecg2.mat, and ecg3.mat contain three columns: time (in seconds), signal voltage

(mV), and a marker code. This marker is an annotation of each point by an expert (physician).

In this annotation: 0 represents a point with no specific feature in the ECG signal, 1 represents

the peak of a P-wave, 2 annotates the Q point, 3 represents the peak of an R-wave, 4 represents a

S point, and finally 5 represents a T-wave peak.

Analyze these signals so that you can comment on the relative cardiac health of these patients.

You may want to focus your analysis on the measures of heartrate and the average PR-interval.

You can refer to http://www.ecglibrary.com/norm.php to help you in your assessment.


1

Source: https://upload.wikimedia.org/wikipedia/commons/thumb/9/9e/SinusRhythmLabels.svg/2000pxSinusRhythmLabels.svg.png,

Accessed November 16, 2017.

Engineering Problem Solving Labs MAT188: Lab #12 Final Project

Faculty of Applied Science & Engineering 6 University of Toronto

Engineering Problem #2: Electric Cars

Background

Electric cars, and plug-in hybrid-electric cars, are becoming more mainstream; the sales of cars

like Tesla’s Model 3, Nissan Leaf, Chevrolet Bolt, and other 2018 models have generally

increased over the past few years, and are projected to grow over the next decade as well.

This case study focuses on the economics of these vehicles as a mode of commuter

transportation for those who travel to/from the University of Toronto (return-trip).

Please select vehicles from the list here: https://insideevs.com/compare-plug-ins/

It may be necessary to perform additional research (other than the website listed above).

Problem Statement

It is possible to determine the before-tax cost, in CAD, for the base model (“lowest cost

model”) for each of the four vehicles you’ve selected.

It is possible to use the estimated range of each of these vehicles, as determined by the

2018 Fuel Consumption Guide (NRCAN.gc.ca), in litres/100km.

Use the fuel cost of $105.9 cents/litre for any fuel calculations, if necessary, and variable

electricity cost for a 24-hour period beginning 11/26/2018 at 12:00am and ending

11:59pm. Assume a 9am-6pm school day.

Ignore any maintenance and/or licensing costs; only consider the principal cost of the

vehicle and any fuel costs as appropriate.

The Questions

Determine the top three most economical vehicles for commuting to/from the Myhal Centre

Garage from 10 different points within a 50km radius of UofT. Account for fuel/electricity

costs, traffic at 9am and 6pm to the points you select, average maintenance costs, and so on.

Which vehicle is the most economical overall? Why?

Which vehicle is most economical at each 10km radius away from Toronto? What

impact, if any, does average traffic have on this? How would you use Matlab as a software tool to help maximize your fuel savings?

How does this compare to existing transit infrastructure (or walking or biking)? What are

other concerns to take into consideration?

Engineering Problem Solving Labs MAT188: Lab #12 Final Project

Faculty of Applied Science & Engineering 7 University of Toronto

Engineering Problem #3: Soil Temperature Modeling2

Background

In the construction of new urban systems, one of the

important considerations is the depth at which water pipes

must be buried in order to ensure they do not freeze. It is

possible to model this situation by considering how the

temperature within the soil at a depth relates to the

surface temperature,

, and the initial soil temperature,

,

over time(in seconds). It has been found that this can be

approximately represented by the equation:



Here, refers to a famous (and very useful) function in mathematics call the Gauss Error

Function, or simply the error function. It has the integral form shown above. The parameter 

represents the thermal diffusivity of the soil.

Problem Statement

Prepare a report that summarizes how the soil temperature within Toronto would change with time

and depth over the course of a six-month period (December 1 – May 31). Most of the soil in

Toronto can be characterized as clay, and typically the initial soil temperature for all depths at the

start of December is = 14℃. You have been asked to consider the following specific cases:

a) Demonstrate how the temperature changes with time at a 0.75 m depth over the course of

the first 31 days (use increments of 1 day).

b) Show how the temperature changes with time (using 1 day increments) over the six-month

period for the range of depths of 0.05 m to 5 m.

c) Determine:

a. How deep the water lines need to be buried to ensure that the temperature does not

drop below 5℃.

b. How deep the water lines need to be buried in order for the surrounding soil

temperature to change by less than 1% of the initial soil temperature (i.e., 14℃).


2 Adapted from A. Gilat and V. Subramaniam, Numerical Methods for Engineers and Scientists, John Wiley & Sons,

2008, P7.27, pg. 306.

Surface Temperature

Initial Soil Temperature

Engineering Problem Solving Labs MAT188: Lab #12 Final Project

Faculty of Applied Science & Engineering 8 University of Toronto

Engineering Problem #4: Atmospheric Absorption of Electromagnetic Radiation

Background3

The way in which the electromagnetic radiation interacts

with the Earth’s atmosphere is an important aspect of many

engineering and scientific innovations and discoveries.

Satellite communications, radio astronomy, remote

sensing4

, solar energy, and understanding the process of

climate change all depend on our ability to describe how

electromagnetic waves, from radio to light, are transmitted

and absorbed by various layers of the Earth’s atmosphere.

For example, consider how UV, Visible, and Infrared

radiation (IR) are absorbed by the various constituents of

the Earth’s atmosphere (Figure 1). In particular, you can

see that carbon dioxide molecules have three regions of

absorption in the IR spectrum. They way in which the

molecule absorbs the energy contained in the IR photon, is

that it transfers this energy into kinetic energy through

vibrational motion5

. Much like a person pushing someone

on a swing, if the energy in the IR photon “pushes” the

oxygen and carbon atoms according to their natural rhythm then the movement of these atoms can

grow and be sustained. However, if the energy is associated with a different frequency of “pushing”

then the impulse is out of sync with the vibrational movement of the atoms and thus the energy of the

photon is not absorbed or converted into kinetic or another form of energy. This natural rhythm or

movement of CO2 depends on the atomic structure of that molecule.6

Specifically, if one looks carefully at the molecular structure of CO2 it is

possible to determine that the absorption peak occurs at  = 4.3 μm is

due to the translational movement of the atoms along the axis of the

molecule. As a result, this allows us to approximate, or model the CO2

molecule as a three masses connected by two springs (Figure 2). Through

an analysis of the dynamics of this situation using the fundamental laws

of physics, one can derive the following relationships between the

masses, the spring constant , the frequency of vibration = 2, and

the amplitudes of translation or movement along the axis for each atom,

1

,2

, and 3

:


3 Downloaded from https://en.wikipedia.org/wiki/Absorption_band, used through Creative Commons license: CC BY-SA 3.0,

https://commons.wikimedia.org/w/index.php?curid=2623190

4 https://www.earthobservatory.nasa.gov/Features/RemoteSensing/remote_04.php

5 Recall that this energy is described by =

=, where f is the frequency in Hertz.

6 Taken from A. Gilat and V. Subramaniam, Numerical Methods for Engineers and Scientists, John Wiley & Sons, 2008, pg. 172.

Figure 1: Radiation Transmitted by the Atmosphere3

Figure 2: Spring/Mass Model of the

CO2 Molecule6

Engineering Problem Solving Labs MAT188: Lab #12 Final Project

Faculty of Applied Science & Engineering 9 University of Toronto

Problem Statement

Complete the spring/mass mathematical model of the CO2 molecule by using MATLAB to

determine the correct spring constant, so that the model properly predicts the absorption at

?? = 4.3 μm. Use the model to understand how the atoms in the CO2 molecules move when it

interacts with a photon that has a wavelength of = 4.3 μm. You should consider the problem

from the following perspective:

a) Observe that this can be considered to be an eigenvalue problem. Rewrite this system in

an eigenvalue format, i.e., is the eigenvalue vector rather than , since

in this problem represents the photon wavelength).

b) What are the eigenvalues and eigenvectors of this system? Use MATLAB to visualize

how they depend on the spring constant What do they mean and what conclusions can

you draw from them? Hint: Not all of the eigenvalues may be relevant to the actual

situation. For example, some may lead to complex results for the associated wavelength.

We suggest you only focus on the two eigenvalue – eigenvector pairs that lead to realvalued

results.

c) Knowing that measurements have shown that CO2 molecules demonstrate an absorption

at = 4.3 μm, what would be the correct value of the spring constant, for this model.

d) Briefly describe the limitations of this model. Why doesn’t it predict the clear absorption

around = 15 μm?

Engineering Problem Solving Labs MAT188: Lab #12 Final Project

Faculty of Applied Science & Engineering 10 University of Toronto

Engineering Problem #5: Saturn V Rocket Launch Analysis

Background

This problem involves using the ideal rocket equation to model the speed of the Saturn V rocket

throughout its takeoff and burn time. Rockets are propelled by the ejection of fuel from the aft of

the rocket, where Newton’s third law dictates that a forward force will act upon the rocket because

of this ejected mass. For a typical rocket, the fuel may make up approximately 90% of the total

mass of the rocket, thus it is important to consider the changing mass of the rocket as it accelerates.

Figure 1: Rocket schematic used for ideal rocket equation derivation1

.

To derive the ideal rocket equation, we note that the momentum of the rocket,  will increase

due to its decreasing mass,increasing speed, and the conservation of the fuel ejected

in the opposite direction, an infinitesimal change in a rocket’s momentum can therefore be given

by:

is the mass of the rocket,is some small mass ejected from the rocket, and 

is the

velocity of the ejected mass. We have ignored the very small term, (i.e., very small squared

equals very very very small, relative to the other larger terms). From Newton’s second law, we

know that the total impulse, ∑, must equal the change in momentum for our rocket, Δ.

Where for simplicity we will consider only the force of gravity acting at an angle of = 0, which

makes sense for the trajectory of a rocket . We therefore arrive at:.

Engineering Problem Solving Labs MAT188: Lab #12 Final Project

Faculty of Applied Science & Engineering 11 University of Toronto

Where we have made use of the fact that

. Integrating the above result gives us the

ideal rocket equation,

Where we have introduced the specific impulse , which is a common measure of the efficiency

of a rocket engine. The last equation gives the speed of the rocket in meters per second (m/s), it

is the one we will use throughout this analysis.

Problem Statement

You are asked to address three key issues with this situation by using the detailed information

below:

a) Use appropriate plots to visualize how the position, velocity and acceleration of the rocket

change with time.

b) Estimate the final velocity of the Saturn V rocket once all its fuel is used.

c) Determine if the rocket achieves the exit velocity required to leave the Earth’s orbit.

The Saturn V rocket consists of three stages. It is reasonable to assume that each stage fires

continuously, each stage lasts as long as its burn time, and the time taken between stages is

negligible. It is also known that the rocket doesn’t start leaving the launch tower until 6.5 s into

the Stage 1 burn time, i.e., ?(?? = 6.5 s) = 0. Some relevant parameters for each stage of the

Saturn V rocket are summarized in Table 1 below.

Table 1. Selected Saturn V rocket parameters2

Component Specific Impulse [s] Gross Mass [kg] Remaining Mass

[kg]

Burn Time [s]

1 263 2,290,000 130,000 165

2 421 496,200 40,100 360

3 421 123,000 13,500 500

Since fuel is consumed as the rocket fires, the mass of the rocket will decrease. Thus, we must

describe the variable as a function of time. It is reasonable to assume that the fuel is

consumed linearly, meaning


Engineering Problem Solving Labs MAT188: Lab #12 Final Project

Faculty of Applied Science & Engineering 12 University of Toronto

Engineering Problem #6: Robot Movement and Control

Background

In this project, we will be considering the movement (and control) of a robotic vehicle moving around

a 2D space. For instance, you can think of an autonomous vacuum cleaner moving around a room.

Here is the crux of the problem: in order to understand its working, and ultimately optimize its

performance, we would like to know a path that the robotic vehicle took during a certain interval of

time. However, any automated vehicle will only save its position (or share it with the central computer)

at regular time intervals. Of course, those intervals may be short, but we still only have access to

finitely many data points. From those points we want to reconstruct, as well as possible, the entire

motion of the vehicle7

.

Problem Statement

Consider the data saved in the posted robpos.mat data file. This file contains a matrix with 61 rows

and 3 columns, with positions of the robot measured every 1 second during an interval of 1 minute.

In each row, the first column represents the timestamp of the measurements (in seconds), the second

column represents the robot’s ??-coordinate in meters at the corresponding time, and the third column

represents its ??-coordinate in meters.

You are asked to:

a) Use this raw data to visualize a piecewise linear approximation of the position of this robot as it

moves through this 2D space, i.e., plot versus . Determine the values of the robot’s

velocity and acceleration from this raw data by considering this approach:

If the vehicle’s position at time is given by, an approximation of its speed at

time seconds, = 0,1, … ,59, is

2 = √

2,

and an approximation of its acceleration at time = 1,2, … ,59, is

1).

This is because the time increment is one second, i.e., ??? = 1s.

b) Use polynomial curve fitting techniques to create a smoother picture of how the robot has

moved through this 2D space and how its velocity and acceleration behave. Explain how this

approximate model compares to the original data. Remember that if you know how the velocity

and acceleration behave with respect to the and directions, then the total speed and

acceleration is given as the square root of the sum of the squares, i.e.,

c) Path control: You have now been asked to be part of a team that has to create a control

system that keeps the robot on a circular path. This path starts and ends at = (0,0),

has a diameter of 2.4 m, and takes 1 minute to complete one revolution. In order for your

team to know which signals to send to the motors that are controlling the movement in the

and directions, you have been asked to determine the velocity and acceleration values in

each direction that would be required for this kind of movement over one revolution.


7 As an interesting (and, perhaps, motivational) side note: problem of reconstruction of an object trajectory is a very

“real” and difficult problem in engineering and applied mathematics. This story was not invented purely for

educational purposes of learning Matlab. In fact, the author of this project, Melkior Ornik a former ECE PhD is

currently working on research in a particular setting of this problem, and the method outlined near the end of this

project is an actual strategy for reconstruction proposed by his colleagues in at least one publication.


版权所有:编程辅导网 2021 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp