65
Using Intelligent Traffic Lights to reduce vehicle emissions Adriana Szekeres Department of Computer Science University Politehnica of Bucharest Scientific coordinators: Prof. Valentin Cristea, University ”Politehnica” of Bucharest Ing. Ciprian Dobre, University ”Politehnica” of Bucharest July 2009

Adriana Szekeres

Embed Size (px)

Citation preview

Page 1: Adriana Szekeres

Using Intelligent Traffic Lights to

reduce vehicle emissions

Adriana Szekeres

Department of Computer Science

University Politehnica of Bucharest

Scientific coordinators:

Prof. Valentin Cristea, University ”Politehnica” of Bucharest

Ing. Ciprian Dobre, University ”Politehnica” of Bucharest

July 2009

Page 2: Adriana Szekeres

I would like to dedicate this thesis to my loving parents, Antonica

and Adrian, and my supportive sister, Anca ...

Page 3: Adriana Szekeres

Acknowledgements

I would like to thank Prof. Liviu Iftode, who took the time to share

his ideas and enthusiasm with all VANET team members from Uni-

versity ”Politehnica” of Bucharest. I would like to thank as well Prof.

Valentin Cristea for giving me the chance to work on this project.

Also, I would like to thank Ing. Ciprian Dobre for his guidance and

disponibility.

Page 4: Adriana Szekeres

Abstract

Cars with petrol driven internal combustion engines produce toxic

waste products that pollute the air, causing damage to our health,

animal life and the environment. Road transportation is responsible

for the emission of hydrocarbons, nitrogen dioxide, carbon monoxide,

carbon dioxide, metals and a variety of organic compounds into the

environment. Sunlight acts on some of these to produce ground level

ozone. The chemicals from the polluted air plus ozone are toxic and

each has a specific effect upon humans and the environment. They

cause respiratory diseases, irritation to the eyes, and aggravate exist-

ing breathing problems, such as asthma in children and other medical

conditions in the elderly. Carbon monoxide causes drowsiness and

poor mental alertness. Other effects can be achieved, such as acid

rain, which damages crops and trees, and erodes the buildings. Cars

are also a major source of the greenhouse gases that cause global warm-

ing.

Methods to reduce car emissions are beeing constantly researched. One

possible solution to reduce car emissions is to use Intelligent Trans-

portation Systems. Intelligent Transportation Systems (ITS), designed

to ”bring intelligence into mobility”, are systems that use communi-

cation and information processing to improve efficiency and safety in

transportation systems. The main concern of ITS is vehicle-to-vehicle

and vehicle-to-roadside communication, through wireless technologies,

and the usage of the gathered information.

This thesis is a step in implementing a system, based on the ITS,

capable of guiding the drivers to achieve reduced vehicle emissions.

Imagine a car coming across an intersection and the traffic lights’

Page 5: Adriana Szekeres

current color is green. The driver could accelerate hoping that she/he

will be able to pass or she/he could bring her/his car to a safe speed,

risking missing the green. The system developed through this thesis

will be able find the best decision to be taken in this situation, con-

cerning the car’s emissions.

Page 6: Adriana Szekeres

Contents

List of Abbreviations ix

1 Introduction 1

2 State of the Art 3

2.1 Mechanical physics . . . . . . . . . . . . . . . . . . . . . . . . . . 3

2.1.1 Basic car diagram . . . . . . . . . . . . . . . . . . . . . . . 4

2.1.2 Engine torque . . . . . . . . . . . . . . . . . . . . . . . . . 6

2.1.3 Gears and wheel torque . . . . . . . . . . . . . . . . . . . 7

2.1.4 Computing acceleration and velocity . . . . . . . . . . . . 10

2.1.5 Fourth-order Runge-Kutta . . . . . . . . . . . . . . . . . . 12

2.2 Car emissions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

2.3 Intelligent Transport Systems . . . . . . . . . . . . . . . . . . . . 16

2.4 Vehicular Ad-hoc NETworks . . . . . . . . . . . . . . . . . . . . . 18

2.5 Travolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

3 Simulation Environment - VNSim 20

3.1 VNSim System Architecture . . . . . . . . . . . . . . . . . . . . . 20

3.2 Mobility module . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

3.2.1 Maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

3.2.2 Implementation details . . . . . . . . . . . . . . . . . . . . 22

3.3 Traffic data dissemination . . . . . . . . . . . . . . . . . . . . . . 23

3.4 Fuel Consumption and Pollutant Emissions Estimation . . . . . . 24

v

Page 7: Adriana Szekeres

CONTENTS

4 Design and Implementation 28

4.1 System design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

4.2 Implementation details . . . . . . . . . . . . . . . . . . . . . . . . 30

4.2.1 The standalone application . . . . . . . . . . . . . . . . . . 30

4.2.1.1 The algorithm applied in case of green lights . . . 31

4.2.1.2 The algorithm applied in case of red lights . . . . 34

4.2.2 Integration with VNSim . . . . . . . . . . . . . . . . . . . 35

5 Experimental Results and Analysis 38

5.1 Preliminary experiments . . . . . . . . . . . . . . . . . . . . . . . 38

5.2 Experimental results of the decision algorithm - green traffic lights 42

5.3 Experimental results of the decision algorithm - red traffic lights . 47

6 Conclusions 52

References 55

vi

Page 8: Adriana Szekeres

List of Figures

2.1 Force balance on a car . . . . . . . . . . . . . . . . . . . . . . . . 4

2.2 A typical torque curve . . . . . . . . . . . . . . . . . . . . . . . . 6

2.3 Two gears with different diameters . . . . . . . . . . . . . . . . . 7

2.4 Gear ratios for a typical car . . . . . . . . . . . . . . . . . . . . . 9

2.5 Maximum velocity that can be achieved for each gear . . . . . . . 10

2.6 Typical emission rates for Volatile Organic Compounds (Hydrocar-

bons HC), carbon monoxide, nitrogen oxides and fuel consumption

as a function of average speed . . . . . . . . . . . . . . . . . . . . 15

3.1 VNSim architecture . . . . . . . . . . . . . . . . . . . . . . . . . . 21

3.2 Diffusion mechanism . . . . . . . . . . . . . . . . . . . . . . . . . 24

3.3 The values of the coefficients used in Equation 3.1 . . . . . . . . . 26

3.4 Fuel consumption for vechicles passing through an intersection . . 27

4.1 Intersection with intelligent traffic light . . . . . . . . . . . . . . . 29

4.2 UML class diagram for the standalone application . . . . . . . . . 32

4.3 UML class diagram for integration in VNSim . . . . . . . . . . . . 37

5.1 A car that accelerates from 0 km/h to 108 km/h . . . . . . . . . . 39

5.2 The emissions of a car that accelerated from 0 km/h to 108 km/h 39

5.3 A car that accelerates from 0 km/h to 54.8 km/h and then main-

tains a constant speed . . . . . . . . . . . . . . . . . . . . . . . . 40

5.4 The emissions of a car that accelerated from 0 km/h to 54.8 km/h

and than maintained a constant speed - the car traveled a given

amount of time . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

5.5 The emissions of a car that accelerated from 0 km/h to 54.8 km/h

and that maintained a constant speed - the car traveled a given

distance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

vii

Page 9: Adriana Szekeres

LIST OF FIGURES

5.6 A car traveling at a constant speed of ≈ 11 m/s, stops at the red

traffic light and then accelerates until it reaches the same speed

again . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

5.7 The gases emitted by the car described in Figure 5.6 . . . . . . . 43

5.8 A car traveling at ≈ 11 m/s accelerates in order to catch the green

light . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

5.9 The gases emitted by the car described in Figure 5.8 . . . . . . . 44

5.10 A car traveling at a constant speed of ≈ 6 m/s, stops at the red

traffic light and then accelerates until it reaches the same speed

again . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

5.11 The gases emitted by the car described in Figure 5.10 . . . . . . . 45

5.12 A car traveling at ≈ 6 m/s accelerates in order to catch the green

light . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

5.13 The gases emitted by the car described in Figure 5.12 . . . . . . . 46

5.14 A car traveling at 60 km/h (≈ 16.6 m/s) stops at the red traffic

light and then accelerates until it reaches the speed it would have

needed to avoid the red color (which lasted for 20s), if possible . . 48

