• No results found

Development of a Vehicle Awareness Module for Bicycles

N/A
N/A
Protected

Academic year: 2021

Share "Development of a Vehicle Awareness Module for Bicycles"

Copied!
49
0
0

Loading.... (view fulltext now)

Full text

(1)

Development of a Vehicle

Awareness Module for Bicycles

CHARLENE SEQUEIRA

K T H R O Y A L I N S T I T U T E O F T E C H N O L O G Y

I N F O R M A T I O N A N D C O M M U N I C A T I O N T E C H N O L O G Y

(2)

Development of a vehicle awareness module for bicycles

Charlene Sequeira

cseq@kth.se

(3)

Acknowledgement

This thesis could not have been completed if it was not for a few people, who with their constant guidance and support helped me through this journey.

I would first like to express my deep gratitude to Professor Mark T. Smith and Kalle Ngo for their constant supervision and valuable inputs throughout this incredible journey. Thank you for helping me develop this idea as well as guiding me from the start to the reading of the thesis draft from time to time. Thank you for your patience and understanding.

I would also like to thank my supervisor at Cybercom Saqib Sarker, without his help when I was going through a tough time and support, I would not have been able to come this far.

I would also like to thank my friends Gabriel Andersson Santiago and Martin Favre for the Robot car that was vital in the testing of my project. A special thanks goes out to Nika Grom for helping me with the analysis of the data sets collected.

There are many other people that played an important part in the completion of my thesis that I would like to thank; my parents, my sister and all my friends for continuously encouraging and supporting me.

i

(4)

Abstract

Autonomous driving is one of the car industry’s major challenges. The next gener- ation of cars will not be driven by humans, but by the cars themselves. With the increase in the number of self driving cars, the pedestrians and bikers need to be walk and bike carefully. Bikers need to be careful even now, when we have human driven cars. While driving, sometimes a bike can be in the blind spot of the car and hence go unnoticed.

In this thesis, a small scale prototype was developed to help the bike riders when cycling on a street with cars and buses, know when there is a possibility of collision and avoid it. It uses the concept of Time of Flight (TOF) of an ultrasonic wave, to determine how far the moving vehicle is from the sensor. It can also be used to calculate the speed of a moving object. The ultrasonic waves are also used to differentiate between different types of vehicles.

Research was done to choose the appropriate sensing module and the communica- tion protocol. The system was tested and some conclusions were made.

ii

(5)

Inledning

Autonom körning är ett utav bilindustrins största utmaningar. Nästa generations bilar är inte framfört utav människor, utan de är självkörande. Med ökad andel självkörande fordon, måste fotgängare och cyklister vara försiktiga. Cyklister måste redan idag vara försiktiga, när vi har mänskliga bilförare. Vid bilkörning, kan cyk- lister hamna i den döda vinkeln och då vara svåra att upptäcka för föraren. I denna avhandling har en småskalig prototyp utvecklats för att hjälpa cyklister som cyklar på vägar tillsammans med bilar och bussar, att veta när det finns risk för kollision och undvika det. Den använder konceptet flygtid(Time of Flight, TOF) av ultraljud, för att bestämma hur stort avståndet är mellan det rörliga fordonet och sensorn.

Det är också möjligt att bestämma föremålets hastighet. Ultraljudet används också för att särskilja mellan olika typer av fordon. Forskning gjordes för att bestämma lämplig modul för avkänning samt kommunikationsprotokoll. Systemet testades och några slutsatser har gjorts.

iii

(6)

Contents

1 Introduction 1

1.1 Background . . . 1

1.2 Problem statement . . . 2

1.3 Goal . . . 2

1.3.1 Benefits, Ethics and sustainability . . . 3

1.4 Organization . . . 3

2 Accident Scenarios 4 2.1 Bike accident awareness . . . 4

2.2 Types of Collisions . . . 4

2.2.1 The Right Cross . . . 5

2.2.2 The Door Prize . . . 5

2.2.3 The crosswalk Slam . . . 5

2.2.4 The Wrong-way wreck . . . 5

2.2.5 The Red Light of Death . . . 6

2.2.6 The Right Hook . . . 6

2.2.7 The Right Hook part 2 . . . 7

2.2.8 The left Cross . . . 7

2.2.9 The Rear End . . . 7

2.2.10 The Rear End part 2 . . . 7

3 Background 8 3.1 Bike Safety . . . 8

3.2 Literature review . . . 8

3.2.1 Related work . . . 9

3.2.2 Methods to relay information to the riders . . . 14

4 Sensing technologies and Communication 15 4.1 Which Sensor should be used? . . . 15

4.1.1 Sensing Options . . . 16

4.2 How can the controllers communicate? . . . 18

4.2.1 Ethernet . . . 18

4.2.2 Communication Protocols: . . . 18

5 Method and Design 21 5.1 Theory of operation . . . 21

5.2 Experimental Setup . . . 22

5.2.1 Hardware Implementation . . . 22

5.2.2 Software Implementation . . . 24 iv

(7)

CONTENTS v 5.3 Flow Charts . . . 27

6 Results 33

6.1 Test data: . . . 33 6.2 LED grid display . . . 36

7 Discussion and Conclusion 37

7.1 Discussion and conclusion . . . 37 7.2 Future Work . . . 38

(8)

Chapter 1 Introduction

This chapter will explain the background of the problem and how the problem state- ment was developed. It will also give a brief overview of the report organization.

Bicycling is seen as a means to increase physical activity in the population and to reduce the air emission that induces climate change. The transportation system trouble and bad monitoring may cause accidents, traffic jams and road congestion which in turn put a heavy load on business and work, as people are pressured to reach work on time. Bicycling is often identified as a means by commuters to get to work or to perform various daily routines. In recent years, research has begun to report high numbers and high risks of injuries to bicyclists riding near trams.

According to research done by [1] and data provided by The Swedish Transport Administration, a total of 153 cyclists were killed between 2007 and 2012, while more than 44,000 were so badly injured that they were admitted to the Accident and Emergency department in Sweden. 8,400 of these injured cyclists were injured and about 1000 very seriously injured. About 90% of the accidents that happen are in urban areas. Around 69% of cyclists killed, lost their lives in collision with motor vehicles, usually cars.

With the advancement of technologies and the miniaturization of control devices, appliances and sensors have given the capability to build sophisticated smart and intelligent embedded systems to solve human problems and to facilitate the improv- ing life style.

1.1 Background

The urban mobility strategy [2] for Stockholm’s bike planing has set the goal that: "

The proportion of all journeys at peak hours performed by bicycles must be not less than 15% by 2030. According to [2], in Stockholm bicycles are used by about 10%

of the city’s inhabitants to travel to work or to school. Bicycle use is increasing and cycle paths are already congested at certain location and at specific times. Bikes are capable of relieving pressure from other means of transportation, however without

1

(9)

CHAPTER 1. INTRODUCTION 2 favorable infrastructure, they will not be able to relieve as much pressure as they are capable of.

One of the most important factors for increasing bicycle use is reserving the space in cycle lanes or cycle paths. When it is not possible to create a dedicated space, bicycles are forced to share the lane with other vehicles. Therefore steps are required to improve bike safety.

1.2 Problem statement

From [3], as of 2012, in Stockholm, the number of people riding bikes in the city was about 8%. The article also goes to show that compared to 5 years ago, people in Stockholm cycle 38% more. There are dedicated bicyclist paths in most parts of the city, but as soon as one moves towards the suburbs, there are none! The rider needs to move onto the road and ride with the cars. When this happens,the riders as well as the drivers need to be careful and watch out for the other. This is even harder when the bike or the car is in a blind spot of the driver and the rider respectively.

