31
Final Presentation 06/06/2005 Virtual Traffic Signal Virtual Traffic Signal Presented by: Ron Herman Ofir Shentzer Instructor: Mr. Mony Orbach Technion – Israel Institute Of Technion – Israel Institute Of Technology Technology Electrical Engineering Department Electrical Engineering Department

Final Presentation 06/06/2005 Virtual Traffic Signal Presented by: Ron Herman Ofir Shentzer Instructor: Mr. Mony Orbach Technion – Israel Institute Of

  • View
    218

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Final Presentation 06/06/2005 Virtual Traffic Signal Presented by: Ron Herman Ofir Shentzer Instructor: Mr. Mony Orbach Technion – Israel Institute Of

Final Presentation06/06/2005

Virtual Traffic SignalVirtual Traffic SignalPresented by: Ron Herman

Ofir Shentzer

Instructor: Mr. Mony Orbach

Technion – Israel Institute Of TechnologyTechnion – Israel Institute Of Technology

Electrical Engineering DepartmentElectrical Engineering Department

Page 2: Final Presentation 06/06/2005 Virtual Traffic Signal Presented by: Ron Herman Ofir Shentzer Instructor: Mr. Mony Orbach Technion – Israel Institute Of

The Basic Idea…One of The major factors in today’s car accidents is driver’s lack of attention.

a solution to this problem is a system whichproduces alerts in real time to the driver.

The system can identify a compromising situation tothe driver, according to pre-defined profiles, that characterize which approach to the traffic sign isdangerous.

Page 3: Final Presentation 06/06/2005 Virtual Traffic Signal Presented by: Ron Herman Ofir Shentzer Instructor: Mr. Mony Orbach Technion – Israel Institute Of

Block Diagram Remote DB server

GSM Card

GSM Handler GPS Handler

MySQL

Handler

Local DB server

User InterfaceController

Traffic Signs Container

GPS Card

Page 4: Final Presentation 06/06/2005 Virtual Traffic Signal Presented by: Ron Herman Ofir Shentzer Instructor: Mr. Mony Orbach Technion – Israel Institute Of

Design’s DescriptionThe Local DB holds the traffic signs relevant to the vehicle’s present location. This Information is synchronized with the vehicle’s orientation.

The Controller interacts with a Remote DB (holding the entire set of traffic signs) via GSM cellular communication.

A request for update is sent by the Controller to the GSM card, and the relevant data is retrieved from the Remote DB, according to the current location.

Each pre-defined time interval, the Controller unit Checks whether the vehicle is in a compromising situation, and if so, a warning signal is sent to the driver through the User Interface.

Page 5: Final Presentation 06/06/2005 Virtual Traffic Signal Presented by: Ron Herman Ofir Shentzer Instructor: Mr. Mony Orbach Technion – Israel Institute Of

Class Diagram

See Attached Word Document…

Page 6: Final Presentation 06/06/2005 Virtual Traffic Signal Presented by: Ron Herman Ofir Shentzer Instructor: Mr. Mony Orbach Technion – Israel Institute Of

Class Diagram (Cont.)

MySQL – the local database server.GPS – data manipulations.Controller – information processing.Signs - holds signs types.GUI – the user interface.GSM – connecting the remote DB

Page 7: Final Presentation 06/06/2005 Virtual Traffic Signal Presented by: Ron Herman Ofir Shentzer Instructor: Mr. Mony Orbach Technion – Israel Institute Of

Class: MySQL

This class enables access to a mySql server which is used as the local database.

Through it we can query for specific signs’ data necessary for the controller.

This class is an object oriented wrapper for simplifying access to mySql server.

Page 8: Final Presentation 06/06/2005 Virtual Traffic Signal Presented by: Ron Herman Ofir Shentzer Instructor: Mr. Mony Orbach Technion – Israel Institute Of

The Local DatabaseThe local DB is implemented using MySQL-server, for better performance and modularity.

Each record in the DB represents a traffic sign of some sort, using the following identifiers:

Area of operation: direction, location, effective- radius, opening-angle.Identity: sign-type, sign-SN. (serial

number) and comment.

(example in next slide…)

Page 9: Final Presentation 06/06/2005 Virtual Traffic Signal Presented by: Ron Herman Ofir Shentzer Instructor: Mr. Mony Orbach Technion – Israel Institute Of

The Identifiers In Practice

Visible in this drawing are the Area of operation (the shaded triangle), the

sign’s direction, the work-angle, the effective radius.