5.15 The gases emitted by the car described in Figure 5.14 . . . . . . . 48

5.16 A car traveling at at 60 km/h (≈ 16.6 m/s) reduces speed to 34

km/h (≈ 9.47 m/s) in order to avoid stopping at the red light . . 49

5.17 The gases emitted by the car described in Figure 5.16 . . . . . . . 49

5.18 A car traveling at 60 km/h (≈ 16.6 m/s) stops at the red traffic

light and then accelerates until it reaches the speed it would have

needed to avoid the red color (which lasted for 40s) . . . . . . . . 50

5.19 The gases emitted by the car described in Figure 5.18 . . . . . . . 50

5.20 A car traveling at at 60 km/h (≈ 16.6 m/s) reduces speed to 15.3

km/h (≈ 4.25 m/s) in order to avoid stopping at the red light . . 51

5.21 The gases emitted by the car described in Figure 5.20 . . . . . . . 51

viii

Page 10: Adriana Szekeres

List of Abbreviations

Forces

FD drag force - determined by air friction

FT torque force

Fg force of gravity

FNf normal force of the front wheels

FNr normal force of the rear wheels

FRf rolling friction force of the front wheels

FRr rolling friction force of the rear wheels

Te torque generated by the engine

ix

Page 11: Adriana Szekeres

Introduction

This thesis presents an intelligent transportation system that aims at reducing

fuel consumption and, consequently, car emissions. The main ideea of the project

is to constantly guide the drivers through intersections with traffic lights, by

recommending optimal speeds to reduce the number of stop-starts due to red

lights and the number of vain accelerations to catch green lights. The system

uses intelligent traffic lights that constantly inform the approaching cars about the

current state of the intersections. For each road segment controlled by the traffic

light, the broadcasted message will contain the current color and the time until it

changes. The cars are equiped with radio devices that enable the communication

with the traffic light. They are also equiped with computing systems that are

able to run complex software. Being equiped with such devices, the cars form a

VANET through which they can forward the messages received from the traffic

lights to other cars that are out of the traffic light’s communication range.

The number of cars has grown exponentially since the early 1900s, when

there were only about 4,000 cars on the entire planet. Today there are about 1.1

bilion of cars and trucks on the roads world-wide. Many experts predict that, by

2030, the number of automobiles will double to 2.3 bilion. The rising number of

cars increased air pollution to a level that threatens the environment. Tons of

pollutants are emitted in the air every day. These pollutants have negative effects

on health and environment. For example, ground level ozone (O3) can be formed.

This is the leading product of smog. Smog can cause visibility and lung-health

issues. Also, carbone dioxide is said to cause Global Warming. So, this project

is developed mainly to help protecting health and environment and secondly, to

1

Page 12: Adriana Szekeres

LIST OF FIGURES

minimize traffic congestions by smoothing vehicular traffic flow.

This thesis is organized in four parts. It starts by describing the State of the

Art. In this section the theoretical basis of my work and existing solutions will be

presented. The next section presents the Simulation Environment. In this section

VNSim will be described. My application will be integrated into this vehicular

simulator for testing issues. The next section is Design and Implementation. This

section presents the architecture of my application: the proposed algorithms to

compute the optimal speed, the improvements made to the existing simulator

and the method used to integrate my project into VNSim. Next section, Exper-

imental Results and Analysis will present the results obtained. The last section,

Conclusions, contains the final conclusions and future work.

2

Page 13: Adriana Szekeres

State of the Art

2.1 Mechanical physics

To be able to simulate car movements, by computing the speed and distance

at any given moment, as accurate as possible, a basic knowledge of mechanical

physics is necessary. In this this section I will describe the physics that helped my

car move with high accuracy. The book that I used to get a good understanding

in mechanical physics is Bourg (2002).

During the Renaissance period, scientists like Galileo and Newton reformu-

lated the basic laws of motion. With experiments and observations, they devel-

oped improved physical models for predicting the motion of objects. They came

up with the basic relationships that model the interaction of force, mass, and

acceleration. From these resulted the three famous laws of motion that everyone

should know, so I will put them here:

• Newtons First Law of Motion: Inertia - ”Every body preserves in its state

of rest, or of uniform in a right line, unless it is compelled to change that

state by forces impressed thereon”. In other words, a body at rest will stay

at rest unless acted upon by an external force.

• Newtons Second Law of Motion: Force, Mass, and Acceleration - ”The

alteration of motion is ever proportional to the motive force impressed: and

is made in the direction of the right line in which that force is impressed”.

Newtons second law says that an acceleration of an object is due to a net

external force applied to the object. Force, therefore, is proportional to

acceleration (F=ma).

3

Page 14: Adriana Szekeres

2.1 Mechanical physics

• Newtons Third Law of Motion: Equal and Opposite Forces - ”To every

action there is always opposed an equal reaction: or the mutual actions of

two bodies upon each other are always equal, and directed to contrary parts.”

2.1.1 Basic car diagram

Building the physical model of a car starts by drawing the forces that act on the

car (see 2.1 - the notations are explained in the List of Abbreviations section).

The figure shows the forces that act on a car driving on an inclined surface. For

simplification, in my application I considered the angle, θ, to be 0.

Figure 2.1: Force balance on a car

The force of gravity Fg pulls the car towards the earth. This force of gravity

in the normal direction, FgN , is balanced by normal forces, FNf and FNr, that act

along the surfaces of the front and rear tires that are in contact with the ground.

The total normal force, FN , is the sum of the forces on the front and rear tires

and is equal to the mass of the car multiplied by the acceleration due to gravity

and the cosine of the slope angle, θ.

4

Page 15: Adriana Szekeres

2.1 Mechanical physics

FN = FNf + FNr = mg cos θ (2.1)

The engine generates torque, which when applied to the wheels causes them

to rotate. The force applied to the tires, FT , is equal to the torque applied to the

wheels, Tw, divided by the wheel radius, rw.

FT =Tw

rw

(2.2)

When the car is in motion, an aerodynamic drag force develops. This drag

force can be modeled as a function of the air density, ρ, frontal area, A, the square

of the velocity magnitude, v, and a drag coefficient, CD.

FD =1

2CDρv

2A (2.3)

The last important force in the car diagram (2.1) is due to rolling friction.

This force acts on all four wheels and resists the rolling motion of the car. The

total rolling friction force, FR, is equal to the total normal force, FN , multiplied

by the coefficient of rolling friction for the vehicle, µr.

FR = µrFN = µrmg cos θ (2.4)

The total force that acts on the car parallel to the direction the car is driving,

Ftotal, is equal to the sum of the forces due to engine torque, gravity, aerodynamic

drag, and rolling friction.

Ftotal =Tw

rw

− µmg cos θ −mg sin θ − 1

2CDρv

2A (2.5)

The acceleration of the car at any given time is equal to the net force on the

vehicle divided by the mass of the vehicle, m.

a =Tw

rwm− µg cos θ − g sin θ − 1

2

CDρv2A

m(2.6)

5

Page 16: Adriana Szekeres

2.1 Mechanical physics

2.1.2 Engine torque

The engine generates a torque that is used to move the car. The torque generated

by the engine is not the same as the torque applied to the wheels (the engine is

not coupled directly to the wheels, but to some set of gears). The engine torque

is a function of the rate at which the engine is turning over.

Te = Te(Ωe) (2.7)

The engine turnover rate, Ωe, is expressed in revolutions per minute, rpm.

The torque curve shows the relation between the engine torque and the engine’s

turnover rate.

Figure 2.2: A typical torque curve

These curves vary from car to car and can be obtained from the manufacturer

or from other sources. A typical torque curve is shown in 2.2. One characteristic

of engine torque is that it does not always increase with increasing engine turnover

rate. The torque in the curve shown in 2.2 increases with increasing rpm until it

6

Page 17: Adriana Szekeres

2.1 Mechanical physics

reaches a peak value of 309 N-m at about 4600 rpm. As the engine turnover rate

increases beyond 4600 rpm, the torque delivered by the engine decreases.

To compute the power of the engine, Pe, the engine torque is multiplied by

the angular velocity of the engine.

Pe = Teωe (2.8)

The angular velocity of the engine, ωe, measured in rad/s can be obtained by

multiplying the engine turnover rate by 2π and dividing by 60.

ωe =2πωe