This can lead to an increase in the number bike accidents.

An initiative to help both the riders and the drivers avoid accidents needs to be taken. What if we can use engineering to make the life of the bikers a bit safer when they ride together with cars?

In this project, engineering will be used to improve the already existing infrastruc- ture, to help cyclists avoid collisions with cars and buses.

1.3 Goal

The project will be a proof of concept prototype, and a road in Kista Stockholm called Kistagången was taken into consideration while designing the prototype. The reason behind choosing Kistagången is that cars, buses, taxis and bicycles all share the same narrow street, and there is no way to alert the bike driver when there is a bus or car turning onto the street, nor any vehicle approaching from either side of the narrow street. The goal of this project is to make the life of cyclists safer and reduce the number of accidents that happen by showing them when there is an- other vehicle approaching or turning to the street. This way the cyclists can make informed decisions, about where and when they need to turn.

Unlike the many solutions proposed for this problem, this project will not create an add on for the bike, the car or the bus, Moreover it is a solution that is based on the development of already existing road infrastructure, i.e. A module will be designed as an add on to the street lights. Another difference in this prototype compared to others is that there are no cameras employed in the solution.

The prototype will be tested on a smaller scale indoors.

(10)

CHAPTER 1. INTRODUCTION 3

1.3.1 Benefits, Ethics and sustainability

• Since the design of the prototype is based on the improvement of already existing infrastructure, the owners of the vehicles do not need to invest more in a product for their respective vehicle.

• Since the project is also not going to make use of a camera, there is reduced computational and processing load, since images of vehicles do not need to always be compared to an already existing data set, to identify and classify which category the said vehicle belongs to.

• The main reason for not adopting the camera as a possible solution is to avoid infringing on the privacy of people.

• A possible risk is the lack of strong data security when it comes to embedded systems and IoT. In IoT when data is being shared between modules through a router, then there are chances of hackers, getting their hands on it. However in this case the data that is being transferred are integers.

1.4 Organization

The rest of the report is organized as follows:

Chapter 2 will introduce the types of possible collisions between bikes and vehicles.

The illustrations here will help the reader understand the problems of bike riders and will thus start the foundation for the problem statement.

Chapter 3 will go into detail about bike safety and the work that has already been done to improve the traffic conditions and safety for riders.

Chapter 4 will present all the possible sensing technologies that could be used in the project. This chapter will also have a brief explanation about communication in general. It will then move into more explanation about Ethernet (IEEE 802.3) as well as the working of the User Datagram Protocol (UDP)

In Chapter 5, the method and the system design will be presented. There will be a detailed explanation of the different types of hardware that was used as well as an explanation of the software.

The results from the prototype test will be in chapter 6.

Chapter 7 will contain a short discussion where the system will be evaluated and some conclusions will be drawn from it. It will also have a small section on the possible future work that can be done to improve the system.

(11)

Chapter 2

Accident Scenarios

Is biking more dangerous than driving in Sweden? This chapter will go into details explaining the different types of collisions that can occur between a bike and a car or a bus. This chapter will help give the reader an understanding about the problem and how it was developed.

2.1 Bike accident awareness

For many years there have been measurements showing an increase in bicycle use, particularly in urban centers. According to the results from the national travel sur- vey, which covers the entire population between 6-84 years registered in Sweden, provides a more general picture of the state of cycling and the development in dif- ferent age groups, different travel purposes and in cities of different size. Bicycle use is reported both as total distance traveled in kilometers, and as the number of trips where part of the trip is made by bicycle.

In an article by [4], ten times more people are seriously injured in bicycle accidents than previously believed, according to statistics by the Swedish Civil Contingencies Agency(MSB) in 2013. The figures show that 3500 cyclists annually get such serious injuries in accidents that they have to be cared for in hospitals for a minimum of 24 hours. Almost half of the serious injuries caused in Sweden’s traffic accidents involve cyclists, raising questions about the need for a new bicycle safety strategy.

2.2 Types of Collisions

Micheal Bluejay [5] has identified different scenarios where a collision between a bike and a car are possible.

4

(12)

CHAPTER 2. ACCIDENT SCENARIOS 5

Figure 2.1: The Right cross colli-

sion Figure 2.2: The Door prize

1

2.2.1 The Right Cross

This is the most common way to get hit (or almost get hit). This is when a car is pulling out of a side street, parking lot, or driveway on the right. There are two possible kinds of collisions here as shown in figure 2.1: Either the bike is in front of the car and the car hits it, or the car pulls out in front of the bike and the biker slams into it.

2.2.2 The Door Prize

A driver opens his door right in front of the bike. The biker runs right into it if he/she can not stop in time. This kind of crash as shown in figure 2.2 is more common than one might think. Many bikers are hit by the open doors and there are a couple that have even been killed[6].

2.2.3 The crosswalk Slam

As shown in figure2.3 imagine a scenario where a biker is riding on the pavement, He decided to cross the street at the crossing, and a car makes a right turn, and right into him! Divers aren’t expecting bikes in the crossing, and it’s hard for them to see bikes because of the nature of the turn. One study showed that pavement-riding is twice as dangerous than road riding[7].

2.2.4 The Wrong-way wreck

Figure2.4 shows a scenario where a bike is riding the wrong way, against the traffic and a car is making a right turn from a side street runs right into them! They didn’t

1The content below and pictures are from http://BicycleSafe.com . The author, Michael Bluejay [5] has given permission for his content to be re-printed with or without any change. The reprint permission can be found at, http://bicyclesafe.com/#reprint

(13)

CHAPTER 2. ACCIDENT SCENARIOS 6

Figure 2.3: The crosswalk slam Figure 2.4: The wrong-way wreck

Figure 2.5: The Red Light of

Death Figure 2.6: The Right Hook

see the bike because they were only looking at one side of the road, not expecting that someone will come towards them from the wrong direction.

2.2.5 The Red Light of Death

As shown in figure 2.5, the biker stops to the right of a car that is already waiting at a red light. The car can’t see the bike. When the light turns green, the biker moves forward and so does the car, turning right and right into the bike! Even small cars may hit a biker this way, the scenario is extremely dangerous when it’s a bus or a semi that a bike has stopped next to.

2.2.6 The Right Hook

This kind of collision happens when a car passes you and then tries to make a right turn directly in front of you or right into you as shown in figure2.6. They think that you are not going very fast just because you are on a bicycle, so it never occurs to them that they can’t pass you in time. Even if you have to slam on your brakes to avoid hitting them, they often won’t feel they’ve done anything wrong. This kind of collision is very hard to avoid because you typically don’t see it until the last second, and because there’s nowhere for you to go when it happens.

(14)

CHAPTER 2. ACCIDENT SCENARIOS 7

Figure 2.7: The Right Hook part 2

Figure 2.8: The Left Cross Colli- sion

Figure 2.9: The Rear End part 2 Figure 2.10: The Rear End

2.2.7 The Right Hook part 2

Assume(as shown in figure 2.7) a bike is passing a slow-moving car( or even another bike) on the right, when it unexpectedly makes a right turn straight into the bike!

2.2.8 The left Cross

A car coming towards a bike makes a left turn right in front of it or right into it as shown in in figure 2.8!

2.2.9 The Rear End