Page 10: Final Presentation 06/06/2005 Virtual Traffic Signal Presented by: Ron Herman Ofir Shentzer Instructor: Mr. Mony Orbach Technion – Israel Institute Of

MySQL DB screen shot

Page 11: Final Presentation 06/06/2005 Virtual Traffic Signal Presented by: Ron Herman Ofir Shentzer Instructor: Mr. Mony Orbach Technion – Israel Institute Of

Class: GPS

The GPS class handles two tasks:

Retrieve GPS data samples (velocity, location, direction).

Manipulate the retrieved data, such as calculating absolute distance or speed and several location vector calculations.

Page 12: Final Presentation 06/06/2005 Virtual Traffic Signal Presented by: Ron Herman Ofir Shentzer Instructor: Mr. Mony Orbach Technion – Israel Institute Of

Class: Controller

The controller processes input data from the database and the GPS.

Utilize it to recognize compromising situations.

If the controller decides such situation exists, it sends appropriate alerts to the user.

Page 13: Final Presentation 06/06/2005 Virtual Traffic Signal Presented by: Ron Herman Ofir Shentzer Instructor: Mr. Mony Orbach Technion – Israel Institute Of

The “Magic” behind the decision…The Controller has to identify a compromising situation based on the car’s location and speed and a set of signs stored in the database.

All the sign’s are extracted from the database.

Sign’s area of operation is check to see if it holds the current car’s location.

This decision is made by a special function called “isInRange”.

“isInRange” gets the sign’s parameters (direction and opening angle) and checks if the car is in the sign’s view range.

(see next slide for illustration)

Page 14: Final Presentation 06/06/2005 Virtual Traffic Signal Presented by: Ron Herman Ofir Shentzer Instructor: Mr. Mony Orbach Technion – Israel Institute Of

Is In Range? …

Page 15: Final Presentation 06/06/2005 Virtual Traffic Signal Presented by: Ron Herman Ofir Shentzer Instructor: Mr. Mony Orbach Technion – Israel Institute Of

The “Magic”… (cont.)Once we found that the car is in the sign’s range of operation, “isSafe” method is executed, to check if the sign’s profile is met.

If the car violates the sign’s profile a proper alert is invoked.

The “isSafe” method is a member of the sign class, and will be reviewed in the following slides.

Page 16: Final Presentation 06/06/2005 Virtual Traffic Signal Presented by: Ron Herman Ofir Shentzer Instructor: Mr. Mony Orbach Technion – Israel Institute Of

Making the decision - flow chart

Get GPSsample

get all signfrom DB

For eachsign S on our

road do:

Is car in sign’sangle of operation

Is car facing the sign?

Is car in sign’sradius?

S.isSafe ?

Invoke alert

Start

No

No

No

No

Yes

Yes

Yes

Yes

Page 17: Final Presentation 06/06/2005 Virtual Traffic Signal Presented by: Ron Herman Ofir Shentzer Instructor: Mr. Mony Orbach Technion – Israel Institute Of

Class: SignsSigns is in fact a container which holds all the signs familiarized by the system, such as stop sign, slow sign, etc…

Each sign is an object for itself.

All the signs inherits from a super object while using the polymorphism mechanism.

Page 18: Final Presentation 06/06/2005 Virtual Traffic Signal Presented by: Ron Herman Ofir Shentzer Instructor: Mr. Mony Orbach Technion – Israel Institute Of

The Sign ObjectEach Sign must implement a certain function called “isSafe”.

The “isSafe” method is a virtual method which each sign implements differently, according to it’s profile.

“isSafe” checks whether our current car’s statuscomplies with the profile.

(example in next slide…)

Page 19: Final Presentation 06/06/2005 Virtual Traffic Signal Presented by: Ron Herman Ofir Shentzer Instructor: Mr. Mony Orbach Technion – Israel Institute Of

Example : “Stop Sign” ProfileStop Sign Profile

0

5

10

15

20

25

Distance

Distance (meters)

Velo

cit

y

( mete

r

/ sec

)

Velocity

100m 50m

This profile is based on Galileo's equation:

:

220

where

xavvelocity

x denotes distance and v0 denotes speed at distance of 0 meters

Page 20: Final Presentation 06/06/2005 Virtual Traffic Signal Presented by: Ron Herman Ofir Shentzer Instructor: Mr. Mony Orbach Technion – Israel Institute Of

Class: Graphical User InterfaceThe user interface was implemented using MFC concepts.

The interface displays the warning messages to the user.

It also displays additional information for better understanding of the running simulation, such as:

The current GPS sample data.a radar-like view of the surrounding signs. (100 meter radius)a view of the closest sign.

(screen shot available in next slide)

Page 21: Final Presentation 06/06/2005 Virtual Traffic Signal Presented by: Ron Herman Ofir Shentzer Instructor: Mr. Mony Orbach Technion – Israel Institute Of

GUI screen shot

Page 22: Final Presentation 06/06/2005 Virtual Traffic Signal Presented by: Ron Herman Ofir Shentzer Instructor: Mr. Mony Orbach Technion – Israel Institute Of

Updating the local DB –“Paging”The model divides an area into 9 pages. (each on represents a 2Km by 2Km of square area).

The aim is to keep the vehicle in the center page (out of the 9 squares).

Each movement to an outside page leads to an update: acquiring three new pages instead of three pages that are thrown away.

A page

Page 23: Final Presentation 06/06/2005 Virtual Traffic Signal Presented by: Ron Herman Ofir Shentzer Instructor: Mr. Mony Orbach Technion – Israel Institute Of

Paging (Cont.)N

Here is an example of how the model operates:

A vehicle in the center page is moving north

Three south pages are deleted from the local database

Three new pages taken from the remote DB replace them in the north

Ultimately, the vehicle remains in the center page

Page 24: Final Presentation 06/06/2005 Virtual Traffic Signal Presented by: Ron Herman Ofir Shentzer Instructor: Mr. Mony Orbach Technion – Israel Institute Of

Frequent page swapping

Problem: if the vehicle “hops” between the borders of a page, the mechanism will react with frequent page swapping.

Produces:Downgrade in performanceHigh and unnecessary communication traffic

Page 25: Final Presentation 06/06/2005 Virtual Traffic Signal Presented by: Ron Herman Ofir Shentzer Instructor: Mr. Mony Orbach Technion – Israel Institute Of

Frequent page swapping (cont.)

Solution: “Schmidt Trigger”• Only when the vehicle passes the red outer border, a page swap will take place.

• Now, when in the new center page, only if the green border is crossed, a page swap will occur.

•Thus, a “Schmidt Trigger” mechanism was created.

new

old

Page 26: Final Presentation 06/06/2005 Virtual Traffic Signal Presented by: Ron Herman Ofir Shentzer Instructor: Mr. Mony Orbach Technion – Israel Institute Of

Alternative Model

•The “moving balloon”: theoretically most effective model.

•The vehicle remains centered at all times. Areas are added/removed in crescent shapes.

•Problem: Hard to implement under current infrastructure

Page 27: Final Presentation 06/06/2005 Virtual Traffic Signal Presented by: Ron Herman Ofir Shentzer Instructor: Mr. Mony Orbach Technion – Israel Institute Of

Algorithm OptimizationThe identification algorithm has been improved.

Used to be: scanning all the records in the local database

Problem: Requires considerable amount of computing powerslow reaction time

Solution: Denote each sign with a corresponding road numberKeep track of the road number the vehicle is onScan only signs which match the road

Records with same road num

Entire DB

Page 28: Final Presentation 06/06/2005 Virtual Traffic Signal Presented by: Ron Herman Ofir Shentzer Instructor: Mr. Mony Orbach Technion – Israel Institute Of

Pseudo Signs

The system makes use of pseudo signs

These signs:Denote the road numberPlanted in the database.Equipped with special identity label Located at the start of every roadwayScanned like any other record

There exists an insignificant tradeoff since the pseudo signs also take part in the scan.

Page 29: Final Presentation 06/06/2005 Virtual Traffic Signal Presented by: Ron Herman Ofir Shentzer Instructor: Mr. Mony Orbach Technion – Israel Institute Of

The GPS coordinates generatorIn order to be independent of the GPS card, a GPS card simulator had to be built.

The simulator objective is to produce a set of coordinates and corresponding velocity values which ultimately represents a route.

Route is created by using time slots. Each slot represents one instruction which can be:

Acceleration (negative/positive values)TurnStop

A collection of such instructions creates a single route.

Page 30: Final Presentation 06/06/2005 Virtual Traffic Signal Presented by: Ron Herman Ofir Shentzer Instructor: Mr. Mony Orbach Technion – Israel Institute Of

The GPS coordinates generator- screen shot

Page 31: Final Presentation 06/06/2005 Virtual Traffic Signal Presented by: Ron Herman Ofir Shentzer Instructor: Mr. Mony Orbach Technion – Israel Institute Of

06/06/2005