60(2.9)

2.1.3 Gears and wheel torque

The torque applied to the wheels of a car determines its acceleration. In general,

the torque applied to the wheels is not the same as the engine torque because

before the engine torque is applied to the wheels it passes through a transmission.

Figure 2.3: Two gears with different diameters

The gears inside a transmission change the angular velocity and torque trans-

ferred from the engine. This can greatly increase the acceleration of a car. For

example, consider the two gears in 2.3. The second gear has twice the diameter

of the first. This means that when the second gear completes a rotation, the

first one has completes two rotations. In other words, the angular velocity of the

7

Page 18: Adriana Szekeres

2.1 Mechanical physics

second gear is twice the angular velocity of the first. However, the torque that

the second gear can support is twice that of the first gear.

The gear ratio between two gears is the ratio of the gear diameters. In 2.3, the

gear ratio between the second and first gears would be 2:1. Car transmissions will

typically have between three and six forward gears and one reverse gear. There

is also an additional set of gears between the transmission and the wheels. The

gear ratio of this final gearset is known as the final drive ratio.

As mentioned in a previous paragraph, the engine torque is not the same

as the wheel torque. The wheel torque, Tw, is equal to the engine torque, Te,

multiplied by the gear ratio, gk, of whatever gear the car is in and the final drive

ratio, G, of the car.

Tw = TegkG (2.10)

Using equations 2.6 and 2.10, the car’s acceleration can be computed with:

a =TegkG

rwm− µg cos θ − g sin θ − 1

2

CDρv2A

m(2.11)

Transmission gears also change the angular velocity of the wheel relative to

the turnover rate of the engine (the factor ”60” is to transform rpm in revolutions

per second):

ωw =2πΩe

60gkG(2.12)

If the tires roll on the ground without slipping (”burn rubber” effect), the

translational velocity of the car, v, can be related to the angular velocity of the

wheel, and therefore to the engine turnover rate:

v = rwωw =rw2πΩe

60gkG(2.13)

Loking at equations 2.11 and 2.13, the following important observations can

be made:

• the higher the gear ratio, the higher the acceleration and the lower the car

velocity for a given rpm

8

Page 19: Adriana Szekeres

2.1 Mechanical physics

• increasing the final drive ratio increases the acceleration for all gears but

likewise decreases the car velocity for a given rpm for all gears.

An example of the gear ratios for a typical car is ilustrated in 2.4.

Figure 2.4: Gear ratios for a typical car

Every car engine has a characteristic known as a redline rpm value. The

engine cannot exceed this turnover rate for more than a brief period of time

without causing damage to the engine. A typical car’s redline value is 7200 rpm.

Using equation 2.13 and the data in 2.4, the theoretical maximum velocity for

each gear at 7200 rpm can be computed, and the results are shown in 2.5.

Equation 2.13 can be used to calculate what the engine rpm value will be after

a gear shift. If the car is shifted into a higher gear, the gear ratio is reduced. If

the velocity of the car is assumed to be constant before and after the gear shift,

the engine rpm level will decline because of the lower gear ratio. The new engine

turnover rate, Ωe(new), will be equal to the engine turnover rate before the gear

shift, Ωe(old), multiplied by the ratio of the new gear ratio to the previous gear

ratio.

Ωe(new) = Ωe(old)gk(new)

gk(old)(2.14)

9

Page 20: Adriana Szekeres

2.1 Mechanical physics

Figure 2.5: Maximum velocity that can be achieved for each gear

2.1.4 Computing acceleration and velocity

In order to create a car simulation, it is necessary to determine the acceleration

and velocity of the car at any point in time. The starting point for this analysis is

2.11. If the slope angle, frontal area, and air density are known, the only unknown

quantity in 2.11 is the wheel torque, Tw.

According to 2.10, the wheel torque is the product of the engine torque, Te,

the current gear ratio, gk, and the final drive ratio, G. The engine torque, Te,

can be obtained from the torque curve of the engine(see 2.2). Torque curve data

is usually presented either as a plot or as a table of numbers. For programming

purposes, the torque curve needs to be expressed as a mathematical expression.

The easiest way to mathematically model a torque curve is with a series of straight

lines.

The torque curve in 2.2 can be modeled by three equations. The units for

engine torque in all three equations are in N-m.

10

Page 21: Adriana Szekeres

2.1 Mechanical physics

Te = 220 ,Ωe ≤ 1000 (2.15)

Te = 0.025Ωe + 195 ,Ωe < 4600 (2.16)

Te = −0.032Ωe + 457.2 ,Ωe ≥ 4600 (2.17)

The general equation for the three previous ones is:

Te = bΩe + d (2.18)

Using 2.18 and 2.13, equation 2.11 results in an expression for the acceleration

of the car as a function of the current velocity of the car:

a =60gk

2G2bv

2πmrw2

+gkGd

mrw

− µg cos θ − g sin θ − 1

2

CDρv2A

m(2.19)

Equation 2.19 can be written in a simpler manner:

a =dv

dt= c1v

2 + c2v + c3 (2.20)

With the constants c1, c2 and c3 being:

c1 = −1

2

CDρv2A

m(2.21)

c2 =60gk

2G2b

2πmrw2

(2.22)

c3 =gkGd

mrw

− µg cos θ − g sin θ (2.23)

Knowing the car motion equation 2.20, and some typical parameters for the

rolling friction coefficient (0.015), the frontal area of the car (1.94 m2), the wheel

radius (0.3186), etc. I just needed a method to solve this differential equation. I

will present the method used, in the following subsection.

11

Page 22: Adriana Szekeres

2.1 Mechanical physics

2.1.5 Fourth-order Runge-Kutta

The fourth-order Runge-Kutta method is one of a family of step-wise integration

methods, meaning that from a set of initial conditions, the ordinary differential

equation (ODE) is solved at discrete increments of the independent variable. For

the equations of motion, the independent variable will be time.

Consider the differential equation:

dz

dt= v(z, t) (2.24)

Knowing, zn and vn, at a given time, tn we could determine the z value at

a future time, tn + ∆t, where ∆t is a certain time increment. For small enough

increments in the independent variable, t, the derivative in 2.24 can be replaced

with its delta form.

dz

dt≈ ∆z

∆t= v(z, t) (2.25)

Then , the value of z function, zn+1, at the future time tn + ∆t can be deter-

mined:

∆z = zn+1 − zn = v(z, t)∆t (2.26)

The question is where should the velocity, v(z,t), be evaluated. A natural

choice would be to evaluate the velocity at the known conditions, zn and tn.

∆z = zn+1 − zn = v(zn, tn)∆t (2.27)

This approach is known as Eulers method. Unfortunately, Eulers method is

not accurate unless the slope of the velocity curve is more or less constant between

times tn and tn + ∆t.

A more accurate method is fourth-order Runge-Kutta. With this method a

series of estimates are made for the z value at the new time by evaluating v at

different values of z and t. An initial estimate is made for zn+1 using the v at zn

and tn (that is, Eulers method). A second estimate is computed by evaluating

v at a point halfway between the known conditions and the results of the first

12

Page 23: Adriana Szekeres

2.2 Car emissions

estimate. Two more estimates are made in a similar manner, and the final value

for zn+1 is obtained from a linear combination of the four estimates. The five

mathematical equations that form the fourth-order Runge-Kutta scheme when it

is applied to solve equation 2.24 are:

∆z1 = v(zn, tn)∆t (2.28)

∆z2 = v(zn +1

2∆z1, tn +

1

2∆t)∆t (2.29)

∆z3 = v(zn +1

2∆z2, tn +

1

2∆t)∆t (2.30)

∆z4 = v(zn + ∆z3, tn + ∆t)∆t (2.31)

zn+1 = zn +∆z1

6+

∆z2

3+

∆z3

3+

∆z4

6(2.32)

2.2 Car emissions

There are hundreds of millions of cars on the roads today that are propelled by

internal combustion engines, and each one is a source of air pollution. Especially

in large cities, the amount of pollution that all the cars produce together can

cause serious damage.

Engines with internal combustion are made of a number of cylinders (most

cars have more than one cylinder - four, six and eight cylinders are common), each

containing a piston that moves up and down the cylinder, causing the rotation of

the car’s wheel. The movement of the piston is possible through the ignition of