When stuck between two cars, imagine that a biker makes a move little to the left to go around a parked car or some other obstruction in the road and he gets nailed by a car coming up from behind as shown in figure2.10.

2.2.10 The Rear End part 2

As in figure2.9 A car runs into a bike from behind. This is what many cyclists fear the most but it is actually not that common. However it is one of the hardest collisions to avoid, since the biker is not usually looking behind. The risk is likely greater at night, and in rides outside the city where traffic is faster and the lighting is worse.

(15)

Chapter 3 Background

This Chapter introduces the relevant concepts and technologies that can be used to develop the prototype. Past research done in the related areas are summarized.

3.1 Bike Safety

In recent times there has been a lot of awareness being brought about for the case of global warming. Many governmental and private organizations are taking a lot of steps to make use of sustainable energy as compared to the nonrenewable sources.

People are also taking it upon themselves to contribute to the sustainable devel- opment of the environment, therefore the number of hobby and commuter cyclists is on a gradual rise. That being said, the percentage of cyclists is still very small compared to that of motor vehicles. Therefore, safety concerning bike riding has not been given enough attention. There are not many safety products that have been developed for bikes as compared to other vehicles. There are products that may help the cyclists upon impact, but there is a severe lack of products that can help alleviate the risk of sharing the road with automobiles.

3.2 Literature review

The literature review includes two sections in an attempt to gain understanding concerning cycling safety. The first section of the literature review lists a brief de- scription of all the related work that has been done on areas that are related to the development of the project. The second part explains the reason behind why a LED grid was chosen to display the data to the riders.

8

(16)

CHAPTER 3. BACKGROUND 9

3.2.1 Related work

Several factors affect bicycle accidents and the accident causes can often be a com- bination of various factors. Human aspects, the surrounding environment and tech- nology can all effect the accident cause of bicycle accidents.

According to [8] there are several measures taken to improve the safety and the conditions for the cyclists. One way can be to start from the accident causes for the bicycle accidents and see which measures are suitable for each cause. A part of the bicycle accidents were a direct result of poorly designed areas or paths for bicyclists.

For example, accidents that occur when the bicyclists swerves for other road user may be a result of poor design such as a too narrow bicycle paths. Well designed area or paths can be areas where bicyclists and other road users are separated do the number of conflicts decrease.

According to [9] bikers usually ride with the flow of traffic and the most dangerous situation for them is when they are being passed by a motorist from behind. As a result a biker needs to make a continuous effort to keep scanning for rear approach- ing vehicles. They came up solution called the Cyber-Physical Bicycle Design. The main goals of their system were to: detect and track vehicles that approach from behind, alert the biker in real time and distinguish between vehicles that approach a biker in both safe and unsafe manners. This system was implemented using a video based detection system, where the vehicle was first detected and then this vehicle is tracked so that the biker can be alerted at the right time.The system also employs an audio based detection system where it uses audio based sensing and analysis to detect the presence of any real- approaching vehicles. According to the paper, it is able to use a wind shielded audio sensor to detect vehicular sounds and since the sounds from a vehicle in directional, the audio-based system will be able to discrim- inate between rear and front approaching vehicles.

The paper about Real-time collision avoidance for pedestrian and bicyclist simula- tion [10] introduced a new collision avoidance model enabling the design of efficient realistic virtual pedestrian and cyclist behaviors. It is a force-based model which uses collision prediction with dynamic time-windows to predict future potential col- lisions with obstacles and other individuals.The basic idea of their model was to minimize the energy required to avoid an obstacle.

Reciprocal collision avoidance for multiple car like robots[11] presented research done on a method for distributed reciprocal collision avoidance among multiple non- holonomic robots with bike kinematics. The work on the proposed bicycle reciprocal collision avoidance, was built on the concept of optimal reciprocal collision avoid- ance. Optimal reciprocal collision avoidance is a collaborative collision avoidance method based on velocity obstacles, where each holonomic robot makes a similar collision avoidance reasoning and collision-free motion is guaranteed without oscil- lations.

The work done in [12] investigates the challenges and the requirements of an IoT

(17)

CHAPTER 3. BACKGROUND 10 implementation based on GPS trackers from a technological as well as consumer per- spective. The results were drawn from a field study with 32 users who were provided with e-bikes which had all been quipped with GPS units and GSP connectivity.They identified GSM coverage and service provider roaming as well as evidence confirming the technological challenges of GPS sensors especially with regard to completeness of data collection as potential sources of malfunctions with particular relevance in IoT settings. The paper also concluded that the performance of the e-bike was dependent on the amount of energy from its battery that was used to power the sensors. From the conclusions of the paper, it can be seen that there appear to be trade-offs between the completeness of data collected and the energy consumption.

The limitations of this study are:

• The focus of the contribution of the paper was more of a holistic approach on the implementation of IoT.

• The results were based on a small sample size of 32 participants

• The study was confined to Eastern Switzerland and it was performed during the months of August to December when there are not many bikes on the street.

The work done by [13] dwells in the traffic alert and collision avoidance systems (TCAS) used in aircrafts. The TCAS is organized into several elements. The surveillance sensors collect information like relative position and velocity of any other aircraft that is detected n the surroundings. This information is then passed to a set of algorithms to determine whether a collision threat exists. If there is a threat that is identified, another set of threat resolution algorithms determines an appropriate response. If the other aircraft also has TCAS, then the response is coor- dinated through a data link to ensure that each aircraft maneuvers in a compatible direction. This data collected is like advisory data that is then showed to the flight crew, and the pilot can take manual control of the aircraft.

Although this paper is about aircraft collision avoidance, a similar theory can be used for collision avoidance for automobiles and bikes.

In [14] there was research done on how you can use a wireless set of sensor networks for intrusion detection as well as target tracking. The approach there was based in a dense, distributes, wireless network of multi-modal resource-poor sensors combined into coherent sensor arrays that perform in situ detection and estimation. The study here was in the context of a security scenario called" A line in the Sand" and accord- ingly define the target, system, environment and fault models. The objective of the line in the sand approach is to identify a breach along a perimeter or within a region.

The intruding object here maybe an civilian, a soldier or a vehicle. The three funda- mental user requirements of the application here are target detection, classification and tracking. In [14] the system user specified several Quality of Service parameters that affect how well the system, detects, classifies and tracks targets. In addition to these parameters, the user defines the area or border to be protected. Successful detection requires a node to correctly estimate the target’s presence while avoiding false detections in which no targets are present.The work done here for sensing and detecting the different objects took into account the different ways each object can

(18)

CHAPTER 3. BACKGROUND 11 disrupt the environment.

[15] explores the necessity for increased cyclist safety in urban settings, leading to the birth of a product that aims to reduce the risk of accidents while heighten- ing the sense of safety overall. This project came up with a solution called the fireworks cycling sensor which was placed along the top tube of the bicycle frame, and the sensor system accurately detected an approaching vehicle from the cyclists blind spot. Once this detection was successful, it feeds this information back to the cyclists via lighting and changing the color of the LED’s depending on how close the vehicle is. This implementation was done using Light Detection and Ranging (LIDAR). In order to effectively monitor the blind spot of the cyclist, the LIDAR was attached to the seat post of the bike. The LIDAR was tested under three different experimental categories. One was a stationary range limit, which was to determine the maximum range of detection of the LIDAR. The main goal of the second experiment was to determine the field of view angle. The third experimental setup was to determine the detection rate of the LIDAR under multiple light con- ditions. This measure was needed for the project to ensure the effectiveness of the LIDAR as a detection sensor. The LED strip was emitting three different colors to indicate the nearness of the approaching vehicle. It was green when there was no vehicle that was detected by the LIDAR, Yellow when it detected a vehicle and Red when the approaching vehicle was in the danger zone i.e it was very near to the bike.

