Assignment 1: Matlab and Basic Computations

CEE 3604: Introduction to Transportation Engineering
Fall 2011
Assignment 1: Matlab and Basic Computations
Date Due: August 31, 2011
Instructor: Trani
Problem 1
One of the basic problems in transportation engineering is determining the performance of vehicles traveling between two points.
The flight profiles of three domestic flights in the United States are provided as text files in this assignment. A sample file is
shown in Figure 1 for a flight between Dallas and New York.
Figure 1. Sample flight profile from Dallas, Texas to New York (Kennedy) airports. Source: www.flightaware.com.
a)
Import the data (all three flights) using Matlab’s import wizard or sing the Matlab “load” command.
b)
Create a new Matlab script to do the following:
b.1) Create five vectors and label them: time, latitude, longitude, speed and altitude (all 5 columns of the file). These
five vectors contain the column data in each file.
b.2) Plot time traveled (in x-axis) vs speed (y-axis). Label axes as needed (include units) and change default font sizes
to size 16 for both x and y labels. Change the color of the line to solid blue. Comment on the shape of the profile
observed.
b.5) Plot time traveled (in x-axis) vs altitude (y-axis). Label axes and change default font sizes to size 16 for both x and
y labels. Change the color of the line to red. Comment on the shape of the profile observed.
c)
Estimate the average speed (in knots or nautical miles per hour) for each of the flight profiles. If people travel to an
airport two hours before the flight and it takes an average of one hour to travel to and from the airports to the origin and
destination of the traveler (once outside the airport), what is the total “door-to-door” travel time for all three journeys.
How does these travel times compare with auto travel if the average auto speed on a highway is 62 mph (accounting
for stops)? Comment.
d)
Do you find any relationship between distance traveled and travel time? Estimate a simple regression model with the
data available.
CEE 3604 A1
Trani
Page 1 of 4
_____________________________________________
Problem 2
Two cars follow each other in a test highway that includes some stop signs. The lead car has a real driver, the following car has a
computer performing the duties of a driver. The experiment attempts to measure how good the control logic in the following car
follows the lead car without creating a collision. The speed and distance traveled profiles for the two cars participating this
experiment are shown in the data below. The data was collected using a standard GPS auto logger system. The cars are called
“lead car” and “following car”. Speeds are in m/s and distances measured in meters from a datum point. Note that at the start of
the experiment the lead car is 50 meters ahead of the following car (a negative distance for the following car means a distance
behind the lead car).
a) Import the data into Matlab using the import wizard or using the “load” command.
b) Create a Matlab script to plot the distance traveled by both cars as a function of time (plot time in the x-axis). Label your
axes and place a descriptive title for this plot.
c) Plot the speeds of both cars in miles per hour (in y-axis) vs time (x- axis). Label the axes and add a title. Change the line
color to blue and line width 2.
d) Calculate the distance between the two cars at each point in time. Plot the distance as a function of time. Label
accordingly.
e) Find the average distance between the two cars during the experiment.
f) Find the number of seconds the lead car spends at a red traffic light.
Problem 3
Data has been collected in the German Autobahn using new speed sensors. A file called autobahn.m contains samples of vehicle
speed and highway density data for this problem. Traffic density and speed are two key variables of interest to transportation
engineers to study the level of service offered by highway. The file contains information similar to that shown below
CEE 3604 A1
Trani
Page 2 of 4
Create a Matlab script to:
a) Load the highway data.
b) Use Matlab to plot the values of traffic density (x-axis) vs speed (y-axis). Comment of the trend observed. Label the axes in
the plot and use a green marker “^” to indicate each data point in your plot.
c) Using the “Basic Fitting” capabilities in Matlab (look at the “Tools” pull down menu in your plot), fit a first degree polynomial to
the data. Indicate the equation of the polynomial and comment on how well the polynomial fits the data.
c) One busy day, traffic cameras record an average of 35 vehicles per kilometer. Estimate the range of speeds possible with
such density value.
d) If highway “volume” is measured as the product of density and speed, improve your script to estimate the volume of traffic
for every data point of speed-density recorded.
e) Plot the traffic volume vs. speed (in x-axis). Do you notice any trend? Comment.
Problem 4
An empirical formula to estimate the fuel used by a Boeing 757-200 flying in domestic routes in the United States is given by:
Fuel = 2450 + 6.75D flown
where:
Fuel is the fuel used in kilograms.
D flown is the distance flown in nautical miles (one nautical mile is 1.15 statute miles)
a) Create a Matlab function to estimate the fuel used for a given distance ( D flown )
b) Create a new Matlab script to calculate parametrically the fuel used for various distance segments ranging from 500 to
3000 nm (at steps of 50 nm).
c) Plot the solutions obtained in part (a) and label accordingly.
d) Find the fuel use for a trip from New York to Los Angeles (route distance is 2,450 nm).
CEE 3604 A1
Trani
Page 3 of 4
e) Repeat (d) for a Honolulu-San Francisco flight (2,745 nm).
f) Estimate the number of equivalent full tanks for your car if the aircraft flies from Honolulu to San Francisco. A gallon of jet
fuel is equivalent to 3.045 kilograms.
CEE 3604 A1
Trani
Page 4 of 4