a tiny amount of high-energy fuel (like gasoline) in a small, enclosed space. The

amount of fuel to be burned is carefully controlled, in order to reduce emissions.

The stoichiometric point is the ideal ratio of air to fuel. Theoretically, at this point

all the oxygen in the air will be used to burn all the fuel in the enclosed space.

For example, the stoichiometric point for gasoline is 14.7:1, in other words, for

each pound of gasoline, 14.7 pounds of air will be burned. Unfortunately, during

driving the stoichiometric point is not always reached. After the ignition of the

fuel, a number of gases are released:

13

Page 24: Adriana Szekeres

2.2 Car emissions

• Nitrogen gas (N2) - Air is 78-percent nitrogen gas, and most of this passes

right through the car engine.

• Carbon dioxide (CO2) - This is one product of combustion. The carbon in

the fuel bonds with the oxygen in the air.

• Water vapor (H2O) - This is another product of combustion. The hydrogen

in the fuel bonds with the oxygen in the air.

• Carbon monoxide (CO) is a poisonous gas that is colorless and odorless.

• Hydrocarbons or volatile organic compounds (VOCs) are a major compo-

nent of smog produced mostly from evaporated, unburned fuel.

• Nitrogen oxides (NO and NO2, together called NOx) are a contributor to

smog (smoke + fog) and acid rain, which also causes irritation to human

mucus membranes.

In Haworth & Symmons (2001), the authors try to relate speed to fuel con-

sumption and emissions rate, see (2.6) . They emphasise how important it is the

driver’s behavior to reducing car emissions.

Changes in speed need acceleration or deceleration. Emissions tend to be high-

est during acceleration, when the fuel to air ratio (described previous) is higher

than optimal. This results in large increases in CO and HC emissions as well as

increased fuel consumption. In fact, the emissions of pollutants during acceler-

ation are five to ten times higher, on average, than the emissions during idling.

The acceleration characteristics of the vehicle and driver contribute significantly

to actual emissions and fuel consumption.

How the driver accelerates influences greatly the amount of emissions during

acceleration. Very hard or aggressive accelerations, or accelerations under heavy

load (e.g., when driving up a hill) can produce higher emissions than do moderate

accelerations.

Another important issue in reducing car emissions, that can also be con-

trolled by the driver, is the so called ”cold start”. If a car is started with a

14

Page 25: Adriana Szekeres

2.2 Car emissions

Figure 2.6: Typical emission rates for Volatile Organic Compounds (Hydrocar-

bons HC), carbon monoxide, nitrogen oxides and fuel consumption as a function

of average speed

cold enough catalytic converter, the chemical reactions that convert pollutants to

water vapour, nitrogen and carbon dioxide will not take place.

A first conclusion to this section is that the driver can greatly influce the

emissions rate through:

• smooth accelerations - no rapid speed changes

• constant speed at cruising

• reduced number of cold starts by combining several shorter trips into one

longer trip.

This conclusion was the starting point for my project. The application I wanted

to develop should aid the driver in controlling his/her car’s emissions.

Developing a system to reduce car emissions first needs a vehicle simulator

which can be able to estimate as acurate as posible the fuel consumption and

15

Page 26: Adriana Szekeres

2.3 Intelligent Transport Systems

emissions. Many such simulators have been developed, each trying to achive a

high rate of accuracy:

• ADvanced VehIcle SimulatOR (ADVISOR) - First developed in November

1994, by National Renewable Energy Laboratory(NREL), ADVISOR was

designed as an analysis tool to assist the U.S. Department of Energy (DOE)

in studying hybrid electric vehicles (HEVs). ADVISOR is often used to eval-

uate many different vehicle designs and to do studies to look at the effect

of varying parameters away from some baseline. Some suppliers are using

ADVISOR to evaluate how well their components would perform, compar-

ing their components with those in the ADVISOR library. Although all of

the major automobile manufacturers have their own proprietary simulation

tools, they use ADVISOR to compare their product with others.

• MOtor Vehicle Emissions Simulator (MOVES) - Developed by U.S. Envi-

ronmental Protection Agency (EPA), MOVES is a vehicle simulator which

provides an accurate estimate of emissions from mobile sources under a

wide range of user-defined conditions. The user can specify vehicle types,

time periods, geographical areas, pollutants, vehicle characteristics and road

types to be modeled. After that, a series of calculations are performed,

which accurately reflect vehicle operating processes, including ”cold start”,

and provide estimates of emission rates

• Car EcoMeter - Developed by Royal Automobile Club of Victoria(RACV)

and Environmental Protection Agency Victoria (EPA Victoria), this appli-

cation estimates the fuel consumpiton and car emissions for a wide range of

models and characteristics. The application is available online. The user is

able to choose beetwen a series of characteristics, such as fuel type, vehicle

type, year of manufacture, driver behaviour, etc.

2.3 Intelligent Transport Systems

Intelligent Transportation Systems (ITS) are mainly about bringing communi-

cation technology and information processing into transportation. The main

16

Page 27: Adriana Szekeres

2.3 Intelligent Transport Systems

concerns of ITS are reducing traffic congestions, transportation durations and

fuel consumption, increasing safety and automating various traffic processes, e.g.

paying parking bill.

There are many types of ITS, that vary in terms of the technologies used.

There are basic management systems, such as: car navigation; traffic signal con-

trol systems; automatic number plate recognition or speed cameras, there are

monitoring systems, such as security CCTV systems, and there are also more

advanced systems that communicate with a number of other sources, such as

parking guidance and information systems and weather information.

Some of technologies implemented in ITS, that my application would require

in order to be deployed on cars and traffic lights, are:

• Wireless comunication - Two standards have been proposed for short-range

comunications: IEEE 802.11 protocols and Dedicated Short Range Commu-

nications. For long-range comunications infrastructure networks are being

used: Global System for Mobile Communications (GSM), WiMAX (IEEE

802.16), or 3G. Long-range comunications are more expensive because of

the nedded infrastructure.

• Computation technologies - Vehicles are provided with more capable com-

puter processors that can even run real-time operating systems. Complex

software applications can be developed.

Some inspiring applications developed with ITS are:

• Arterial Management - surveillance, traffic control - mainly used to smooth

traffic flow (adaptive signal control, advanced signal systems, etc.), lane

management, parking management, information dissemination, enforcement

- used to detect cars that don’t obey traffic rules (speed enforcement, traffic

signal enforcement)

• Crash Prevention and Safety - road geometry warning (e.g., curve speed

warning), intersection collision warning, bicycle warning

17

Page 28: Adriana Szekeres

2.4 Vehicular Ad-hoc NETworks

• Traffic Incident Management - used to decrease the time to detect incidents,

the time for responding vehicles to arrive, and the time required for traffic

to return to normal conditions.

• Electronic payment and pricing - electronic toll collection, parking fee pay-

ment

Continuous research in ITS is being conducted. The World Congress and

Exhibition on Intelligent Transport Systems and Services, takes place in Stock-

holm in September 2009. The 16th annual event, which rotates between Europe,

the Americas and the Asia-Pacific region, comes to Sweden for the first time

and takes place at Stockholm International Fairs (Stockholmsmssan), from 21st

- 25th September 2009. The theme of this prestigious event is ITS in Daily Life,

exploring how ITS can improve everyday mobility.

2.4 Vehicular Ad-hoc NETworks

Vehicular Ad Hoc Networks (VANETs) are a special kind of networks that form

between cars that are able to communicate with other cars (vehicle-to-vehicle

communication) or with other roadside base stations (vehicle-to-infrastructure

communication). To be able to communicate with eachother or with the in-

frastructure, the cars are equiped with short-distance communication devices. A

major advantage of VANETs is that they don’t need an infrastructure and do not

use a central administration so that the nodes can communicate with each other.

However, VANETs are not without problems. Due to the great mobility of the

nodes, VANETs can suffer rapid changes in the topology, frequent node discon-

nections, as well as information waste. A serious issue with VANETs is also the

security. The security of such networks is addressed in Raya & Hubaux (2007).

The authors present some possible threats and the corresponding solutions.

18

Page 29: Adriana Szekeres

2.5 Travolution

2.5 Travolution

After two years of research Audi has developed a traffic management system,

Travolution, who aims at reducing car emissions. Travolution is based on vehicle-

to-semaphore communication. The semaphore will inform the car about the time

