TO:JosephM.Powers FROM: Kevin R. O Neill DATE: 31 March 1999 RE: ME 334 Project: Part II 1 Problem Statement The city of South B wants to create a timing system for the traffic lights on Michigan Street at the intersections of Angela Street and North Shore Drive. The city has requested that the chosen timing system meet the following design goals: maximize the average southbound flux of automobiles on Michigan Street, keep the speed of an individual automobile below the posted speed limit, allow east-west traffic flow at least one minute for every three minutes of north-south flow, never allow a light to remain red for over two minutes. With these constaints, the maximum time that the light on Michigan Street can remain green is 2 min., which must be followed by a red light for 40 s. This timing sequence will thus serve as an initial proposition. In order to test this proposition on traffic responses, the traffic flow is modeled as fluid flow so that governing fluid equations may be analogously utilized. 2 Analysis It has been shown by Lighthill and Whitham 1, Whitham 2, and LeVeque 3 that traffic flow is closely described by ρ t + x (ρu) =ν 2 ρ x, 2 where ρ is the vehicle density (vehicles/mile), u is the vehicle velocity, and ν is a vehicle diffusivity (mile 2 /hr). This equation is analogous to the mass conservation equation of fluid mechanics. Furthermore, it is known that u is a function of ρ, estimated by LeVeque according to u(ρ) =u max (1 ρ/ρ max ), 1 Lighthill, M. J. and Whitham, G. B., 1955, Proceedings of the Royal Society of London, Series A, Vol. 229, pp. 317-345. 2 Whitham, G. B., 1974, Linear and Nonlinear Waves, John Wiley: New York. 3 LeVeque, R. J., 1992, Numerical Methods for Conservation Laws, Birkhäuser: Basel. 1
where u max and ρ max are the maximum vehicle velocity and vehicle density, respectively. This equation predicts that when the density is maximum the velocity is zero, and when the density is zero the velocity reaches a maximum. However, it is known from experience that vehicles travel at the maximum speed limit at densities greater than zero. Therefore, the equation relating vehicle speed to density was improvised to account for this fact. In order to approximate the density at which the maximum velocity is reached, a safe following distance, d, between each car at any velocity was first estimated by d =(2s)( hr. 3600s )(umi. hr. ), which is known as the the two second rule. Using the maximum speed on Michigan Street, 30 mph, this distance was found to be 88 ft. With each car traveling at the maximum speed and following at this distance, the vehicle density is found to be approximately 50 vehicles/mile, where the average car length was taken to be 20 ft. Thus, the relation of vehicle speed to density was taken to be u(ρ) =u max (1 (ρ 50)/(ρ max 50)), for vehicle densities greater than fifty, and was taken to be the maximum speed for densities less than fifty. The value of ρ max was taken to be 225 vpm, according to Whitham. In addition, ν was estimated as 0.01 miles 2 /hr. The physical meaning of this viscous term can be thought of as a measure of the response time of each driver and car. In order to apply the mass conservation equation to the discrete system of vehicle traffic, the equation was discretized using an explicit second order central differencing technique. The resulting equation is ρ n+1 i = ρ n i t 2 x (qn i+1 qn i 1 )+ν t x 2 (ρn i+1 2ρn i + ρn i 1 ), where qi n = ρ n i u(ρn i ) is the vehicle concentration (vehicles/hour), and x and t are the chosen step sizes of the position x and the time t. Then, given an initial density distribution ρ 1 1,ρ1 2,..., ρ1 i, a computer code can be generated to numerically approximate the resulting densities using this discretized equation. An example of such a code is shown in the MATLAB program of Appix A, where x and t were taken to be 20 ft. and 0.1 s, respectively. This code was used to produce all of the following plots. A map of the intersections of interest is shown in Figure 1, where a position axis is defined as a reference for the following plots. The distance between the two intersections was measured using a vehicle odometer. In order to create a model for these two intersections, the amount of traffic backed up at each traffic light must be determined. As previously mentioned, the free-flowing traffic density was found to be approximately 50 vehicles/mile and the maximum speed is 30 mph. Thus, the vehicle flux, q = ρu, for such a traffic flow was found to be 1500 vehicles/hour. Using this fact along with the proposed timing scheme of having each light remain red for 40 s, it was estimated that approximately 20 cars would be stopped at each intersection prior to the light turning green. This estimation was made by considering the number of cars that would have passed through the intersection had 2
North Shore Angela N E S W 0.0 0.2 0.6 2.0 (miles) Figure 1: This is a map of the intersections of interest, along with a reference position axis. the light been green, and was increased slightly from that figure to account for traffic that continues to build up at the of the slug. Therefore, using an average car length of 20 ft. as before, traffic would be backed up about 0.1 miles at each intersection before the light turned green. It is first useful to consider an initial distribution of cars backed up 0.1 miles behind a single traffic light before it turns green. The resulting density distribution for three different times is shown in Figure 2(a), and the resulting velocity distribution is shown in Figure 2(b). Notice that it takes approximately one minute for the entire slug of traffic 250 200 (a) 0 minutes 3 minutes 34 32 30 (b) 3 minutes 28 Density (vpm) 150 100 Speed (mph) 26 24 22 20 50 18 16 0 14 Figure 2: These plots show the depence of density (a) and speed (b) on the position for three specified times after an initial slug of traffic is given a green light. to make it through the intersection. Also, it takes over two minutes for the slug to make it past where the second intersection would be located. It can therefore be concluded that with the given constraints and with the given traffic conditions (typical of a busy workday morning), it is not possible for all the cars to make it through both intersections. Next, the second intersection is introduced with an intitial density distribution equivalent to the first intersection. This situation was then modeled using the discretized mass conservation equation. The resulting density and velocity distributions at two different times are shown in Figure 3(a) and (b), respectively. In this example, the lights were synchronized to turn green 3
250 (a) 0 minutes 34 32 (b) 200 30 28 Density (vpm) 150 100 Speed (mph) 26 24 22 20 50 18 16 0 14 Figure 3: These plots show the depence of density (a) and speed (b) on the position for three specified times after the initial slugs of traffic are given green lights at the same time. at the same time. Notice that both slugs make it through their respective intersections after about, but that some of the cars from the slug at the intersection of Michigan and Angela do not make it through the intersection at Michigan and North Shore. The number of cars from the intitial 20 that did not make it can be estimated by the area under the density distribution plot to the left of the second traffic light at 0.6 miles, and was found to be about 11 cars. Because it is desirable to maximize the number of cars that make it through both intersections, a staggerred timing system for the two traffic lights was tested, but it was found that such a staggered system did not improve the overall vehicle flux. In fact, if the lights are staggered too much, the flux will actually decrease. This is evident by comparing the density distribution for a 30 s staggered setting given in Figure 4(a) with that of Figure 4(a). The number of cars that do not make it through the intersection with the staggered setting increases from 11 to about 15. Note that the referred times correspond to those after the light at the intersection of North Shore and Michigan is turned green, so that the time the light at the intersection of Angela and Michigan is 30 s less than these times. Also, Figure 4(b) shows the effect of the staggered system on the velocity distribution. In addition to the noted negative effects on southbound vehicle flux, such a staggered system would have even greater negative effects on northbound vehicle flux because the staggering would be, in a sense, reversed. 3 Recommation It is reccommed that the traffic lights at the intersections of Michigan Street with Angela Street and North Shore Drive be synchonized. They should be set to remain green for two minutes on Michigan Street, followed by 40 s of red. This design would maximize the southbound flux of traffic on Michigan Street while allowing east-west traffic one minute of 4
250 (a) 0 minutes 34 32 (b) 200 30 28 Density (vpm) 150 100 Speed (mph) 26 24 22 20 50 18 16 0 14 Figure 4: These plots show the depence of density (a) and speed (b) on the position for three specified times when the slugs of traffic are given green lights at 30 s staggered times. flow for every three minutes of north-south flow, preventing any light from remaining red for over two minutes, and keeping the speed of each individual vehicle below the speed limit. With the existing timing pattern of the traffic lights at the intersection of Angela and Michigan, it is estimated that 20 cars will make it through the intersection for a single green light period. 5
Appix A: MATLAB Program % ------------------------------------------------------------------------------ % Traffic Modeling Program % ------------------------------------------------------------------------------ clear p clear u % Define initial parameters. p_max = 225; u_max = 30; % vehicles per mile % miles per hour del_x = 2/528; del_t =.1/3600; % miles (=20ft.) % hours (=.1s) v = 0.01; % miles^2 per hour n_max = 180/(del_t*3600)+1; i_max = 529; % distance integer % time integer x=[0:del_x:(i_max-1)*del_x]; % Define initial density distribution. backup =.1; % miles; how far cars are backed up k1=(.2-backup)/2; k2=(.6-backup)/2; for i=[1:1:round((i_max-1)*k1)] p(1,i) = 0; for i=[round((i_max-1)*k1)+1:1:round((i_max-1)/10)] p(1,i) = p_max; for i=[round((i_max-1)/10)+1:1:round((i_max-1)*k2)] p(1,i) = 0; for i=[round((i_max-1)*k2)+1:1:round(3*(i_max-1)/10)] p(1,i) = p_max; for i=[round(3*(i_max-1)/10)+1:1:i_max] p(1,i) = 0; % Set the density at each " point." for n=[1:1:n_max] p(n,1) = p(1,1); p(n,i_max) = p(1,i_max); % Evaluate each density value in array. The first for loop block can be ommitted % when considering either a single slug or two synchronized slugs. It is included % here to calculate the effects of staggering the traffic lights. for n=[1:1:(n_max-1)/6] 6
for i=[2:1:round((i_max-1)*k2)] p(n+1,i)=p(1,i); for i=[round((i_max-1)*k2)+1:1:(i_max-1)] del_q = p(n,i+1)*u_max*(1-p(n,i+1)/p_max)-p(n,i-1)*u_max*(1-p(n,i-1)/p_max); visc = p(n,i+1)-2*p(n,i)+p(n,i-1); p(n+1,i)=p(n,i)-(del_t/(2*del_x))*del_q+((v*del_t)/(del_x^2))*visc; for n=[(n_max-1)/6+1:1:n_max-1] for i=[2:1:(i_max-1)] del_q = p(n,i+1)*u_max*(1-p(n,i+1)/p_max)-p(n,i-1)*u_max*(1-p(n,i-1)/p_max); visc = p(n,i+1)-2*p(n,i)+p(n,i-1); p(n+1,i)=p(n,i)-(del_t/(2*del_x))*del_q+((v*del_t)/(del_x^2))*visc; % Plot the density at specified times. Output files can be changed. figure(1) plot(x,p(1,:),x,p(60/(3600*del_t)+1,:), :,x,p(120/(3600*del_t)+1,:), -- ) leg( 0 minutes,, ) axis([0 2 0 250]) xlabel( ) ylabel( Density (vpm) ) print stag_den.ps % Calculate velocities. for n=[1:1:n_max] for i=[1:1:i_max] if p(n,i) >= 50 u(n,i)=u_max*(1-(p(n,i)-50)/(p_max-50)); else u(n,i)=30; % Plot velocity distribution at various times. Output file can be changed. figure(2) plot(x,u(60/(3600*del_t)+1,:), :,x,u(120/(3600*del_t)+1,:), -- ) leg(, ) axis([0 2 13 35]) title( (b) ) xlabel( ) ylabel( Speed (mph) ) print stag_vel.ps 7