Another paper that used an ultrasound sensor system for collision avoidance was [16]. The study designed and implemented an ultrasonic sensor system for lateral collision avoidance of vehicles at low speeds. the sensor that was developed is useful in detecting vehicles, motorcycles, bicycles and pedestrians that pass by the lateral side of the vehicle. The design of the system was aimed for large vehicles. The design in [16] had the sensors installed along the side of the vehicle, and the range of the sensor was suppose to be between the range of 0.5m to 4m after taking into account the response time and the width of normal traffic. [16] had a warning system that consisted of 3 functional blocks.

• Ultrasonic distance: This was used to obtain the distance between the vehicle and the lateral objects.

• Reliable distance: Here the distance as filtered to give a more reliable mea- surement.

• Dangerous warning: The distance information from above was used to deter- mine a warning alarm.

[17] outlines some of the technology developments that are leading towards the au- tonomous vehicle, which could have great potential for cycling safety and for road safety in general in urban and rural areas. They provided a list of technologies that are necessary but not sufficient components of autonomous diving. The paper also included a section on GPS/Telecommunications warning system for the cyclist.

There are only very basic developments with regards to bicyclist and position sys- tems for the use in safety warning systems. According to [17] one possible solution

(19)

CHAPTER 3. BACKGROUND 12 could be having a device on the helmet or the bike communicating to a smart-phone an then the cloud which will update the bikes location using the GPS module. The car is then told where the bike is and the helmet or the handle bars also get a buzz if the car is nearby. The paper also list out the disadvantages of this proposed solu- tion which states that the cyclists will get the vibrations, but will not know where the vehicle is approaching from and if there is a lot of traffic on the road, then the helmet of the rider will continuously be vibrating.

[18] developed/researched a new VLSI smart sensor for collision avoidance. Their system employs the smart sensor paradigm in that the detectors and processing cir- cuitry are integrated on the on the one chip. The IC is composed of 60 channels of photo detectors and parallel processing elements. The developed insect vision sen- sor has a number of possible automotive applications and can either be used stand alone to can be integrated as part of a future Intelligent Vehicle Highway system (IVHS).The sensor is essentially a smart motion detector based on optical flow and in an IVHS environment would be expected to feedback hazard information such as frequency of blind spot hits, white line crossing hits, poor braking distance hits to the central control hub for identification of high risk Zones. The insect sensor in [18]

measures range, bearing and speed of the objects, tracks edges of objects only, it has cylindrical gradient index lens which is used and therefore no focusing is needed.

The chip accepts a real-time optical image and indicates the motion of the edges in the visual field. Form the outputs of the chip one can infer the bearing, range and the speed of the objects in the visual environment. According to [18] the advantage of a smart sensor that can mimic insect vision is that the image processing is sim- plified and can be integrated on the detector chip, creating a compact device ideal for mobile applications. In addition insects do not need any focusing.

The work done in [19] proposes the use of a wireless sensor network of cat’s eye augmented with embedded processing to monitor vehicle behavior on augmented roads. The primary goal of [19] is to provide drivers with an early warning of poten- tially dangerous situations that may arise. The basic idea of the research is to have sensors nodes placed along both sides of a road every few meters. The focus was for road accidents in Ireland and mostly on the two way single carriageways since most of the accidents in Ireland occur of this type. The nodes are equipped with magnetic sensors and after deployment they form an ad hoc radio network to ex- change informations about passing cars which is determined by the magnetometers between each car. The communication between the nodes consists of the relative positions and speeds of all the vehicles traveling along the road at a particular time and place. This information is then communicated to the vehicles so that the on board computers can use it to infer dangerous situations.

Traffic surveillance is currently performed with inductive loop detectors and video cameras for the efficient management of public roads. [20] proposed an alternative traffic monitoring system using wireless sensor networks that offers high accuracy and lower cost. The system in [20] consisted of a wireless sensors network and an ac- cess point. Traffic informations is generated at the sensor nodes and then transferred

(20)

CHAPTER 3. BACKGROUND 13 to the access point over radio. The wireless sensor network consists of a processor, a radio, a magnetometer, a battery and a cover for protection from the vehicles.

The sensor detects distortion of the Earth’s magnetic field caused by the vehicle.

Therefore the vehicle can be modeled by a composite of many dipole magnets. The paper uses the concept whereby then distortion depends on the size and orientation of the vehicle. To measure speed, [20] used a synchronized node pair with known separation. The measurements also gave the magnetic vehicle length using the esti- mated speed and occupancy from each node.

[21] proposes a system for smart highways for future cities. They proposed a wireless sensor based system which will be situated in the city roads and read the traffic data and sends it to the display or the road signs which are digital LED boards providing information about all data. The second part of the system consists of an accident detection system based on the use of a sound sensor. The sound sensor will record the sound of an accident. It stores this default sound and then keeps comparing the sound it hears to detect whether an accident has occurred or not. Other provisions made by the system were to detect if landslides have occurred or if there is a (low) bridge overflow.

The city of Zürich has been implementing a computer aided traffic control strategy for a very long time. This article [22] describes the currently implemented traffic control system of the city. The system employed in the city is modular and scalable, it is able to communicate through the network internally between intersections and externally with other applications. The system also offers a user friendly interface or development and maintenance. The main use of the project is in the intersections.

According to [22], when a car is approaching an intersection, it has probably driven over a detector during the approach. The detector sets off a counting signal which announces the arrival of the car towards the intersection or the departure from the last intersection. If the vehicle is a tram or a bus, the control algorithm either ex- tends or shortens the phases of the traffic light at the intersection to let the vehicle pass with high priority. The detectors in [22] detect metal that moves over them.

Detectors sometime tend to oscillate wrongly announcing several cars instead of only one. The traffic management system has the capability of identifying and correcting such errors. After the traffic light receives the signal of the car’s arrival, the traffic light transmits visually the decision of its control algorithm by either remaining red or switching to green.

[23] uses a neural network classification system coupled with a Polaroid sonar, and A/D data acquisition board in a Linux PC to detect objects. They did a time analysis on the information that was received in the echo of each pulse to classify the objects.

(21)

CHAPTER 3. BACKGROUND 14

3.2.2 Methods to relay information to the riders

When it comes to broadcasting information and displaying it to the riders, one must take into account the process of the brain and choose the applicable method of transmitting this information. When the brain wants to create a new memory, encoding is a crucial step. According to [24] encoding allows the perceived item of interest to be converted into a construct that can be stored within the brain. This construct can later be recalled later from either the short or long term memory.

The site continues to explain that encoding is a biological event beginning with perception through the senses. There are four main types of encoding:

• Acoustic encoding: This is the process of encoding sounds, words and other auditory input for storage and later retrieval.

• Visual encoding: In this process, images and visual sensory information is encoded.

• Tactile encoding: is the encoding of how something feels, normally through the sense of touch.

• Semantic encoding: is the process of encoding sensory input that has particular meaning or can be applied to a particular context, rather than deriving it from a particular sense.