until a color phase changes.

The 1.2 milion ¤project has already been tested. In Ingolstadt, the home of

Audi, 46 ”intelligent” semaphores have been synchronized to minimize stopped

time and pollution. Three of them have been equiped with Travolution system

to be able to communicate with also specially equipped Audi A5 and A6 Avants.

The testing will continue and more Travolution systems will be deployed.

19

Page 30: Adriana Szekeres

Simulation Environment

Testing a VANET application is a very expensive process when using real cars,

real equipment and real roads. Real testing should be done only as a final stage

of the project. Instead, a VANET simulator can be used. To test my application

I have decided to use VNSim, described in Gorgorin et al. (2006). Developed

at University ”Politehnica” of Bucharest, VNSim is a microscopic simulator1

that implements the components nedeed for any VANET application: wireless

communication module, mobility module, map simulator module, etc.

3.1 VNSim System Architecture

VNSim is an event-based traffic simulator which works on discrete time incre-

ments. This means that, at each time increment, all the current events2 are

pulled from the queue of events and handled randomly. After executing all han-

dling code, the simulation time progresses to the next time increment.

Three types of events have been considered: send, receive and GPS (see Figure

3.1 for the complete architecture of VNSim - the picture was taken from Gorgorin

et al. (2006)). When a send event is pulled from the queue of events, the execution

of a handler function is triggered. This function prepares the message to be sent

and then it schedules the corresponding receive events for all those nodes the

simulator decides to deliver this message to (for example, in case of a broadcast

message, all the nodes situated in the communication range of the sender will

receive this message). The GPS event is rescheduled periodically for each node.

1a simulator that takes into account the actions of each individual vehicle2events that have been scheduled to take place at the current simulation time

20

Page 31: Adriana Szekeres

3.2 Mobility module

Figure 3.1: VNSim architecture

3.2 Mobility module

The mobility module is responsible with moving the car to its next position during

a time increment, according to a mobility model. The mobility model takes into

account the personality of the drivers, the interactions with other cars, traffic

rules, etc.

3.2.1 Maps

All traffic simulators should have a digital map on which to position the cars. In

VNSim, TIGER maps are used (see Bureau (2008)). These digital maps are avail-

able for free and consist of two types of files: Record Type 1 (RT1) and Record

Type 2 (RT2). RT1 files contain information about all the road segments of the

map (name, type, starting and ending points). RT2 files contain intermediate

points of the road segments for representing the curves. The points are given in

terms of geographical coordinates (latitude and longitude). Interpolation is used

21

Page 32: Adriana Szekeres

3.2 Mobility module

to compute more intermediate points. This will increase the accuracy of the map.

To compute the distance between two points on the map, VNSim uses conversion

tables from degrees to meters depending on the latitude and longitude.

Unfortunately, TIGER files lack some useful traffic-specific information, such

as the number of lanes on the roads, the slope of the roads and the positions of

traffic control systems (traffic lights, traffic signs, etc.). Knowing the slope of the

roads would have been vey useful for my application, beacause it influences the

forces that act on the car.

To integrate my application into VNSim I had to override a small part of the

mobility module. In the next section I will explain the implementation of this

complex module.

3.2.2 Implementation details

Using Java as the programming language, the implementation is based on the

object-oriented paradigm.

To be able to position the cars on roads, this module uses a representation of

the digital map, implemented as the Map class. This class contains an array of

objects of type Road and each road contains an array of objects of type CarIn-

stance. Class CarInstance models the vehicle’s behavior; imagine it as being the

driver. The most important method this class implements is the move() method.

This is where all the decisions about the next position of the car are made. To

predict the next position of the car1 three factors are taken into account: traffic

control systems, the position of adjacent vehicles, and the drivers personality.

Whenever the method move() is called, the driver starts analysing the traffic

conditions, to decide the wanted speed. At first, the traffic control system at the

next intersection is checked (for instance, if the next intersection is controlled

by a traffic light and the color is red, the driver should decelerate, assuming

that the distance between the car and the traffic light is sufficiently small). The

next intersection this car is going to pass through is represented by an object of

1assuming that the car has a predefined route; for example, the simulator knows when acar is turning left

22

Page 33: Adriana Szekeres

3.3 Traffic data dissemination

type Intersection, stored in class CarInstance. The next intersection is computed

whenever the car changes the road segment. After checking the conditions at

the intersection, the adjacent vehicles are taken into account to make the final

decision. If the final decision implies a greater speed than the current one, the

driver accelerates with a predefined acceleration, according to his/her personality.

3.3 Traffic data dissemination

Traffic data dissemination basically refers to how data can be transfered between

cars forming a VANET. Two main mechanisms of traffic data dissemination are

explained in Nadeem et al. (2004): flooding and diffusion. In the flooding mecha-

nism, each node periodically broadcasts information about itself. On receiving a

broadcasted message, the node stores it in its database and immediately forwards

the message to any node within its range, by rebroadcasting it. In the diffusion

mechanism, each node broadcast information about itself and about the other

nodes from its database. In 3.2 the diffusion mechanism is illustrated. Assuming

that vehicles 2 and 3 are in the transmission range of vehicle 1 and vehicles 3 and

4 are in the transmission range of vehicles 2 and 3, respectively, and will stay this

way during two broadcast intervals. The final state of each vehicle’s database,

after the two broadcast periods, is illustrated in the third picture of 3.2.

I did’t explicitly use diffusion in my application, as the only information beeing

broadcasted and rebroadcasted is the information about the traffic light. How-

ever, I will test my application using fixed traffic ligths1 as well as adaptive traffic

lights2, described in Gradinescu (2006). In case of adaptive traffic lights, cars use

the diffusion mechanism to send information about themselves.

1traffic ligths that have a fixed, predefined phase length2traffc lights that can change their phase lenghts between cycles, e.g. they could extend the

green phase in case of a lengthy car queue

23

Page 34: Adriana Szekeres

3.4 Fuel Consumption and Pollutant Emissions Estimation

Figure 3.2: Diffusion mechanism

3.4 Fuel Consumption and Pollutant Emissions

Estimation

VNSim can be used to estimate fuel consumption and pollutant emissions. This

is very useful for testing my application. This section describes the method used

to compute fuel consumption and emissions.

Estimating fuel consumption and pollutant emissions is a necessity when eval-

uating traffic management applications. To model fuel consumption and emis-

sions (CO2, CO, HC, NOx), the authors of VNSim used the work of Akcelik and

Besley, from Akcelik & Besley (2003). Akcelik and Besley describe the method to

estimate emissions and fuel consumption used in aaSIDRA1 and aaMOTION2.

The method presented in their paper has been simplified to take into account

only light vehicles.

The formula used to estimate the value of fuel consumed (mL) or emissions

produced (g), in a time interval (∆t), is:

1an intersection analysis package, developed by Akcelik and Associates 20022a single-vehicle microscopic simulation package that uses a time-step simulation model

24

Page 35: Adriana Szekeres

3.4 Fuel Consumption and Pollutant Emissions Estimation

∆F = (fi + β1RTv + [β2Mva

2v

1000]a>0)∆t , RT > 0 (3.1)

∆F = fi∆t , RT ≤ 0 (3.2)

where:

• ∆ F [mL or g] - the quantity consumed or gas emitted (HC, CO, NOx)

during a time interval;

• v[m/s] - vehicle instantaneous velocity;

• a[m/s2] - acceleration;

• Mv[kg] - vehicle mass (1400 kg on average for light vehicles in a city envi-

ronment);

• RT [kN] - total force acting on a car, including air drag and rolling resistance;

RT = Mva+ Frr + Fad (3.3)

• Frr - rolling resistance force;

Frr = CrrMvg (3.4)

• Crr - rolling resistance coefficient, 0.15 on average for each tire (depends on

road surface)

• Fad - air drag force

Fad =1

2ρv2ACD (3.5)

– ρ - air density (1.29 kg/m3);

– A - frontal car area;

– CD - drag coefficient;

25

Page 36: Adriana Szekeres

3.4 Fuel Consumption and Pollutant Emissions Estimation

• fi[mL/s or g/s] idle fuel consumption rate or gas emissions rate;

• β1[mL or g per kJ] fuel consumed or gas emitted per engine energy unit;

• β2[mL or g per (kJm/s2)] coefficient for fuel consumption or gas emissions

per unit of energy-acceleration, reflects the function behavior on positive

acceleration.

The values for fi, β1 and β2 are presented in Figure 3.3 and have been taken

from Akcelik & Besley (2003).

Figure 3.3: The values of the coefficients used in Equation 3.1

Carbon dioxide (CO2) is calculated based on the fuel consumed, with the

following formula:

∆F (CO2) = ∆F (fuel)fCO2 (3.6)

• fCO2 - the CO2 emission rate given per quantity of fuel [g/mL] (it is equal

to 2.5[g/mL] for light vehicles).

In Figure 3.4 there are three graphics showing fuel consumtion related to speed

and acceleration for vehicles passing through an intersection. (The picture was

taken from Gradinescu (2006))

26

Page 37: Adriana Szekeres

3.4 Fuel Consumption and Pollutant Emissions Estimation

Figure 3.4: Fuel consumption for vechicles passing through an intersection

27

Page 38: Adriana Szekeres

Design and Implementation

With the number of cars expected to double in the next 20 years, more efficient

traffic managemnt will be needed. Intelligent traffic lights systems and VANETs

have been given a lot of attention in the last years. The evolution of traffic lights

is very impressive considering that the simplest traffic lights operate on timers,

with predetermined periods of red, yellow and green. Today, complex traffic lights

systems can be deployed to help improve traffic conditions.

Intelligent traffic lights are traffic lights that are able to send useful informa-

tion to the approaching vehicles, to servers, to other traffic lights, etc. or that

are aware of the approaching vehicles and use this information to make decisions

that can smooth traffic flow.

4.1 System design

The intelligent traffic system we have developed is mostly based on traffic light-

to-vehicle and vehicle-to-vehicle communication (see Figure 4.1). We assume that

the traffic lights and the vehicles are equiped with short range communication

devices and computing power. The traffic lights are used to periodically broadcast

information about the current color of the lights and the time until it changes,

for each segment of road it controlls. The cars use the information received from

traffic lights to adjust their speed according to an algorithm that aims at reducing

the quantity of emissions. Also, because of the short communication range of the

traffic lights, the cars rebroadcast the message received from the traffic light.

28

Page 39: Adriana Szekeres

4.1 System design

Figure 4.1: Intersection with intelligent traffic light

29

Page 40: Adriana Szekeres

4.2 Implementation details

4.2 Implementation details

To be able to implement an application that predicts as accurate as possible the

movement of a car on a given distance, or in a given amount of time, I needed

a different mobility model than the one implemented in VNSim. All the previ-

ous applications/protocols tested with VNSim (see Gradinescu (2006), Gorgorin

(2006) and Ichimescu (2008)) didn’t need a very accurate mobility module, as

they were not focused on the movement of the car. My application is focused

more on the algorithms being run on the vehicles. These alghorithms need to

know with high precisions the future speed and position of the car. The inte-

gration with VNSim is important because it will enable testing the application

using complete scenarios (the maps simulator and the communication module

already implemented in VNSim will be of great use). In this section I will start

by describing the implementation of the application I have developed and then

I will continue with a description of how my application can be integrated into

VNSim.

4.2.1 The standalone application

By the standalone application I refer to the part of the application which has

not been integrated in VNSim and can be tested separately. The only thing that

I used from VNSim for this part of the project was the Estimating Emissions

module, which is described in the previous chapter (see Section 3.4).

The application has been written in Java. For a clear view of the entire

structure, the UML diagram is illustrated in Figure 4.2. In the next paragraphs

I will explain each of the implemented classes:

• DESolver - This class implements the Runge-Kutta 4 method to solve

ordinary differential equations.

• DifferentialEquation - This class represents an ordinary differential equa-

tion. Field s represents the independent variable (in our case it represents

time) and field q represents the array of dependent variables (in our case

these will be speed and distance). Field nrEq represents the number of

30

Page 41: Adriana Szekeres

4.2 Implementation details

equations to be solved simultaneously. The most important method of this

class is getRightTerm. This abstract method, that must be implemented by

all the classes that extend this class, represents the value of the right-hand

expresion of the differential equation. For example, in Equation 2.25, the

function getRightTerm will return the value of v, evaluated at the current

values of zn and tn.

• Car - This class extends DifferentialEquation class and implements the

getRightTerm method using Equation 2.20. It also contains all the nec-

essary fields for implementing the equations discussed in the State of the

Art chapter, section Mechanical Physics. For example, field muR is the

rolling friction coefficient, field omegaE represents the engine revolutions

per minute, etc. This class can be extended by various classes to represend

different models of cars.

• OrdinaryLightCar - This class extends Car class to initialize the fields

for an ordinary light car. For example, the area field will be initialized with

2.1 m, the wheelRadius field will be initialized at 0.3186 m, etc.

• SimulatorEvaluation - This class implements the two algorithms applied

in case of green and red traffic lights (these simple algorithms are described

further in this section) and it is also used for testing.

4.2.1.1 The algorithm applied in case of green lights

This algorithm is applied when a car, approaching an intersection with traffic

light, is informed that the current traffic light color is green. The algorithm must

decide if the driver can catch the green light emitting a smaller quantity of gases

than stopping at the red light. The steps of the algorithm are:

• predict the movement of the car, assuming the driver tries to catch the

green light (he/she accelerates until the needed speed) and estimate the

emissions. The pseudocode for this part of the algorithm is:

31

Page 42: Adriana Szekeres

4.2 Implementation details

Figure 4.2: UML class diagram for the standalone application

32

Page 43: Adriana Szekeres

4.2 Implementation details

1 car .distance = 0 // the total distance traveled by the car2 car .time = 0 // the total time the car traveled3 timeIncrement = 0.06 // the time increment to apply runge-kutta4 car .setMode(”accelerate”)5 while car .distance < distanceToTrafficLight6 neededSpeed = (distanceToTrafficLight − car .distance)÷

(greenTime − car .time)7 if neededSpeed > MAXSPEEDALLOWED8 return // the driver cannot catch the green light9 if neededSpeed <= car .speed

10 car .setMode(”cruise”)11 car .updateSpeedAndLocation(timeIncrement) // this updates

car.time, car.speed and car.distance12 car .estimateEmissions()

• predict the movement of the car, assuming the driver maintains constant

speed, stops at the red color, then accelerates to the speed he had before

stopping and estimate the emissions. The pseudocode for this part of the

algrithm is:

1 car .distance = 0 // the total distance traveled by the car2 car .time = 0 // the total time the car traveled3 timeIncrement = 0.06 // the time increment to apply runge-kutta4 car .setMode(”cruise”) // the driver keeps a constant speed5 while car .distance < distanceToTrafficLight − 100

// assume the driver starts to break100m before the intersection

6 car .updateSpeedAndLocation(timeIncrement)7 car .estimateEmissions()8 car .setMode(”break”) // the driver breaks to stop to the red light9 while car .distance < distanceToTrafficLight

10 car .updateSpeedAndLocation(timeIncrement)11 car .estimateEmissions()12 car .setMode(”accelerate”)

// the driver accelerates to the speed he had before stopping13 while car .speed < WANTEDSPEED14 car .updateSpeedAndLocation(timeIncrement)15 car .estimateEmissions()

33

Page 44: Adriana Szekeres

4.2 Implementation details

• compare the results obtained in the two situations and recommend the

optimal speed to the driver

4.2.1.2 The algorithm applied in case of red lights

This algorithm is applied when a car, approaching an intersection with traffic

light, is informed that the current traffic light color is red. The algorithm must

decide if, upon reducing the speed in order to enter the intersection when the

light color is turning green, the quantity of emissions is smaller. The steps of the

algorithm are:

• predict the movement of the car, assuming the driver reduces the speed in an

attempt to avoid the red light and estimate the emissions. The pseudocode

for this part of the algorithm is:

1 car .distance = 0 // the total distance traveled by the car2 car .time = 0 // the total time the car traveled3 timeIncrement = 0.06 // the time increment to apply runge-kutta4 car .setMode(”break”)5 while car .distance < distanceToTrafficLight6 neededSpeed = (distanceToTrafficLight − car .distance)÷

(greenTime − car .time)7 if neededSpeed < MINSPEEDALLOWED8 return // the driver cannot avoid the red light9 if neededSpeed >= car .speed