According to research done by the university of Iowa [25] the probability of remem- bering short audio clips is very low. The findings of the study indicate that the brain may process auditory information differently than visual and tactile informa- tion. When the study was conducted with over 100 participants, that were exposed to a variety of sounds, visuals and things that could be felt, the participants were least apt to remember the sounds that they heard. The study continued with the intervals between the sounds, the visuals and the objects increased. As the interval between hearing. seeing and feeling and recalling these increased, the participants memory faded. However this memory fading was faster for sounds than for visu- als and objects. This experiment suggests that the way the mind processes and stores sounds may be different from the way it processes and stores other types of memories. There has been previous research that has suggested that humans may have a superior visual memory and the at hearing words associated with sounds rather than sounds alone may aid memory. According to an article [26], Interactive computer graphics and videos that add more senses to the mix, can make visual cues much stronger and improve visual memory. The more varied ways in which we are exposed to and interact the the material, the more likely one is to remember it.

Traffic signals are an essential element of modern and well maintained road infras- tructure. It helps regulate traffic and provides crucial visual guidance. From the material reviewed above, it can be seen that visuals have a greater impact on the brain compared to sound. In this project advantage is taken of that fact and visual aids are used to alert the rider of possible collisions and potential hazards on the roads.

(22)

Chapter 4

Sensing technologies and Communication

The selection of sensors is an important task in the design of sensor networks.

Choosing the right set of sensors for the application in question, can reduce cost, increase the systems performance and improve it’s lifetime. Chapter 4 will present an overview of the possible sensing technologies that can be used to solve the problem.

It will also explain why the sensor chosen was used. This chapter will also contain the basics of network communication as well as an explanation of the chosen protocol.

4.1 Which Sensor should be used?

Object identification and tracking has been an active area of research in robotics and many other surveillance applications. Tracking of an object can be achieved by using any sensor that generates a signal that is dependent on the distance of the target from the sensor.

Here we will discuss the different sensing modes appropriate for detecting our tar- gets: vehicles and persons on cycles.

[27], gives a good understanding of the different types of sensors that can be used for vehicle surveillance. The paper also says that a person is likely to disrupt the environment thermally, seismically, acoustically, electrically, chemically and opti- cally.Infrared energy is also emitted from the human body (body heat). The paper continues to say that a person’s body can be considered a dielectric that causes a change in an ambient electric field. A person also reflects and absorbs light rays which can be detected using a camera, scatters optical, electromagnetic, acoustic and ultrasonic signals. Similarly it can be seen that a vehicle also disrupt the en- vironment thermally, seismically, acoustically, electrically, magnetically, chemically and optically. Vehicle also emit a number of chemical gases, and reflect, scatter and absorb optical, electromagnetic and ultrasound signals.

15

(23)

CHAPTER 4. SENSING TECHNOLOGIES AND COMMUNICATION 16 Accordingly different sensing modalities such as ultrasound, radio frequency and infrared have been considered for tracking.

4.1.1 Sensing Options

This section reviewed a subset of sensors that are well suited for sensor networks, and can be possibly used for this application.

1. Infrared (IR) Range sensing

The way that infrared sensors work is by using infrared light. Two infrared LEDS are used one as a transmitter and the other as a receiver. The trans- mitter simply outputs like any normal LED. If any infrared light bounces off an object the infrared receiver outputs a voltage seemingly proportional to the intensity of that light.

One of the main disadvantages when using IR sensors is that the operation of active sensor may be affected by fog, as well as there maybe reduced sensitivity to vehicles in its field of view in rain and fog.

2. Radio Frequency(RF) presence detection

The Radio Frequency Identification (RFID)[28] system is composed of mainly two hardware components.The transponder which is located on the product to be scanned and the reader which can be either just a reader to a read and write device, depending upon the system design technology employed. The RFID reader characteristically comprises of a radio frequency module, a con- trolling unit for configurations, a monitor and an antenna to investigate the RFID tags. A lot of RFID tags are in-built with an extra interface allowing them to forward the data received to another system.

The RFID tags can be of three types. They can either be active tags, pas- sive tags or semi-passive tags. Each of the tags comprise of a chip and an antenna. The difference between an active tag and a passive tag is that, the passive tags do not have internal power source and are only powered on by the electromagnetic energy transmitted from an RFID reader. However an ac- tive RFID system use battery powered RFID tags that continuously broadcast their own signal. Semi passive RIFD tags use batteries and reply on the RFID reader signal to communicate.

RFID systems will require the bikes to have either the receiver or the transpon- der and the car/bus to have the other. This goes against the fact that this project is a solution based on infrastructure. Another problem is that the range for passive tags is very small and the battery for the active tag will need to be changed often

3. Proximity Sensors Each of the binary proximity sensors produce a single bit of output, which is 1 when one or more targets are in it’s sensing range and a 0 otherwise. These sensors are not able to distinguish individual tar- gets, decide how many distinct targets are in the range or provide any location

(24)

CHAPTER 4. SENSING TECHNOLOGIES AND COMMUNICATION 17 specific information. Despite the minimal information provided by a single bi- nary sensor, a collaborative network of sensors is known to yield respectable tracking performance.

The chosen sensor:

Ultrasonic range sensing

The time of flight (TOF) can be used to differentiate between different objects that move in front of the sensor. The ultrasonic range sensor can be used with Doppler effect to calculate the speed of the vehicle in question as well as detect which lane the vehicle is moving on.

(25)

CHAPTER 4. SENSING TECHNOLOGIES AND COMMUNICATION 18

4.2 How can the controllers communicate?

According to [29], a sensor node, battery energy is mostly consumed by the radio.

Therefore, the networks communication protocol, which determines how the radios are operated, has a decisive influence on battery lifetime. The research also states that there are Existing MAC protocols fall into one of the two categories: Ran- dom access and Time division multiple access (TDMA). Upon further reading and understanding, unlike TDMA, in random access the channels are not divided and therefore there are a number of collisions that occur.

4.2.1 Ethernet

The Ethernet standard (IEEE802.3), defines the possible bit rates, the frame format used and the realization of the bit coding.Ethernet shares the bus with every other network node that has the right to access the media.

Every network node has its own unique physical address. It is 48 bits long and called Media Access Protocol (MAC) address. The maximum length possible for an Ethernet frame is 1518 bytes. This size covers the whole frame, excluding the preamble. The preamble consists of alternating zeros and ones and is used for syn- chronization purposes. It is followed by the real frame. The first 48 bits are the destination and the second 48 bits are the source MAC addresses. After that, a 2 byte value indicating the type of the frame is sent. This type field is used to decide in the receiving stack to which upper level protocol the frame will be handed over.

Afterwards a maximum of 1500 data bytes can be transferred followed by a 4-byte automatically generated cyclic redundancy check (CRC) value. Using this CRC, the Ethernet ensures data integrity, but it does not ensure the delivery or in-order delivery of a packet.

4.2.2 Communication Protocols:

A communication protocol is a system of rules that allows two or more modules of a communication system to transmit information to each other. The protocols defines rules like syntax, semantics and synchronization of communication and possible er- ror recovery methods. All protocol have a fixed number of bytes which can be sent from one module to another which include a fixed number of bytes for the source address, the destination address and the data.

Transmission Control Protocol (TCP)

The Transmission Control Protocol (TCP) is one of the main protocols of the Inter- net protocol suite according to [30].The transmission control protocol provides host to host connectivity at the transport Layer of the Internet model. TCP provides a reliable packet delivery systems that is built on top of the IP protocol. TCP uses a

(26)