10 car .setMode(”cruise”)11 car .updateSpeedAndLocation(timeIncrement) // this updates

car.time, car.speed and car.distance12 car .estimateEmissions()

• predict the movement of the car, assuming the driver maintains constant

speed, stops at the red color, then accelerates to the speed he would have

needed to avoid the red light, if that would have been possible. The pseu-

docode for this part of the algrithm is:

34

Page 45: Adriana Szekeres

4.2 Implementation details

1 car .distance = 0 // the total distance traveled by the car2 car .time = 0 // the total time the car traveled3 timeIncrement = 0.06 // the time increment to apply runge-kutta4 car .setMode(”cruise”) // the driver keeps a constant speed5 while car .distance < distanceToTrafficLight − 100

// assume the driver starts to break100m before the intersection

6 car .updateSpeedAndLocation(timeIncrement)7 car .estimateEmissions()8 car .setMode(”break”) // the driver breaks to stop to the red light9 while car .distance < distanceToTrafficLight

10 car .updateSpeedAndLocation(timeIncrement)11 car .estimateEmissions()12 car .setMode(”accelerate”)

// the driver accelerates to the speed he had before stopping13 while car .speed < NEEDEDSPEED14 car .updateSpeedAndLocation(timeIncrement)15 car .estimateEmissions()

• compare the results obtained in the two situations and recommend the

optimal speed to the driver

4.2.2 Integration with VNSim

To integrate the application with VNSim, some classes of the vehicular simulator

must be extended, in order to override some important methods. For a clear view

of the integration module, see Figure 4.3. In the next paragraphs I will explain

all the classes from the integration module:

• EmissionsCar - This class extends the SimulatedCarInfo class. The Sim-

ulatedCarInfo class represents the car node in the vehicular simulator. The

car is equiped with a radio device, simulated by class Radio, in order to

transmit/receive messages. The important method this class implements

and which I have overriden, is onReceive. This method is called whenever

this car receives a packet. If the packet contains a message from the traffic

light, one of the two algorithms presented in the previous section, will be

applied.

35

Page 46: Adriana Szekeres

4.2 Implementation details

• EmissionsTrafficLight - This class extends the WirelessTrafficLight class

and overrides the method prepareMessage to permit the traffic light to

broadcast periodical messages about the current state of the traffic lights

colors and durations.

• EmissionsDriver - This class simulates the car driver. It extends the

CarInstance class and overrides the method move. This method is respon-

sible with finding the next position and speed of the car.

• SegmentLightsInfo - This class is used for creating the message sent by

the traffic light. It contains information about the current color and its

duration for a specific road segment, controlled by the traffic light.

• TLMessage - This class simulates a message sent from the traffic light.

For each segment of road controlled by the traffic light, an object of type

SegmentLightsInfo is created. This class contains the timestamp1, the cycle

length and an array of SegmentLightsInfo.

1the time when this message was created

36

Page 47: Adriana Szekeres

4.2 Implementation details

Figure 4.3: UML class diagram for integration in VNSim

37

Page 48: Adriana Szekeres

Experimental Results and

Analysis

This chapter presents all the experimental results obtained for the standalone

application (see Design and Implementation, 4.2.1). The integration with VNSim

has not been finished so this section will not contain complete scenarios; it will

contain scenarios that involve only one car.

5.1 Preliminary experiments

This section illustrates how acceleration influences the emissions rate. The fol-

lowing graphics show the results of two different scenarios for typical driver be-

haviours 1. In the first scenario, the driver keeps accelerating until the car reaches

30 m/s. Figure 5.1 illustrates how speed and acceleration change in time. In the

second scenario, the driver accelerates until the car reaches 15.22 m/s and then

he/she maintains a constant speed (see Figure 5.3).

Looking at the acceleration curve in Figures 5.1 and 5.3, two observations can

be made: 1) the very steep slopes (three in Figure 5.1 and two in 5.3) are due to

gear shifting and 2) acceleration is decreasing in time, due to the gear ratio (see

Mechanical Physics section, 8) and the increasing drag force. The quantity (in

grams) of emitted CO2 and CO in the first scenario, is shown in Figure 5.2 and

the results of the second scenario can be visualized in Figures 5.4 (in which the

car traveled for the same amount of time as the one in the first scenario) and 5.5

(in which the car traveled the same distance as the one in the first scenario).

1assuming that the same car is used

38

Page 49: Adriana Szekeres

5.1 Preliminary experiments

Figure 5.1: A car that accelerates from 0 km/h to 108 km/h

Figure 5.2: The emissions of a car that accelerated from 0 km/h to 108 km/h

39

Page 50: Adriana Szekeres

5.1 Preliminary experiments

Figure 5.3: A car that accelerates from 0 km/h to 54.8 km/h and then maintains

a constant speed

Figure 5.4: The emissions of a car that accelerated from 0 km/h to 54.8 km/h

and than maintained a constant speed - the car traveled a given amount of time

40

Page 51: Adriana Szekeres

5.1 Preliminary experiments

Figure 5.5: The emissions of a car that accelerated from 0 km/h to 54.8 km/h

and that maintained a constant speed - the car traveled a given distance

Comparing the results of the two scenarios, it can be noticed that the quantity

of gases emitted by the car in the second scenario (≈ 129g of CO2), is smaller

that the one obtained in the first scenario (≈ 360g of CO2). (Noticing the slope

of the emissions curve in Figure 5.5 we can compute the total distance the car

can travel until its emissions reach the ones in Figure 5.2 - TODO).

41

Page 52: Adriana Szekeres

5.2 Experimental results of the decision algorithm - green traffic lights

5.2 Experimental results of the decision algo-

rithm - green traffic lights

This section presents the experimental results obtained with the use of the al-

gorithm applied in case of green traffic light, described in the previous chapter

(see Design and Implementation, 4.2.1.1). The algorithm has been used in two

scenarios.

In the first scenario, a car traveling at 40 km/h ( ≈ 11 m/s) has 15 seconds to

catch the green light. The distance between the traffic light and the car is 200 m.

The algorithm predicts the speed and acceleration of the car until it passes the

intersection and estimates the quantity of emissions in two possible situations: 1)

the driver tries to catch the green light and accelerates until the needed speed is

reached (see Figure 5.8) and 2) the driver maintains a constant speed, stops and

waits at the red light and then accelerates until the previous speed is obtained

(see Figure 5.6). The estimated quantity of emissions is illustrated in Figures 5.9

- for the first situation (≈ 54 grams of CO2) and 5.7 - for the second situation

(≈ 96 grams of CO2). Based on these results, the system advises the driver to

accelerate (until ≈ 62 km/h (≈ 17.2 m/s) is reached) in order to catch the green

light. By doing this, the driver could reduce the quantity of CO2 by 42 grams.

In the second scenario, the same car, now traveling at 22km/h (≈ 6 m/s), has

to catch the green light, given the same conditions as in the previous scenario. As

before, the algorithm predicts the speed and acceleration of the car until it passes

the intersection and estimates the quantity of emissions in the two situations

described earlier: 1) illustrated in Figure 5.12 and 2) shown in Figure 5.10. The

estimated quantities of emissions for the two situations are shown in Figure 5.13

(≈ 110 grams of CO2) and Figure 5.11 (≈ 58 grams of CO2), respectively. Based

on these results the system advises the driver not to accelerate, in the attempt to

catch the green light. If the driver complies with this suggestion, he/she would

reduce the quantity of CO2 by 52 grams.

42

Page 53: Adriana Szekeres

5.2 Experimental results of the decision algorithm - green traffic lights

Figure 5.6: A car traveling at a constant speed of ≈ 11 m/s, stops at the red

traffic light and then accelerates until it reaches the same speed again

Figure 5.7: The gases emitted by the car described in Figure 5.6

43

Page 54: Adriana Szekeres

5.2 Experimental results of the decision algorithm - green traffic lights

Figure 5.8: A car traveling at ≈ 11 m/s accelerates in order to catch the green

light

Figure 5.9: The gases emitted by the car described in Figure 5.8

44

Page 55: Adriana Szekeres

5.2 Experimental results of the decision algorithm - green traffic lights

Figure 5.10: A car traveling at a constant speed of ≈ 6 m/s, stops at the red

traffic light and then accelerates until it reaches the same speed again

Figure 5.11: The gases emitted by the car described in Figure 5.10

45

Page 56: Adriana Szekeres

5.2 Experimental results of the decision algorithm - green traffic lights

Figure 5.12: A car traveling at ≈ 6 m/s accelerates in order to catch the green

light

Figure 5.13: The gases emitted by the car described in Figure 5.12

46

Page 57: Adriana Szekeres

5.3 Experimental results of the decision algorithm - red traffic lights

5.3 Experimental results of the decision algo-

rithm - red traffic lights

This section presents the experimental results obtained with the use of the algo-

rithm applied in case of red traffic light, described in the previous chapter (see

Design and Implementation, 4.2.1.2). The algorithm has also been used in two

scenarios.

In the first scenario, a car traveling at 60 km/h ( ≈ 16.6 m/s) approaches a red

traffic light color which will last for the next 20 seconds. The distance between

the traffic light and the car is 200 m. The algorithm predicts the speed and

acceleration of the car until it passes the intersection and estimates the quantity

of emissions in two possible situations: 1) the driver tries to reduce speed in

order to avoid the red color (see Figure 5.14) and 2) the driver maintains a

constant speed, stops and waits at the red light and then accelerates until the

speed needed to avoid the red color (in the first situation) is obtained (see Figure

5.16). The estimated quantity of emissions is illustrated in Figures 5.15 - for the

first situation (≈ 28 grams of CO2) and 5.17 - for the second situation (≈ 75

grams of CO2). Based on these results, the system advises the driver to reduce

the speed (until ≈ 34 km/h (≈ 9.47 m/s) is reached) in order to avoid the red

light color. By doing this, the driver could reduce the quantity of CO2 by 47

grams.

In the second scenario, the same car, now traveling at the same speed (60km/h),

approaches a red traffic light color which, this time, will last for the next 40 sec-

onds. As before, the algorithm predicts the speed and acceleration of the car until

it passes the intersection and estimates the quantity of emissions in the two situ-

ations described earlier: 1) illustrated in Figure 5.14 and 2) shown in Figure 5.16.

The estimated quantities of emissions for the two situations are shown in Figure

5.15 (≈ 46 grams of CO2) and Figure 5.17 (≈ 37 grams of CO2), respectively.

Based on these results the system advises the driver not to reduce the speed, in

the attempt to avoid the red light. If the driver complies with this suggestion,

he/she would reduce the quantity of CO2 by 9 grams.

47

Page 58: Adriana Szekeres

5.3 Experimental results of the decision algorithm - red traffic lights

Figure 5.14: A car traveling at 60 km/h (≈ 16.6 m/s) stops at the red traffic light

and then accelerates until it reaches the speed it would have needed to avoid the

red color (which lasted for 20s), if possible

Figure 5.15: The gases emitted by the car described in Figure 5.14

48

Page 59: Adriana Szekeres

5.3 Experimental results of the decision algorithm - red traffic lights

Figure 5.16: A car traveling at at 60 km/h (≈ 16.6 m/s) reduces speed to 34

km/h (≈ 9.47 m/s) in order to avoid stopping at the red light

Figure 5.17: The gases emitted by the car described in Figure 5.16

49

Page 60: Adriana Szekeres

5.3 Experimental results of the decision algorithm - red traffic lights

Figure 5.18: A car traveling at 60 km/h (≈ 16.6 m/s) stops at the red traffic light

and then accelerates until it reaches the speed it would have needed to avoid the

red color (which lasted for 40s)

Figure 5.19: The gases emitted by the car described in Figure 5.18

50

Page 61: Adriana Szekeres

5.3 Experimental results of the decision algorithm - red traffic lights

Figure 5.20: A car traveling at at 60 km/h (≈ 16.6 m/s) reduces speed to 15.3

km/h (≈ 4.25 m/s) in order to avoid stopping at the red light

Figure 5.21: The gases emitted by the car described in Figure 5.20

51

Page 62: Adriana Szekeres

Conclusions

The purpose of this thesis was to describe a method to reduce car emissions using

an intelligent transportation system. The method described here consists in using

intelligent traffic lights to minimize the number of stop-starts due to the red light

and the vain accelerations to catch the green light (which are very frequent and

are shown to influence the emissions rate).

The intelligent traffic lights were used to periodically broadcast, for each road

segment controlled, the current traffic light color and the time until it will change.

This information is used by the decision algorithm proposed in chapter three,

Design and Implementation. The role of this algorithm is to help the driver to

1) avoid the red traffic light or 2) catch the green traffic light, if this is possible

and also results in reducing the quantity of emitted gases.

To decide if it is less fuel consuming to try to catch green/avoid red, by

accelerating/decelerating in order to reach the needed speed, a method to predict

the car movement was necessary. For this, we developed a simulator that uses

the motion ecuation of a car to predict its speed and position at any time.

The prediction of the movement of the car is the most challenging part of this

project. To be able to simulate a specific driver’s behaviour and know how the car

is going to move in different situations, is a very difficult task, as many parameters

must be taken into account (all the forces that act on the car - we have to know

even the weather conditions, and the human factor - which complicates very much

the algorithm and can ruin the results of the prediction). Although the results

obtained in chapter four, Experimental Results and Analysis, are promising, the

simulator was developed with many simplifications: in determining the motion

equation, just the x-axis was taken into account and the weather was ignored

52

Page 63: Adriana Szekeres

5.3 Experimental results of the decision algorithm - red traffic lights

(this means that the slopes and the curves of the roads were ignored - 3D maps

are needed to obtain complete information about the roads), the human factor

was much simplified (we assumed that, when accelerating, the driver increases

the engine’s rpm by ≈ 150).

In conclusion, much research and work must be done until a very accurate

version of this application can be deployed on cars. When 3D maps appear, the

only major problem that remains to be solved is the human factor. For this, we

propose three solutions that must be reasearched:

• building an application that is capable to learn the behaviour of the driver

using a history of his/her actions in different situations (the behaviour when

approaching a curve, the rate of acceleration when approaching a slope, etc.)

• letting the driver configure the application according to his/her driving style

• letting the application inform the driver not only about the needed speed

but also about how hard to push the throttle pedal by using, for example,

fuzzy logic.

Also, as future work, the integration with VNSim should be finished to enable

testing the application on complete scenarios (the interference with other cars

must be taken into account and VNSim already does that).

53

Page 64: Adriana Szekeres

References

Akcelik, R. & Besley, M. (2003). Operating cost, fuel consumption, and

emission models in aasidra and aamotion. 25th Conference of Australian Insti-

tutes of Transport Research. 24, 26

Bourg, D.M. (2002). Physics for Game Developers . O’Reilley. 3

Bureau, U.C. (2008). Topologically integrated geographic encoding and refer-

encing system. US Census Bureau, http://www.census.gov/geo/www/tiger,

accesed 2009. 21

Gorgorin, C. (2006). Information dissemination in vehicular ad-hoc networks.

University ”Politehnica” of Bucharest, Diploma Thesis. 30

Gorgorin, C., Gradinescu, V., Diaconescu, R., Cristea, V. & Iftode,

L. (2006). An integrated vehicular and network simulator for vehicular ad-hoc

networks. Proceedings of the 20th European Simulation and Modelling Confer-

ence, Toulouse. 20

Gradinescu, V. (2006). Vehicle ad-hoc networks: Adaptive traffic signal con-

trol. University ”Politehnica” of Bucharest, Diploma Thesis. 23, 26, 30

Haworth, N. & Symmons, M. (2001). Driving to reduce fuel consumption and

improve road safety. Proceedings Road Safety Research, Policing and Education

Conference, Melbourne. 14

Ichimescu, A. (2008). Optimizarea traficului in aglomeratii urbane. University

”Politehnica” of Bucharest, Diploma Thesis. 30

54

Page 65: Adriana Szekeres

REFERENCES

Nadeem, T., Dashtinezhad, S., Liao, C. & Iftode, L. (2004). Trafficview:

Traffic data dissemination using car-to-car communication. ACM Sigmobile

Mobile Computing and Communications Review, Special Issue on Mobile Data

Management , 8, 6–19. 23

Raya, M. & Hubaux, J.P. (2007). Securing vehicular ad hoc networks. Journal

of Computer Security, IOS Press , 15, 6–19. 18

55