CHAPTER 4. SENSING TECHNOLOGIES AND COMMUNICATION 19 sequence number to identify each byte of data. The sequence number identifies the order of the bytes sent from each computer so that the data can be reconstructed in order, regardless of any packet reordering or packet loss that may occur during transmission. The TCP protocol is therefore reliable by detecting the lost data and retransmitting it. Some of the advantages of TCP are:

• TCP always guarantees that the data reaches its destination, reaches on time and reaches without duplication.

• TCP automatically breaks data into packets.

The main disadvantages of TCP are:

• It cannot be used for broadcast and multicast connections.

• Since TCP makes sure that all non-corrupt data is received in the receiver section, it cannot be used for real time applications, since the data when received at the receiver section may not be valid or of any importance.

User Datagram Protocol(UDP)

In communication [31], the User Datagram Protocol (UDP) is one of the core mem- bers of the Internet protocol suite. UDP provides an unreliable packet delivery system that is built on top of the IP protocol. As with IP, each packet is handled separately. Therefore the amount of data that can be sent in a UDP packet is lim- ited to the amount that can be contained in a single IP packet. Therefore a UDP packet can contain a maximum of 65507 bytes [32].

UDP packets can arrive out of order or not at all. Packets do not have any knowl- edge of the preceding or the following packet. The recipient does not acknowledge the packet and therefore the sender does not know if transmission was successful or not. Prior communications are not required in order to set up a transmission channel or a data path. UDP uses a simple connectionless transmission model with minimum protocol mechanism.

The destination IP address and port number are encapsulated in each UDP packet.

These two numbers together uniquely identify the recipient and are used to deliver the packet.

Some of the features of UDP are:

• checksums for data integrity

• port numbers for addressing different functions at the source and destination However, UDP does not have any handshaking and thus exposes the communication to unreliability i.e there is no guarantee of delivery, ordering or duplicate protection.

A summary comparison between TCP and UDP:

(27)

CHAPTER 4. SENSING TECHNOLOGIES AND COMMUNICATION 20

UDP is suitable for purposes where error checking and correction are either not necessary or are being performed in the application. Real time/Time sensitive ap- plications, often use UDP, the reason being that it is preferred to drop the packets than wait for delayed packets. Therefore the protocol that will be used in this project is User Datagram Protocol (UDP).

(28)

Chapter 5

Method and Design

This chapter presents the method that was followed for data collection as well as the design of the system. Each hardware module will be explained. The software implementation will also be explained.

The working of the system can be described in the following way: Sensor modules described below will be placed at every lamppost. When a vehicle passes in front of the modules, the type of vehicle will be distinguished from a bike, car and bus.

Each of the three vehicles have a specific color on the display which will be turned on and displayed by using an LED grid on the next sensor module for the bike rider to see.

5.1 Theory of operation

Each Sensor module will be placed on the side of the road, and comprises of two ultrasound sensors, an Arduino Uno with an Ethernet shield and an LED display Screen. The principle of operation of each sensor module is to first detect the pres- ence of a moving vehicle and then to calculate the speed and the direction of the movement. Each module should also be able to differentiate between the three pro- grammed vehicles i.e a bicycle, a car and a bus. Once this is done, each module will have a fixed pixel on the display board to display it’s results. This pixel position is fixed for the module in question and two consecutive modules ahead and behind.

As stated above, each of the modules will be placed at every consecutive lamppost.

The lamppost will serve as a reference point for the pixel position in the display.

In this prototype, since there were only three modules created and tested, the posi- tions were shared between all the sensor nodes.

21

(29)

CHAPTER 5. METHOD AND DESIGN 22

5.2 Experimental Setup

Each sensor nodes shown in 5.2 is made up of two ultrasound sensors, an Arduino Uno, an Ethernet shield and an Adafruit Neopixel shield 5.1. Since this project is a proof of concept, it will be mainly done for testing in an indoor environment. The bus and car will be simulated by using a robot car. The vehicle identification and decision making are described in the section 6.3.2 below.

Figure 5.1: Display

5.2.1 Hardware Implementation

The hardware implementation consists of the sensing system as well as the laboratory environment i.e the experimental setup with which the testing will be carried out.

In order to meet the requirements of the problem statement, a low cost system was designed using HCSR-04 sensors[33], an Arduino Uno [34] with an Ethernet shield[35] and an Adafruit Neopixel Grid [36]. Each sensor module looks like 5.2 The HCSR-04 sensor is a cheap ultrasound sensor which is perfect for indoor testing of the system, as described below in Section 6.1.1

Figure 5.2: Setup

HC-SR04

The HC-SR04 is an ultrasonic ranging module which provides 2cm -400cm non- contact measurement function. According to [33] the ranging accuracy of the HC- SR04 can reach to 3mm.

(30)

CHAPTER 5. METHOD AND DESIGN 23

Figure 5.3: HC-SR04

The sensor as shown in figure 5.3 includes an ultrasonic transmitter, a receive and a control circuit. The basic working principle is:

• A short pulse of 10 micro seconds is needed to trigger the input to start the ranging.

• The module will automatically send eight 40Khz pulses and detect whether is a signal is reflected back.

• If there is a signal that is reflected back, then this time of flight of the signal which is calculated by the Arduino can be used to find the distance between the sensor and the object that reflected the signal(object detected).

Since this application was being tested indoors, the HC-SR04 was chosen. However for application and use in out door environments, the SensComp [37] series 600 envi- ronmental grade ultrasonic sensor can be used. This sensor is intended for operation in air at ultrasonic frequencies. It has ranging capacities from 2.5cm to 15.2 meters.

They are also better suited for harsh environments.

Arduino Uno Rev3 and Arduino Ethernet Shield V1 1. Arduino Uno Rev3:

Arduino Uno is a micro-controller board based on the ATmega328P [38]. It has an operation voltage of 5V when powered with a USB, input voltage (limit) range 6-20V when powered by an external source. and 16Mhz clock frequency.

The Arduino Uno can be programmed with the Arduino Software IDE in C.

The ATmega328P has a 32KB memory. It also has 2KB of SRAM and 1KB of EEPROM.

(31)

CHAPTER 5. METHOD AND DESIGN 24 2. Arduino Ethernet Shield V1:

The Arduino Ethernet shield V1 allows an Arduino board to connect to the Internet. The Ethernet Shield V1 has a standard RJ-45 connection, with an integrated line transformer and Power over Ethernet enabled. Arduino communicates with both the Ethernet chip and SD card using the SPI bus.

However since the Ethernet chip and the SD card share the SPI bus only one can be active at a time. The reset button provided on the board resets both the shield and the Arduino board.

When using the shield, it must be assigned a MAC address and a fixed I ad- dress using the Ethernet.begin() function. A MAC address is a globally unique identifier for a particular device. Valid IP addresses depend on the configura- tion of your network.

Neo pixel grid

The display gird that will be used to relay information to the bike riders is the Adafruit Neo pixel shield for the Arduino. It is a 5x8 grid that is pixel addressable.

It can be powered through the Arduino, or by an external power source. The light from this 2.1"x 2.7" grid at medium intensity as used in the project can be seen at a average distance of 4 meters, and at maximum intensity at an average distance of 9 meters. The average distance was measured when the neo-pixel grid was tested to set the intensity of the pixels so that it can be viewed from a close distance during programming and testing.

5.2.2 Software Implementation

In this section, we will go into detail about the software algorithms of the programs that were used and the software implementation in the system. It is very important that the whole architecture has an event based structure, because the operation of the nodes is driven by environmental events such as a vehicle driving on the road.

The main task of the system is to:

• Calculate the speed of the vehicle moving in front of it

• Distinguish between the different types of vehicles that pass each sensor node.

• share the information computed by each node to all other nodes in the network.

• Display this information to the bike riders using an LED grid.

Speed

Ultrasound sensors have the ability to compute the velocity of a moving object us- ing the frequency shift, commonly known as Doppler effect. When a wave reflects

(32)

CHAPTER 5. METHOD AND DESIGN 25 off of a moving object, its frequency is shifted by an amount proportional to the velocity of the object. This fact can be exploited in ultrasonic sensing by having the receiver measure not the time of flight but the frequency of the returning echo pulse.

Knowing fe and fr, the frequency of the emitted and received pulse, respectively, the velocity v of the target may be calculated using : fe - fr = 2 fe (v / c) cos(A) This project originally was suppose to use this principle and just one sensor to calcu- late the frequency shift to find the speed of the moving vehicle. Unfortunately with the HC-SR04 ultrasonic sensor, the frequency shift that was obtained, was too little to be able to exploit the Doppler shift. Therefore another idea had to implemented.

It was then decided to have two sensors at a fixed distance and use the time the object takes to cover this fixed distance to calculate the speed of the moving object.

Below is the detailed explanation of the working.

Since the experimental setup used was indoors, a safe zone of 40cm was defined.

This implies that any object that appears in the field of view of the sensor, and is at a distance of less than 40cm is detected. Anything more that is at a distance of more than 40cm, will be ignored. The distance in centimeters between the object detected and the transceiver is calculated using time in uS/58 [33]. The safe zone was defined so as to avoid detecting random objects at the time of testing.

The micro-controller will send out a short 10us pulse to trigger the ultrasound sensor.

The sensor then sends out 8 pulses at 40KHz and then wait for an echo. If no echo is received in 38ms [33], the micro-controller will send out another pulse. Every time the micro-controller send out a pulse, the time stamp from the arduino using the millis() function. This function will return the number of milliseconds since the Arduino board began running the current program. For every trigger, the time of the micro-controller will be saved in a variable. The same is done after an echo is received.

The time of flight of the ultrasound wave is used to detect how far an object is from the sensor. If the object is within the predefined safe zone, then the time of the controller is recorded and stored in a variable. This is done for both the sensors in the module which are used both for transmitting as well as receiving. The difference between the two times recorded is converted into seconds. The distance between the two sensors is fixed. Together with the time, the speed of the vehicle detected can be calculated in centimeters per second as shown in figure 5.7.

The direction of movement of the vehicle can also be determined through the finding out the speed. Since the position of the two sensors in each module is fixed, the difference in the times recorded from each sensor can be either positive or negative.

If the difference is positive, this will result in a positive speed, thus indicating that the vehicle is moving in the direction that follows the order of the sensors in the module. If however the difference is negative, resulting in a negative speed, indicates that the vehicles is moving in the opposite direction.

Object recognition and Decision Making

The three types of vehicles that have been taking into consideration for this project are:

(33)

CHAPTER 5. METHOD AND DESIGN 26 1. Bicycles

2. Cars 3. Buses

The logic used to differentiate the three types of considered vehicles is the speed of movement and the length of each vehicle. In this case, the speed of a bicycle and the length of the bicycle are much smaller as compared to a car and a bus. The data for the classification was collected indoors by using a robot car. The motors of the car were first set to a known constant speed. The car was then made to drive in front of one sensor module so that a counter could be calibrated, by incrementing for every pulse of the ultrasonic wave that was received by the receiver of the sensor. This was done for different speed values so as to establish a range for the object counter.

When collected data for the bus, this same robot car was used, but there was an add on that was added to increase the length of the object. The same concept was used. After a couple of tests, the average values of the counter were used in the decision making algorithm as shown in figure 5.6. The decision making for the bike was set as an average value that was smaller than that required by the car, since to total surface area of the bike is smaller than that of the car or the bus.

Data transfer

The next step in this project is to have the data shared between each sensor node, in order to increase the safety of bike riders. Here the UDP protocol was used to share the data between each and every sensor node. In this proof of concept project, there are three nodes that are being used. All three of these are connected to each other using a router, and have static IP and MAC addresses that have been set.

The basic working of the UDP protocol for sending and receiving packets is stated in section 4.2 . Using this transfer protocol, the data between each sensor node is shared with each other, using a router and an Ethernet cable as illustrated in the flow chart 5.5 and 5.8.

Displaying data

When a vehicle is detected and the speed and direction of movement of the said vehi- cle is calculated, this information needs to be made public to the bike rides. This is done by means of a LED grid. Two of the rows in the grid, are white marking the end of the road and the beginning of the pavements on either side as shown in figure 5.4.

This is done by setting two columns of pixels to white i.e pixel value of 255 in this case. Each road has two lanes, and three different colors for visually differentiating and identifying the types of vehicles; Green is used for a bike, Blue for a car and Red to identify a bus as explained in figure 5.9. Using this method of displaying, it is easier for the bike rider to just look up at the grid and continue on with their journey.

(34)

CHAPTER 5. METHOD AND DESIGN 27

Figure 5.4: Display

As mentioned earlier, each module is placed at every lamppost, so that it can be used as a reference i.e a pixel position in this case for the display. If an object is detected at node 1 as well as node 2 all the displays will have the respective pixels illuminated for the driver to see. The indication of each vehicle is relative to the sensor node that it was detected at.

5.3 Flow Charts

In this section all the flowcharts for the algorithm explained above will be shown.

In order for it to be visible, the entire program has been divided into 5 smaller flowcharts.

(35)

CHAPTER 5. METHOD AND DESIGN 28

Figure 5.5: Theory of Operation Flowchart: the transmitter side

(36)

CHAPTER 5. METHOD AND DESIGN 29

Figure 5.6: Function for sensor1

(37)

CHAPTER 5. METHOD AND DESIGN 30

Figure 5.7: Function for sensor2

(38)

CHAPTER 5. METHOD AND DESIGN 31

Figure 5.8: Theory of Operation: the receiver side

(39)

CHAPTER 5. METHOD AND DESIGN 32

Figure 5.9: Display processing

(40)

Chapter 6 Results

The results obtained from testing the prototype are recorded and will be explained here.

6.1 Test data:

The prototype was tested in an indoor environment, and the test data was collected to analyze the system and draw some conclusions about the prototype. Below are the different ways the data collected was analyzed.

1. As explained in the previous chapter, the car used for testing was driven several times in front of the sensor at different speeds. A flat ground that measured 4 meters was used as a road. The three sensor modules were placed at a distance of 1 meter from each other. A robot car was first driven at a constant speed, and the object counter used was incremented for every ultrasound pulse that was received back. The average of the object counter was then calculated and a range was formulated. The test object was moved in both directions so as to check if the sensing module could detect the direction of movement of the object. An add-on was added to the car to increase the length to simulate a bus. Approximations were then made for the bike since it was not possible to simulate it.

• Figure 6.1 shows a difference between known simulated speeds and the recorded speeds.

• Each test object was run at the same speed 20 times to get the range of the object counter. The speeds simulated for a car and bus are show in figure 6.2

• The average value of the counter for all the speeds was calculated for both the bus and the car, and a range was then deduced as shown in figure 6.3.

33

(41)

CHAPTER 6. RESULTS 34

Figure 6.1: Simulated speed vs recorded speed

Figure 6.2: Average value of the counter for a car and bus at different speeds

Figure 6.3: Average counter value and counter range

2. Figure 6.4 shows the percent of true detection of a car and true detection of a bus.

Figure 6.4: Percent of correct detection

(42)

CHAPTER 6. RESULTS 35 3. The final test was run with different known speeds at different times and the data was collected from the tests.The percent of true data and garbage data that was received on the receivers side was calculated and shown in figure 6.5:

Figure 6.5: Percent of correct data being received at the receiver.

*Garbage data is defined as data in packets that were received as a mixture of char- acters & numbers, not in the way the packet was designed to be sent.

A packet that is transferred is suppose to have a speed identifier named s, followed by the value of the speed calculated with the sign to indicate the direction, followed by an Object counter identifier named o and the object counter. Therefore a general example of a packet transferred with the object moving in the positive direction i.e the set direction is "s+00.00o00.00" . This was the first 6 bits after the s identifier are for the speed and the 5 bits after the object identifier o are for the object counter.

A good packet that can be used to extract data from it looks like "s+39.06o28.00"

or " s-84.43o52.00 ". From these packets, you can see the direction of movement of the test object as well as the speed and from the table above, you can classify it as one of the two test objects. A garbage packet looks like "o10.00o10.00" here the object counter values that have been sent twice, instead of speed and object counter. A garbage packet could also look line "s+399.61o11.00". This packet is considered garbage, since the speed of the test object was never simulated at 399 cm/sec. Another case of a garbage packet is "so+32.8250.00". Here you cannot differentiate between which part of the packet is the speed and which is the object counter.

On comparison with the simulated known speed of the test object and the percent- age of correct data collected, as shown in the table above, there was a 98% match.

The 2% that didn’t match was the data that had a decimal value of more than 0.5 which was rounded to the next number.

(43)

CHAPTER 6. RESULTS 36

6.2 LED grid display

This section will contain some pictures from the tests that were run. In figure 6.6 you can see a car has been detected, and the corresponding blue has been lit on the other display. In figure 6.7, it can be seen that a bus is detected.

Figure 6.6: Car detected Figure 6.7: Bus detected

(44)

Chapter 7

Discussion and Conclusion

Inferences made from the results from the previous chapter will be discussed here.

The shortcomings of the system will also be discussed here. There is also a short section to discuss the possible future work of the project.

7.1 Discussion and conclusion

From the results in the previous chapter, figure 6.1 shows that 92.618% of the known simulated speed was detected by the module for a car, and 92.353% of the correct speed was detected for the bus.

It can also be seen that from 6 sample sets in Figure 6.5, the system have about 94.9% chances of receiving correct data that can be used for further processing and not data that is a mix of characters.One reason why some of the data that was received as mixture can be deduced by the fact that UDP keeps sending packets when ever they are ready.

The system can detect the presence in Real time and display it in real time as well, as seen in the picture in Chapter 6. From figure 6.4 it can be seen that the system on an average of 90.4% detects the presence of a car when it is a car and 91.33% for a bus.

One of the draw backs of the system is the fact that it cannot detect objects that are stationary. This can be a problem only if a car or bus stop in front of the sensor module. It will detect them both as a bus until the counter resets to 0, it will then start counting again and detect a car and then a bus again.

37

(45)

CHAPTER 7. DISCUSSION AND CONCLUSION 38

7.2 Future Work

The proof of concept was unable to do some features which can be worked on in the future. There are also other things which can be improved upon based on the already existing model. Some of them are:

• A prediction algorithm that can be used to predict the location of the vehicle traveling based on the speed and the node at which it was detected.

• The intensity of the display grid can change depending on the amount of sun.

When it is day and there is bright sun, the light needs to be brighter whereas in the dark nights, the intensity can be a lower.

• A built in function to notify when a sensor module and display needs mainte- nance.

• A comparison between the different network protocols which can be used for the communication of sensor data between the different modules.

(46)

Bibliography

[1] J. E. Anna Niska, “Statistik över cyklisters olyckor,” 2013. [Online]. Avail- able: https://www.diva-portal.org/smash/get/diva2:694821/FULLTEXT01.

pdf [Accessed on: 30th January 2017].

[2] D. Firth. Urban mobility strategy. [Accessed on: 2nd March 2017]. [Online]. Available: http://international.stockholm.se/globalassets/

ovriga-bilder-och-filer/urban-mobility-strategy.pdf

[3] L. Pignon. Cycling facts and figures. [Accessed on: 6th February 2017]. [Online].

Available: https://www.fourteenislands.com/753/cycling-facts-and-figures/

[4] R. Sweden. (2013) Bike accidents more common than thought: Swedish radio. [Accessed on: 30th January 2017]. [Online]. Available: http:

//sverigesradio.se/sida/artikel.aspx?programid=2054&artikel=5586968

[5] M. Bluejay. How not to get hit by cars. [Accessed on: 30th January 2017].

[Online]. Available: bicyclesafe.com

[6] M. B. rhys Southan, Ampersandy. Cyclist killed by dooring. [Accessed on:

30th January 2017]. [Online]. Available: http://bicyclesafe.com/doorprize.html [7] D. L. Alan Wachtel. Risk factors for bicycles. [Accessed on: 30th January 2017].

[Online]. Available: http://www.bicyclinglife.com/Library/riskfactors.htm [8] karl Borgstrand. Analysis of bicycle accidents in karlstad. [Accessed on: 3rd

March 2017]. [Online]. Available: http://publications.lib.chalmers.se/records/

fulltext/221363/221363.pdf

[9] S. Smaldone, C. Tonde, V. K. Ananthanarayanan, A. Elgammal, and L. Iftode,

“Improving bicycle safety through automated real-time vehicle detection,” De- partment of Computer Science Rutgers University, vol. 110, 2010.

[10] J. Buisson, S. Galland, N. Gaud, M. Gonçalves, and A. Koukam, “Real-time collision avoidance for pedestrian and bicyclist simulation: a smooth and pre- dictive approach,” Procedia Computer Science, vol. 19, pp. 815–820, 2013.

[11] J. Alonso-Mora, A. Breitenmoser, P. Beardsley, and R. Siegwart, “Reciprocal collision avoidance for multiple car-like robots,” in Robotics and Automation (ICRA), 2012 IEEE International Conference on. IEEE, 2012, pp. 360–366.

39

References

Related documents

The EU project Cooperative Vehicle Infrastructure Systems (CVIS) (3) focuses on enabling a wide range of cooperative services based mainly on vehicle-to-infrastructure

The simulations show that 802.11p is not suitable for periodic position messages in a highway scenario, if the network load is high (range, packet size and report rate) since

The variables that are to be used are the target yaw-rate estimated from the steering wheel angle

It is widely used in computer vision to relate corresponding points in a stereo image, to compute similarity between two points in object detection, and for video stabilization..

The framework consists of two components: a similarity metric between cases that is defined relative to a probability model and an novel case-based approach to justifying the

Med eller utan nikotin marknadsförs den som ett hjälpmedel för att sluta röka, ett hälsosammare alternativ till vanliga cigaretter och ett alternativ i miljöer där vanliga

Efter analys av de mätetal, KPI:er, som finns på Saab är konklusionen att det med fördel ska arbetas på ett differentierat sätt med olika KPI:er i respektive kvadrant. För att

Genom att ge barnen förutsättningar för att kunna göra dessa val exempelvis med miljön, olika rum för olika aktiviteter, eller genom att låta dem leka ostört i trygghet kan