road traffic monitoring system based on mobile...

13
Research Article Road Traffic Monitoring System Based on Mobile Devices and Bluetooth Low Energy Beacons Marcin Lewandowski, 1 BartBomiej PBaczek , 1 Marcin Bernas , 2 and Piotr SzymaBa 3 1 Institute of Computer Science, University of Silesia, Sosnowiec, Poland 2 Department of Computer Science and Automatics, University of Bielsko-Biala, Bielsko-Biala, Poland 3 Institute of Innovative Technologies EMAG, Katowice, Poland Correspondence should be addressed to Bartłomiej Płaczek; [email protected] Received 28 February 2018; Revised 25 June 2018; Accepted 11 July 2018; Published 17 July 2018 Academic Editor: Carlo Giannelli Copyright © 2018 Marcin Lewandowski et al. is is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. e paper proposes a method, which utilizes mobile devices (smartphones) and Bluetooth beacons, to detect passing vehicles and recognize their classes. e traffic monitoring tasks are performed by analyzing strength of radio signal received by mobile devices from beacons that are placed on opposite sides of a road. is approach is suitable for crowd sourcing applications aimed at reducing travel time, congestion, and emissions. Advantages of the introduced method were demonstrated during experimental evaluation in real-traffic conditions. Results of the experimental evaluation confirm that the proposed solution is effective in detecting three classes of vehicles (personal cars, semitrucks, and trucks). Extensive experiments were conducted to test different classification approaches and data aggregation methods. In comparison with state-of-the-art RSSI-based vehicle detection methods, higher accuracy was achieved by introducing a dedicated ensemble of random forest classifiers with majority voting. 1. Introduction Road traffic is a complex phenomenon, where various enti- ties (pedestrians, cars, trucks, busses, tramps, bicycles, etc.) interact one each other, when using common infrastructure. e traffic management and control, due to infrastructure constraints and rising number of vehicles, is a complex task and requires application of dedicated algorithms together with precise traffic data (both historical and current) [1]. e information about number of vehicles and their types is helpful in reducing travel times and emissions [2]. Precise traffic data allows us not only to increase effectiveness of traffic control, but also to adapt management policy to changing conditions and predict infrastructure bottlenecks [3]. e precise traffic data can be provided by traffic monitor- ing systems that are usually integrated with road infrastruc- ture. Such systems allow detecting and classifying the vehicles in selected areas by using data from sensors (inductive loops, video-detectors, magnetometers, etc.) [4]. A major drawback of the solutions integrated with infrastructure is a low flex- ibility and significant maintenance cost. To overcome these drawbacks, applications of new technologies (e.g., wireless sensor networks) in traffic monitoring are considered [5]. Such solutions can facilitate installation and reconfiguration of the system. However, the cost is still significant. us, in this paper an alternative method was proposed, which was inspired by the crowd sourcing approaches and utilizes iBeacon techniques for vehicle detection and clas- sification. Crowd sourcing [6] is a distributed model, in which a crowd solves or helps to solve a complex problem. Crowd sourcing utilizes mobile workforce and unique fea- tures, which could be found in smartphones. Smartphones offer a great platform for extending existing applications due to multisensing capabilities: geolocation, audio, and visual sensors. ey could be used to provide precise data about current traffic at given location. In contrast to the approximation models proposed in [7], where mobile device is situated inside a vehicle, this paper proposes a new system with mobile devices (smartphones) and beacons situated by the road. In order to detect vehicles, the proposed system measures signal strength of frames received from Bluetooth beacons. Hindawi Wireless Communications and Mobile Computing Volume 2018, Article ID 3251598, 12 pages https://doi.org/10.1155/2018/3251598

Upload: others

Post on 13-Jul-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Road Traffic Monitoring System Based on Mobile …downloads.hindawi.com/journals/wcmc/2018/3251598.pdfIt should be noted that the intro-duced system structure, which includes BLE beacons

Research ArticleRoad Traffic Monitoring System Based on Mobile Devicesand Bluetooth Low Energy Beacons

Marcin Lewandowski1 BartBomiej PBaczek 1 Marcin Bernas 2 and Piotr SzymaBa3

1 Institute of Computer Science University of Silesia Sosnowiec Poland2Department of Computer Science and Automatics University of Bielsko-Biala Bielsko-Biala Poland3Institute of Innovative Technologies EMAG Katowice Poland

Correspondence should be addressed to Bartłomiej Płaczek placzekbartlomiejgmailcom

Received 28 February 2018 Revised 25 June 2018 Accepted 11 July 2018 Published 17 July 2018

Academic Editor Carlo Giannelli

Copyright copy 2018 Marcin Lewandowski et al This is an open access article distributed under the Creative Commons AttributionLicense which permits unrestricted use distribution and reproduction in any medium provided the original work is properlycited

The paper proposes a method which utilizes mobile devices (smartphones) and Bluetooth beacons to detect passing vehicles andrecognize their classes The traffic monitoring tasks are performed by analyzing strength of radio signal received by mobile devicesfrombeacons that are placed on opposite sides of a roadThis approach is suitable for crowd sourcing applications aimed at reducingtravel time congestion and emissions Advantages of the introduced method were demonstrated during experimental evaluationin real-traffic conditions Results of the experimental evaluation confirm that the proposed solution is effective in detecting threeclasses of vehicles (personal cars semitrucks and trucks) Extensive experiments were conducted to test different classificationapproaches and data aggregation methods In comparison with state-of-the-art RSSI-based vehicle detection methods higheraccuracy was achieved by introducing a dedicated ensemble of random forest classifiers with majority voting

1 Introduction

Road traffic is a complex phenomenon where various enti-ties (pedestrians cars trucks busses tramps bicycles etc)interact one each other when using common infrastructureThe traffic management and control due to infrastructureconstraints and rising number of vehicles is a complex taskand requires application of dedicated algorithms togetherwith precise traffic data (both historical and current) [1]The information about number of vehicles and their typesis helpful in reducing travel times and emissions [2] Precisetraffic data allows us not only to increase effectiveness oftraffic control but also to adapt management policy tochanging conditions and predict infrastructure bottlenecks[3]

Theprecise traffic data can be provided by trafficmonitor-ing systems that are usually integrated with road infrastruc-ture Such systems allow detecting and classifying the vehiclesin selected areas by using data from sensors (inductive loopsvideo-detectors magnetometers etc) [4] A major drawbackof the solutions integrated with infrastructure is a low flex-ibility and significant maintenance cost To overcome these

drawbacks applications of new technologies (eg wirelesssensor networks) in traffic monitoring are considered [5]Such solutions can facilitate installation and reconfigurationof the system However the cost is still significant

Thus in this paper an alternative method was proposedwhich was inspired by the crowd sourcing approaches andutilizes iBeacon techniques for vehicle detection and clas-sification Crowd sourcing [6] is a distributed model inwhich a crowd solves or helps to solve a complex problemCrowd sourcing utilizes mobile workforce and unique fea-tures which could be found in smartphones Smartphonesoffer a great platform for extending existing applicationsdue to multisensing capabilities geolocation audio andvisual sensors They could be used to provide precise dataabout current traffic at given location In contrast to theapproximation models proposed in [7] where mobile deviceis situated inside a vehicle this paper proposes a new systemwith mobile devices (smartphones) and beacons situated bythe road In order to detect vehicles the proposed systemmeasures signal strength of frames received from Bluetoothbeacons

HindawiWireless Communications and Mobile ComputingVolume 2018 Article ID 3251598 12 pageshttpsdoiorg10115520183251598

2 Wireless Communications and Mobile Computing

According to the proposed traffic monitoring approacha wireless network is composed of smartphones and battery-powered beacons The beacons and the smartphone devicesare placed on opposite sides of a road The smartphonesregister broadcasted beacons frames and collect values ofreceived signal strength indicator (RSSI) The proposedmethod utilizes RSSI data collected by mobile devices (egsmartphones) to recognize passing vehicles in a given areaThese tasks are performed by using a proposed ensemble ofclassifiers which significantly increases the vehicle detectionand classification accuracy

The novel aspects of this study include (1) proposal of avehicle detection and classification system which is suitablefor the crowd sourcing applications (2) design of classifierensemble that enables utilization of RSSI data for accuratevehicle detection and classification (3) verification of thenew Bluetooth-based traffic monitoring system in real-trafficconditions

The paper is organized as follows Section 2 includes asurvey of related literature Details of the proposed hybridtraffic monitoring system are discussed in Section 3 Exper-iments and their results are described in Section 4 Finallyconclusions are given in Section 5

2 Related Works and Contribution

Smartphones become the round-the-clock interface betweenuser and the environment which integrates the Internetnetwork (via WiFi 2G3G4G5G) with local-area networks(eg Bluetooth new generation NFC or Portable WiFiwhich allows the smartphone to act as a router and sharethe cellular connection with nearby devices) [6] It is worthnoting that each of these communication standards is char-acterized by different energy consumption and data transferparameters [8] Smartphone devices possess powerful com-putational capabilities and are equipped with various func-tional built-in sensors [9] that have enabled the developmentof mobile sensing technologies [10ndash14] Among them crowdsensing [12] plays important role due to the possibility ofcollecting useful data The crowd sensing approach utilizeslarge amounts of participants to monitor the surroundingenvironment by means of various sensors accelerometergyroscope compass microphone camera GPS and wirelessnetwork interfaces

The mobile sensing technologies were used for the devel-opment of noise detection [14] social behavior monitor-ing [15] health monitoring of disabled patients [16] andindoor localization [17 18] Another example is an accurateand energy-efficient smartphone-based traffic lane detectionsystem for vehicles which can detect different lane-levellandmarks with accuracy above 90 [19] Several solutionswere also proposed for road traffic monitoring [20 21]These solutions provide the GPS localization data for vehicletracking They require the mobile device to be present invehicle thus not all vehicles can be tracked in this way

In this paper a method is proposed which allows thesmartphones placed in road surrounding (eg on sidewalksin pedestriansrsquo pockets) to be used for traffic monitoringAccording to the introduced method vehicle detection and

classification is performed by analyzing strength of radiosignal received from Bluetooth beacons

Up to date several efforts have been made to explorethe possibility of vehicles detection and localization viachannel state information (CSI) [22] received signal strengthindicator (RSSI) [23 24] link quality indicator (LQI) andpacket loss rate [25]

A method which uses wireless transmission to detectroad traffic congestion was proposed in [25] This methodrequires a pair of wireless transmitter and receiver Thetransmitter continuously sends packets The receiver whichis placed on opposite side of a road evaluates RSSI LQI andpacket loss metrics It was shown that these metrics enablerecognition between free-flow and congested traffic stateswith high accuracyThemethod was implemented and testedwith use of ZigBee motes

Similar ZigBee network was adapted in [24] for vehiclesdetection The experimental results presented in that workconfirm that a vehicle passing between the network nodescauses a drop of RSSI value It was also observed that thegradient of RSSI drop depends on the vehicle speed

In [26] a method was introduced for vehicle detectionand speed estimation which is based on RSSI analysis innetwork composed of two WiFi access points and two WiFi-equipped laptops Mean value and variance of RSSI measure-ments were used to discriminate between three states emptyroad stopped vehicle and moving vehicle The experimentalresults reported in [26] show that variance of RSSI decreaseswith increasing speed of vehicle This dependency was usedfor speed estimation

Another WiFi-based traffic monitoring system was pre-sented in [22]This system utilizes single access point and onelaptop to provide functionalities of vehicle detection classifi-cation lane identification and speed estimation Accordingto that approach CSI patterns in WiFi network are capturedand analyzed to perform the trafficmonitoring tasksTheCSIcharacterizes signal strengths and phases of separate WiFisubcarriers

In [23] a radio-based approach for vehicle detection andclassification was introduced which combines ray tracingsimulations machine learning and RSSI measurements Theauthors have suggested that different types of vehicles havespecific RSSI fingerprints This fact was used to perform amachine-based vehicle classification The RSSI values wereanalyzed in awireless network of three transmitting and threereceiving units which were positioned on opposite sides of aroadThe six wireless units weremounted on delineator postsand equipped with directional antennas It was demonstratedthat such system is able to detect vehicles and categorizethem into two classes (passenger car and truck) It wasalso demonstrated that traffic lanes in a two-lane road havedifferent distributions of CSI data This fact was utilized toidentify in which lane a vehicle is detected

The wireless networks have been also used for detectionof parked vehicles In order to detect the parked vehiclesthe transmitting nodes are placed on parking space andthe receiving nodes are installed at a high location Whena vehicle is parked over the transmitting node a decreaseof the RSSI value is registered Thus the vehicles can be

Wireless Communications and Mobile Computing 3

M

M

MM

B

B

B

Figure 1 Placement of mobile devices (M) and beacons (B)

easily detected based on simple RSSI analysis Differentsystems of this type were implemented with use of CC1101wireless communication modules [27] and XBee motes[28]

The above-discussed methods from the literature arenot suitable for the crowd sourcing applications as theyrequire energy-expensive data transfers (WiFi) or specializedhardware (ZigBee modules directional antennas) The newapproach proposed in this paper utilizes the Bluetooth lowenergy (BLE) communication which is commonly availablein smartphones According to the introduced approach BLEbeacons are usedwith iBeacon protocol [29] to broadcast dataframesThebeacon frames are registered by smartphones thatcollect the RSSI measurements aggregate them and send toa server for further analysis It should be noted here thatthe BLE beacons are cheap battery-powered devices that canwork for a long time (years) without battery replacementor charging Moreover the use of BLE communicationsignificantly extends the lifetime of smartphone battery incomparison to WiFi transmission [30] Nevertheless beacondiscovery has a significant impact on smartphone batteryusage thus the discovery time interval should be plannedcarefully The application of BLE communication for RSSI-based vehicle detection and classification has not beenconsidered previously by other authors This study involvesdetailed verification of the above-mentioned solution in real-traffic conditions

Another important drawback of the existingmethods liesin limited accuracy of vehicle detection and classification Toovercome this drawback a new ensemble of classifiers wasdesigned in this study which accurately detects vehicles andrecognizes three vehicle classes based on RSSI data collectedfrom multiple smartphones

The existing methods utilize single classifiers to detectvehicle and recognize its class In the related works the RSSI-based vehicle classification was implemented with use ofvarious classificationmethods artificial neural networks [22]k-Nearest Neighbor (k-NN) support vector machine (SVM)[23] decision trees [31] and logistic regression [32] A SVMmethod was adopted in [23] to train vehicle classificationmodels and categorize vehicles into two classes (passenger carand truck) The state-of-the-art algorithms are trained usingraw data [23] or a set of predefined features [31 32] To thebest authorsrsquo knowledge classifier ensembles have not been

previously adapted to deal with the RSSI-based road trafficmonitoring tasks

In machine learning literature various ensemble meth-ods are presented which combine several classifier systemsthat use different models or datasets [33] Several boot-strapping methods were considered (bagging or boosting)which allows us to optimize classifier ensembles [34] ormerge classifier decision [35] Research in [36 37] showsthat combined classifier can outperform the best individualclassifier under some conditions (eg majority voting by agroup of independent classifiers) That works have motivatedthe approach described in this paper which involves designand verification of classifier ensembles for traffic monitoringwith use of the RSSI data In comparison with the state-of-the-art methods that are based on single classifiers theproposed approach enabled more accurate vehicle detectionand classification

3 Proposed Method

The proposed vehicle detection and classification systemutilizes RSSI data collected by mobile devices (eg smart-phones) in a predetermined region on the side of the roadMobile devices measure signal strength when receiving radioframes from BLE beacons across the street The RSSI valuestogether with information about position of the device aretransmitted to a server which performs data aggregation andclassification

Structure of the proposed traffic monitoring system ispresented in Figure 1 It should be noted that the intro-duced system structure which includes BLE beacons andmobile devices has not been considered in the literatureThe BLE beacons are installed at different heights becausesuch arrangement is suitable for vehicle classification ierecognition of personal cars semitrucks and trucks [32]Beacons use the iBeacon protocol [29] to broadcast framesThe mobile devices on the opposite side of the road useBLE communication to collect incoming beacon frames andevaluate their RSSI Position of the device can be determinedbased on both the RSSI information and the GPS signal Thecollected data are transmitted to a server via cellular networkor WiFi communication

According to the iBeacon protocol three fields in thebroadcasted frames are available that identify the sending

4 Wireless Communications and Mobile Computing

1 while mobile device is active do

2 begin

3 t= current time

4 repeat

5 if new beacon frame received and RSSI gt threshold then

6 add record (time position beacon ID RSSI) to buffer

7 until (current time - t) gt T8 send records from buffer to server

9 end

Algorithm 1 Mobile device operations

1 create table Records with columns time position beacon ID RSSI

2 create table Events with columns time event type

3 at each time step do

4 if New records received then

5 begin

6 Records= Records union New records

7 time min = select min(time) from New records

8 time min = time min - window size

9 Selected records = select from Records where time gt= time min

10 Aggregates= aggregation( Selected records window size )

11 New events = events recognition (Aggregates)

12 Events = events update (Events New Events )

13 End

Algorithm 2 Server operations

beacon UUID (universally unique identifier) Mayor andMinor value UUID contains 32 hexadecimal digits splitinto 5 groups separated by hyphens The iBeacon standardrequires also Mayor and Minor value to be assigned Thosetwo values help to identify beacons with greater accuracythan using the UUID alone The Minor and Major valuesare unsigned integers between 0 and 65535 The purpose ofthe UUID is to distinguish beacons in a given network frombeacons in other networks For instance the same UUIDcan be used for all beacons in a traffic monitoring systemwhich coversmany detection areasMajor values are intendedto identify a group of beacons eg all beacons in a certaindetection area can be assigned a unique Major value FinallyMinor values are intended to distinguish an individualbeacon The Minor value can be used for distinguishingindividual beacons installed at different heights within adetection area In this paper the 3-tuple of UUID Major andMinor fields is referred to as beacon ID

In this study new algorithms (Algorithms 1ndash5) weredesigned and implemented to enable accurate vehicle detec-tion and classification with use of BLE beacons and mobiledevices Details of the operations performed bymobile deviceare presented in Algorithm 1The received beacon frames areignored if the RSSI is below a predetermined threshold In theopposite situation a new data record is created and written toa buffer The data record contains information about framereception time device position ID of frame sender (beacon)and RSSI value The content of the buffer is periodically sent

to the server Frequency of these data transfers is controlledby parameter 119879 It should be noted that the beacon framescollection and data transfer to server can be performed inparallel if appropriate hardware solution is available

The objective of server operations (Algorithm 2) is torecognize event type based on the data records delivered frommobile devices The event type determines if the monitoredroad section was empty or a car was present in this sectionduring transmission of beacon frames Additionally the typeof the event indicates class of detected vehicle (personal carsemitruck or truck) According to the proposed method thetype of the event is recognized using a classifier ensemble(Algorithm 4)

Before execution of the classification procedure the inputdata are aggregated The proposed aggregation procedureis based on so-called sliding window concept [38] (Algo-rithm 3) It means that if a new data record is receivedwhich contains RSSI value for time t then the aggregationoperation refers to a collection of data records for which theframe reception time 1199051015840 satisfies condition t ndash 119908 le 1199051015840 let where 119908 is size of the time window Such collection ofdata records is used to calculate aggregates (statistics) ofRSSI values ie minimummaximum average and standarddeviation Separate aggregates are determined for each pairof the transmitter (beacon) position and the receiver (mobiledevice) position The positions of beacons do not changethus they are identified by the beacon ID In contrast currentposition of mobile device is assigned to the nearest reference

Wireless Communications and Mobile Computing 5

1 Input Records window size

2 Output Aggregates

3 create table Aggregates

4 with columns time min 1 1 max 1 1 min m n max m n

5 Times= Select time from Records

6 for each t in Times do

7 begin

8 for refPos = 1m do

9 for bID = 1n do

10 begin

11 RSSI data = Select RSSI from Records

12 where time is between t - window size and t

13 and distance(position refPos ) lt= d max

14 and beacon ID = bID

15 min refPos bID = min( RSSI data )

16 max refPos bID = max( RSSI data )

17 end

18 Insert t min 1 1 max 1 1 min m n max m n into Aggregates

19 End

Algorithm 3 Aggregation function

1 Input Aggregates

2 Output New events

3 create table New events with columns time event type

4 Times= Select time from Aggregates

5 for each t in Times do

6 begin

7 votes= empty array

8 for each classifier in ensemble

9 begin

10 [a b]= classifier range

11 data= Select min a 1 max a 1 min b n max b n

12 from Aggregates where time = t

13 event type = classifier(data)

14 votes[ event type ]= votes[ event type ] + classifier weight

15 end

16 event type = arg max (votes[ event type ])

17 Insert t event type into New events

18 End

Algorithm 4 Events recognition function

1 Input Events New events

2 Output Events

3 New times = Select time from New events

4 Times= Select time from Events

5 for each t in New times do

6 begin

7 event= Select from New events where time = t

8 if t is in Times then Delete from Events where time = t

9 Insert event into Events

10 End

Algorithm 5 Events update function

6 Wireless Communications and Mobile Computing

position It should be noted that a set of reference positionsin the region of interest on the side of the road has to bedetermined in advance

Details of the proposed data aggregation procedure arepresented by the pseudocode in Algorithm 3 For the sakeof simplicity it was assumed in this pseudocode that onlytwo statistics are to be calculated (maximum andminimum)In practical applications the number of statistics has to belarger as discussed in Section 4The symbolsmin refPos bIDand max refPos bID in Algorithm 3 denote the minimumand maximum RSSI value determined for frames sent frombeacon bID and received by amobile device close to referenceposition refPos in time window [t ndash 119908 t] The statementthat a mobile device is close to a reference position meansthat its distance to the reference position is below d max Itshould be noted that d max is set to be lower than half oftheminimumdistance between reference positions thus eachmobile device is assigned to single reference position Thenumber of reference positions and the number of beacons inAlgorithm 3 are denoted by119898 and n respectively

As it was already mentioned above in this section thetype of the event (which relates to vehicle presence and class)is recognized based on the aggregated RSSI data by usinga classifier ensemble (Algorithm 4) The proposed ensembleconsists of classifiers that are fed with various subsets of theaggregated data A different set of the reference positionsfor which the RSSI data are collected is assigned to eachclassifier in the ensemble Hereinafter this set will be referredto as the classifier rangeThe reference positions are identifiedby natural numbers 1 m Thus the classifier range canbe defined by a pair [a b] where 1 le a le m and a leb le m The range [119886 119887] means that the input dataset ofthe corresponding classifier includes the aggregates (egmin refPos bID and max refPos bID) that were determinedfor the reference positions refPos = a b In case of range[1 119898] the classifier utilizes the complete dataset On the otherhand the classifierrsquos input dataset includes the RSSI readingsfor only one reference position when a =b

For each classifier in the ensemble a weight is determinedwhich corresponds to number of the classifierrsquos votes Thetotal number of votes for a given event type is calculatedby adding the weights of the classifiers that have recognizedthis particular event type As a result the event type whichreceives the highest total number of votes is selected Incase of a tie the class which has higher a priori probabilityis selected Weights of the classifiers are adjusted duringtraining procedure with use of the evolutionary strategy [39]

In this study application of various machine learningalgorithms was considered for implementation of the pro-posed ensemble (support vector machines random forestprobabilistic neural network and k-nearest neighborsrsquo algo-rithm) [31 40] A separate training dataset which includesclasses (ie event types) determined by human observer wasused to train the classifiers

After the events are recognized an update of the vehiclesclassification and detection results is conducted in accor-dance with Algorithm 5This update is necessary because thenew results can be related to time moments for which someevents have already been recognized The new results are

Beacons

Referenceposition 1

Referenceposition 2

Referenceposition 3

Referenceposition 4

4 m

8 m

Figure 2 Test site with reference positions and beacons

Figure 3 Mobile application used for data collection

more credible as they take into account additional recentlycollected data Thus the previous results are deleted Finallythe table Events includes the information about event type forall time points covered by the available RSSI dataset It shouldbe also noted that in this study four event types are considered(empty road presence of personal car semitruck and truck)

4 Experimental Results

Usefulness of the proposed vehicle detection and classifica-tion method was verified during experiments in real-worldtraffic conditions A schemaof the test site aswell as distancesbetween reference positions and beacons is presented inFigure 2 Three BLE beacons were installed on road sideat height of 50 100 and 200 centimeters above the roadsurface This configuration was selected as providing themost promising results on the basis of preliminary tests [32]On the opposite side of the road four reference points weredetermined in equal distances of 4 meters In this area theRSSI measurements were conducted using four smartphonesRedmi 3S held at a height of about 1 meter near to thereference positions The data were collected in a periodof two hours During that period more than 400 vehicleshave passed through the analyzed road section A mobileapplication was developed to enable effective collection ofthe experimental data (Figure 3) Additional mobile deviceswere used by observers to record the events related topresence of vehicles in front of the reference locations withrecognition of three vehicle classes (personal car semitruck

Wireless Communications and Mobile Computing 7

minus95

minus90

minus85

minus80

minus75

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

RSSI

[dBm

]

Time [s]

C D D T

C - carD - semi truckT - truck

(a)

minus95

minus90

minus85

minus80

minus75

RSSI

[dBm

]

Time [s]1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

C D D T

C - carD - semi truckT - truck

(b)

Figure 4 Example of collected data (a) reference position 1 and (b) reference position 4

and truck) All themobile deviceswere synchronized viaNTPprotocol

Examples of collected records for two different referencepositions are presented in Figure 4 The vertical red linesin Figure 4 show the time instances when passing vehicleswere registered by the observers The labels below verticallines denote class of the vehicles These results show thatthe vehicles cause visible changes of RSSI for both locationsMoreover the signal noise increases with distance betweenbeacons and mobile device (Figure 4(a))

For the experimental purposes the collected data weredivided into training and test datasets The experiments wereconducted to evaluate the accuracy of automatic vehicleclassification based on the collected data with use of differentmachine learning algorithms ie support vector machines(SVM) random forest (RF) probabilistic neural network(PNN) and k-nearest neighborsrsquo algorithm (KNN)

The SVM algorithm [41] performs classification tasks byusing hyperplanes defined in a multidimensional space Thehyperplanes that separate training data points with differentclass labels are constructed at the training phase SVMemploys an iterative training procedure to find the optimalhyperplanes having the largest distance to the nearest trainingdata point of any class The larger distance results in lowergeneralization error of the classifier

In case of RF classifier [42] the training procedure createsa set of decision trees from randomly selected subset of train-ing data Each tree performs the classification independentlyand ldquovotesrdquo for the selected class Finally the votes fromdifferent decision trees are aggregated to decide the class ofa test object At this step the RF algorithm chooses the classhaving the majority of votes from particular decision trees

PNN [43] includes three layers of neurons (input layerhidden layer and output layer) The neurons in hidden layerdetermine similarity between test input vector and the train-ing vectors To evaluate this similarity each hidden neuronuses a Gaussian function which is centered on a trainingvector The hidden neurons are collected into groups onegroup for each of the classes There is also one neuron in theoutput layer for each classThe output neuron calculates classprobability on the basis of values received from all hiddenneurons in a given group As a result the posterior probabilityis evaluated for all considered classesThe final decision of theclassifier is the class with maximum probability

KNN algorithm [44] computes distances between thetest data point and all training data points in feature space

072073074075076077078079080081

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20k

Vehicle classification accuracy

Figure 5 Impact of parameter k (number of the nearest neighbors)on accuracy of KNN algorithm

Afterwards k training data points with the lowest distancesare selected as the nearest neighbors The test data point isassigned to the class which is most common among the k-nearest neighbors

During experiments the classification accuracy was com-pared for several RSSI-based traffic monitoring approachesincluding the proposed solution and the state-of-the-artmethods from the literature This comparison takes intoaccount the method with one receiver [25] solutions withmultiple spatially distributed receivers and single classifierwhich detects the vehicles based on a complete RSSI dataset[22 23] and the new introduced algorithmwith the ensembleof classifiers

Initial experiments were conducted to calibrate parame-ters of the algorithms In these experiments vehicle classifi-cation was performed with use of 8 aggregates (minimummaximum difference between max and min mean stan-dard deviation median Pearson correlation coefficient andnumber of received frames) The aggregates were calculatedbased on the RSSI data collected in four reference positionsin accordance with Algorithm 3

Accuracy of the KNN algorithm was tested for parameterk (number of the nearest neighbors) in range between 1and 20 Results of the tests are presented in Figure 5 Basedon these results the value k = 7 which gave the highestclassification accuracy was selected for further experiments

Figure 6 shows the classification accuracy that wasachieved by using the RF algorithm with different number

8 Wireless Communications and Mobile Computing

070

075

080

085

090

095

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20number of decision trees

Vehicle classification accuracy

Figure 6 Accuracy of random forest algorithm for different numberof decision trees

045

055

065

075

085

095

1 2 3 4 5 6Window size [s]

Vehicle classification accuracy

Random ForestKNN

Figure 7 Impact of window size parameter on accuracy of RF andKNN algorithms

of decision trees It can be observed in these results that theaccuracy does not change significantly for the number ofdecision trees above 5 However the accuracy achieved forthe tree number between 6 and 9 was slightly lower than forthe RF with 10 trees A little decrease of the accuracy wasalso observed for the tree number above 10Therefore duringexperiments described later in this section the number ofdecision trees was set to 10 It should be also noted that thecomplexity of the algorithm increases when using a larger setof the decision trees

The impact of the window size on vehicle classificationaccuracy was also examined during the preliminary exper-iments The window size was changed from 1 to 6 secondswith steps of 1 second As shown in Figure 7 for RF andKNN algorithms the best results were obtained when usingthe window size of 3 seconds In case of larger windows theclassification accuracy decreases because the data registeredfor multiple vehicles are aggregated in one window Similarresults were also observed for SVM and PNN algorithmsThus the 3-second window was used in further experiments

088

089

090

091

092

093

Noattributeremoved

Minimum Maximum Average Standarddeviation

Median Framecount

Difference Pearsonscorrelationcoefficient

Removed attribute

Vehicle classification accuracy

Figure 8 Impact of attribute selection on accuracy of RF algorithm

At the next step the most effective set of attributeswas selected with use of the backward elimination methodResults of the elimination for the RF algorithm are presentedin Figure 8 At the beginning the classification accuracy wastested using full dataset with 8 aggregates The result of thistest is shown by the leftmost bar in Figure 8 Next tests wereperformed for the 8 datasets that were created by removingparticular aggregates (attributes) As shown in Figure 8an improvement of the vehicle classification accuracy wasachieved after deletion of the ldquodifferencerdquo attribute (ie thedifference between maximum and minimum) Thus thereduced dataset includes 7 aggregates minimum maximummean standard deviation median Pearson correlation coef-ficient and number of received frames Further eliminationdid not improve the results It was verified that the deletionof the ldquodifferencerdquo attribute is beneficial for all consideredclassification algorithms

Table 1 shows the vehicle detection and classificationaccuracy obtained for the basic approach which takes intoaccount the signal strength measured by a single device[25] (in one reference position) These results were obtainedafter the above-discussed initial search of the best algorithmparameters As it was already mentioned in previous sectionin case of the vehicle classification task four classes ofevents are considered empty road presence of personal carsemitruck and truck For the vehicle detection problem twoclasses are taken into account empty road and presenceof a vehicle The accuracy (ACC) was calculated as overallaccuracy using the following formula

ACC =sum

ni=1 CiD

(1)

where n is number of classes Ci is number of items (events)in the test dataset that are correctly assigned to ith class (eventtype) and D is number of items in test dataset

It should be also noted that the results in Table 1 arepresented for the two classification algorithms that providethe best accuracy These results firmly show that the most

Wireless Communications and Mobile Computing 9

Table 1 Accuracy of vehicle detection and classification based on data collected in one reference position

Reference position Vehicle classification accuracy Vehicle detection accuracyKNN RF KNN RF

1 0788 0817 08486 08642 0702 0699 07311 08013 0725 0804 07807 08594 0822 0861 08982 0932

Table 2 Accuracy of vehicle classification based on data collected in four reference positions

Window size [s]Classification algorithm

RF KNN PNN SVMACC CK ACC CK ACC CK ACC CK

2 0885 0801 0619 0287 0533 0099 0525 00003 0922 0865 0809 0658 0684 0403 0561 00894 0914 0853 0773 0582 0802 0639 0734 05335 0843 0729 0794 0630 0629 0286 0538 00366 0799 0651 0747 0549 0728 0512 0559 0088

accurate vehicle classification and detection was possiblewhen the mobile device is placed opposite the beacons loca-tion (in reference position 4)The results confirmobservationthat noise in RSSI readings increases with the distance frombeacons to mobile device It should be also noted that thenumber of RSSI samples that are collected when a vehicleis present between beacons and mobile device decreaseswith the speed of the vehicle As a result lower accuracyis observed for higher speed of vehicles In the consideredtest site the vehicles were slowing down when passingthe reference position 1 since this position was close to acrossroadThus the accuracy obtained for reference position1 is higher than for reference positions 2 and 3

In further tests the other approachwas considered whichis based on application of multiple receivers and one classifier[22 23] According to this approach the vehicles wererecognized by single classifier using the dataset collectedin four reference positions Results of these experimentsare shown in Table 2 The classification accuracy (ACC)and Cohenrsquos kappa [45] (CK) is compared in Table 2 forall considered classification algorithms and various sizes ofthe sliding window When comparing the results in Table 2with those in Table 1 it can be observed that the RSSIdata collected by multiple devices in several locations alongthe road enable more accurate vehicle classification Similarexperiments were also conducted for the vehicle detectiontask and the accuracy of 0935 was achieved

The results in Table 2 firmly show that size of the slidingwindow has a significant impact on the accuracy of vehicledetection and classification Passing vehicles cause a dropin RSSI level This drop is longer for trucks and shorter forpersonal cars In order to correctly recognize the vehicle thesliding window has to cover the time when RSSI values arereduced If the sliding window is to narrow the lower RSSIvaluesmay be registered in entirewindow for different vehicleclasses and thus the classes cannot be correctly recognizedIf single classifier is used a wider window is also helpful

because the drop of RSSI is shifted in time for differentreference locations However in case of an excessive windowsize two successive vehicles can be captured in one windowwhich results in decreased accuracy of the detection andclassification The best result results were obtained by usingthe random forest classifier with window size of 3 seconds

The next step of the research was aimed at increasingthe accuracy of vehicle detection by using the proposedclassifier ensemble in combination with majority voting asdescribed in Section 3 It should be noted that the proposedmethod was used with time step of 1 second and d max =1 meter During the tests of the ensemble different rangesof individual member classifiers were taken into account(see Table 3) The input data of individual classifiers wereobtained not only from particular reference positions (egClassifier 1 in Ensemble no 1) but also from a connection ofthe neighboring positions (eg Classifier 1 in Ensemble no3) When analyzing the results presented in Table 3 it canbe observed that the highest accuracy was achieved for theensembles of the random forest classifiersThe best ensemble(no 5) combines the classifiers that are fed with data fromtwo neighboring reference positions (Classifiers 1-3) with theclassifier created for reference position 4 (Classifier 4) andthe classifier which utilizes the entire dataset (Classifier 5)Classifier 4 with range [4 4] was included in the ensembleas it provides the best accuracy when using data from singlereference position The high accuracy was also obtained forEnsembles no 2 and 6 Results of these ensembles are onlyslightly worse than those for Ensemble no 5 This fact showsthat the proposed approach achieves high vehicle classifica-tion and detection accuracy by combining local classifiers(that utilize data from two neighboring reference positionsor single reference position) with the global classifier (whichmakes decisions based on data collected in all referencepositions)

It was noted that the random forest algorithm wasabout 85 more effective than KNN The proposed method

10 Wireless Communications and Mobile Computing

Table 3 Accuracy of vehicle detection and classification with use of the proposed classifier ensemble

Ensemble no Classifier range Vehicle classification accuracy Vehicle detection accuracyClas 1 Clas 2 Clas 3 Clas 4 Clas 5 KNN RF KNN RF

1 [1 1] [2 2] [3 3] [4 4] - 0862 0890 0906 09562 [1 1] [2 2] [3 3] [4 4] [1 4] 0862 0935 0898 09613 [1 2] [2 3] [3 4] - - 0799 0922 0854 09634 [1 2] [2 3] [3 4] [4 4] - 0833 0922 0898 09695 [1 2] [2 3] [3 4] [4 4] [1 4] 0846 0943 0898 09776 [1 2] [2 3] [3 4] - [1 4] 0825 0940 0854 09697 [1 3] [2 4] - - - 0781 0911 0752 09378 [1 3] [2 4] [4 4] 0836 0922 0898 09589 [1 3] [2 4] [4 4] [1 4] 0846 0932 0898 096610 [4 4] [1 4] 0846 0924 0828 0935

070

075

080

085

090

095

100

RFensemble

no 2

RFensemble

no5

RFensemble

no6

RFsingle

classifier

KNNensemble

no 2

KNNensemble

no 5

KNNensemble

no 6

KNNsingle

classifier

Vehicle detection accuracy

Figure 9 Comparison of vehicle detection accuracy for classifierensembles and for single classifiers

achieves the accuracy above 97 for vehicle detection taskand above 94 in case of the vehicle classification taskIt means that the introduced classifier ensemble providesbetter results than the state-of-the-art methods that utilizeindividual classifiers (see Tables 1 and 2)

Results obtained for the best classifier ensembles and forthe individual (single) classifiers are compared in Figures9 and 10 The box plots show minimum first quartilemedian third quartile and maximum of the accuracy valuesfor 30 tests For each test different training and testingdatasets were selected from the measurement data In theseresults significant differences of the accuracy are visible whencomparing the single classifiers with their ensemble counter-parts Similarly the accuracy differences are significant whencomparing the RF classifiers with KNN classifiers It shouldbe also noted that the accuracies achieved by the best RFensembles do not differ significantly Thus selection amongthese ensembles should be considered as a tuning of theproposed method

The higher accuracy of RF ensemble can be explainedby the fact that the RF algorithm has several features whichenable effective training of the classifier According to thisalgorithm all decision trees in the forest are created by

070

075

080

085

090

095

100

RFensemble

no 2

RFensemble

no5

RFensemble

no6

RFsingle

classifier

KNNensemble

no 2

KNNensemble

no 5

KNNensemble

no 6

KNNsingle

classifier

Vehicle classification accuracy

Figure 10 Comparison of vehicle classification accuracy for classi-fier ensembles and for single classifiers

using randomly selected subsets of the training dataset Therandom selection applies to both the events (rows) and theaggregates (columns) Each decision tree further divides thetraining data into smaller subsets until the subsets are smallor all events in these subsets belong to one class In contrast toRF the other compared algorithms (includingKNN) performthe training procedures with use of the complete trainingdataset

5 Conclusions

The proposed vehicle detection and classification approachuses mobile devices (smartphones) and Bluetooth beaconsfor road traffic monitoring It allows detecting three classesof vehicles by analyzing strength of radio signal received fromBLE beacons that are installed at different heights by the roadThis approach is suitable for crowd sourcing applicationsaimed at reducing travel time congestion and emissionsAdvantages of the introduced method were demonstratedduring experimental evaluation in real-traffic conditionsExtensive experiments were conducted to test different clas-sification approaches and data aggregation methods In com-parison with state-of-the-art RSSI-based vehicle detection

Wireless Communications and Mobile Computing 11

methods higher accuracy was achieved by introducing adedicated ensemble of random forest classifiers withmajorityvoting

The presented solution can be extended to several bea-cons installed along the road to obtain information concern-ing vehicle velocity and direction Another interesting topicis related to data preprocessing on mobile devices in order toreduce the communication effort Finally additional studieswill be necessary to introduce methods that can be usedto activate the Bluetooth modules and beacons when it isnecessary and reduce the energy consumption

Data Availability

The data used to support the findings of this study areincluded within the supplementary information file

Conflicts of Interest

The authors declare that there are no conflicts of interestregarding the publication of this paper

Acknowledgments

The research was supported by the National Centre forResearch and Development (NCBR) [Grant no LIDER180064L-715NCBR2016]

Supplementary Materials

The supplementary material file (csv) includes a raw RSSIdataset where ldquoidrdquo denotes number of measurement ldquoNoderdquois an identifier of mobile device (receiver) ldquoiBeaconrdquo is anidentifier of beacon (transmitter) ldquoRSSIrdquo is the measuredRSSI value ldquoClassrdquo describes type of observed event (Eempty road C personal car D semitruck and T truck) andldquoFlagrdquo indicates the measurements for which the events wererecorded (symbol ldquo+rdquo) (Supplementary Materials)

References

[1] H Chang Y Wang and P A Ioannou ldquoThe use of micro-scopic traffic simulation model for traffic control systemsrdquo inProceedings of the 2007 International Symposium on InformationTechnology Convergence ISITC 2007 pp 120ndash124 November2007

[2] M Bernas B Płaczek P Porwik and T Pamuła ldquoSegmentationof vehicle detector data for improved k-nearest neighbours-based traffic flow predictionrdquo IET Intelligent Transport Systemsvol 9 no 3 pp 264ndash274 2014

[3] I Ahmad R M Noor I Ali M Imran and A VasilakosldquoCharacterizing the role of vehicular cloud computing in roadtrafficmanagementrdquo International Journal of Distributed SensorNetworks vol 13 no 5 2017

[4] B Płaczek ldquoA self-organizing system for urban traffic controlbased on predictive interval microscopic modelrdquo EngineeringApplications of Artificial Intelligence vol 34 pp 75ndash84 2014

[5] M Karpinski A Senart and V Cahill ldquoSensor networks forsmart roadsrdquo in Proceedings of the 4th Annual IEEE Interna-tional Conference on Pervasive Computing and CommunicationsWorkshops (PerCom rsquo06) pp 310ndash314 IEEE Pisa Italy March2006

[6] G Chatzimilioudis A Konstantinidis C Laoudias and DZeinalipour-Yazti ldquoCrowdsourcing with smartphonesrdquo IEEEInternet Computing vol 16 no 5 pp 36ndash44 2012

[7] R Prabha and M G Kabadi ldquoKNODET A Framework toMine GPS Data for Intelligent Transportation Systems at TrafficSignalsrdquo in Proceedings of the 2017 International Conference onRecent Advances in Electronics and Communication Technology(ICRAECT) pp 85ndash89 Bangalore India March 2017

[8] Y Ma L Zhou Z Gu Y Song and B Wang ldquoChannel Accessand Power Control for Mobile Crowdsourcing in Device-to-DeviceUnderlaidCellularNetworksrdquoWireless Communicationsand Mobile Computing vol 2018 Article ID 7192840 13 pages2018

[9] X Zhang Z Yang W Sun et al ldquoIncentives for mobile crowdsensing A surveyrdquo IEEE Communications Surveys amp Tutorialsvol 18 no 1 pp 54ndash67 2016

[10] N D Lane E Miluzzo H Lu D Peebles T Choudhury andA T Campbell ldquoA survey of mobile phone sensingrdquo IEEECommunications Magazine vol 48 no 9 pp 140ndash150 2010

[11] W Z Khan Y Xiang M Y Aalsalem and Q Arshad ldquoMobilephone sensing systems a surveyrdquo IEEE Communications Sur-veys amp Tutorials vol 15 no 1 pp 402ndash427 2013

[12] R K Ganti F Ye and H Lei ldquoMobile crowdsensing currentstate and future challengesrdquo IEEE Communications Magazinevol 49 no 11 pp 32ndash39 2011

[13] A T Campbell S B Eisenman N D Lane et al ldquoThe rise ofpeople-centric sensingrdquo IEEE Internet Computing vol 12 no 4pp 12ndash21 2008

[14] N Maisonneuve M Stevens M E Niessen and L SteelsldquoNoiseTube Measuring and mapping noise pollution withmobile phonesrdquo Information Technologies in EnvironmentalEngineering pp 215ndash228 2009

[15] C Costa C Laoudias D Zeinalipour-Yazti and D GunopulosldquoSmartTrace Finding similar trajectories in smartphone net-works without disclosing the tracesrdquo in Proceedings of the 2011IEEE 27th International Conference on Data Engineering ICDE2011 pp 1288ndash1291 April 2011

[16] J Gomez J C Torrado and G Montoro ldquoUsing Smartphonesto Assist People withDown Syndrome inTheir Labour Trainingand Integration A Case Studyrdquo Wireless Communications andMobile Computing vol 2017 Article ID 5062371 15 pages 2017

[17] CWu Z Yang and Y Liu ldquoSmartphones based crowdsourcingfor indoor localizationrdquo IEEE Transactions on Mobile Comput-ing vol 14 no 2 pp 444ndash457 2015

[18] S Matyas C Matyas C Schlieder P Kiefer H Mitarai andM Kamata ldquoDesigning location-based mobile games witha purpose Collecting geospatial data with cityexplorerrdquo inProceedings of the 2008 International Conference on Advancesin Computer Entertainment Technology ACE 2008 pp 244ndash247December 2008

[19] H Aly A Basalamah and M Youssef ldquoRobust and ubiquitoussmartphone-based lane detectionrdquo Pervasive and Mobile Com-puting vol 26 pp 35ndash56 2016

[20] E Koukoumidis L-S Peh and M R Martonosi ldquoSignalGuruleveraging mobile phones for collaborative traffic signal sched-ule advisoryrdquo in Proceedings of the 9th International Conference

12 Wireless Communications and Mobile Computing

on Mobile Systems Applications and Services pp 127ndash140 July2011

[21] A Thiagarajan L Ravindranath K LaCurts et al ldquoVTrackaccurate energy-aware road traffic delay estimation usingmobile phonesrdquo in Proceedings of the 7th ACM Conference onEmbedded Networked Sensor Systems (SenSys rsquo09) pp 85ndash98November 2009

[22] MWon S Zhang and SH Son ldquoWiTraffic Low-cost and non-intrusive traffic monitoring system using WiFirdquo in Proceedingsof the 26th International Conference on Computer Communica-tions and Networks ICCCN 2017 pp 1ndash9 IEEE August 2017

[23] MHaferkampMAl-Askary DDorn et al ldquoRadio-based Traf-fic Flow Detection and Vehicle Classification for Future SmartCitiesrdquo in 2017 IEEE 85thVehicular TechnologyConference (VTCSpring) pp 1ndash5 Sydney NSW Australia 2017

[24] G Horvat D Sostaric and D Zagar ldquoUsing radio irregularityfor vehicle detection in adaptive roadway lightingrdquo in Proceed-ings of the 35th International Convention on Information andCommunication Technology Electronics and MicroelectronicsMIPRO 2012 pp 748ndash753 IEEE May 2012

[25] S Roy R Sen S Kulkarni P Kulkarni B Raman and L KSingh ldquoWireless across road RF based road traffic congestiondetectionrdquo in Proceedings of the 2011 Third International Con-ference on Communication Systems and Networks (COMSNETS2011) pp 1ndash6 IEEE January 2011

[26] N Kassem A E Kosba and M Youssef ldquoRF-based vehicledetection and speed estimationrdquo in 2012 IEEE 75th VehicularTechnology Conference (VTC Spring) pp 1ndash5 IEEE

[27] X Li and J Wu ldquoA new method and verification of vehiclesdetection based on RSSI variationrdquo in 2016 10th InternationalConference on Sensing Technology (ICST) pp 1ndash6 IEEE

[28] P Mestre R Guedes P Couto J Matias J C Fernandes andC Serodio ldquoVehicle Detection for Outdoor Car Parks usingIEEE802154rdquo Lecture Notes in Engineering and ComputerScience Newswood Limited ndash IAENG 2013

[29] Apple Inc Getting Started with iBeacon Tech Rep 10 June2014

[30] A Lindemann B Schnor J Sohre and P Vogel ldquoIndoorpositioning A comparison of WiFi and Bluetooth Low Energyfor region monitoringrdquo in Proceedings of the International JointConference on Biomedical Engineering Systems and TechnologiesVolume 5 HEALTHINF pp 314ndash321 Rome Italy February2016

[31] VMartsenyuk KWarwas K Augustynek et al ldquoOnmultivari-ate method of qualitative analysis of Hodgkin-Huxley modelwith decision tree inductionrdquo in Proceedings of the 2016 16thInternational Conference on Control Automation and Systems(ICCAS) pp 489ndash494 Gyeongju South Korea October 2016

[32] M Bernas B Płaczek and W Korski ldquoWireless Networkwith Bluetooth Low Energy Beacons for Vehicle Detectionand Classificationrdquo in CN 2018 Computer Networks P GajM Sawicki G Suchacka and A Kwiecien Eds vol 860 ofCommunications inComputer and Information Science pp 429ndash444 Springer 2018

[33] MWozniak M Grana and E Corchado ldquoA survey of multipleclassifier systems as hybrid systemsrdquo Information Fusion vol 16no 1 pp 3ndash17 2014

[34] G Marcialis and F Roli ldquoFusion of face recognition algo-rithms for video-based surveillance systemsrdquo in MultisensorSurveillance Systems The Fusion Perspective G L Foresti CRegazzoni and P Varshney Eds pp 235ndash250 2003

[35] R Polikar ldquoEnsemble learningrdquo Scholarpedia vol 3 no 12article 2776 2008

[36] G Brown J Wyatt R Harris and X Yao ldquoDiversity creationmethods a survey and categorisationrdquo Information Fusion vol6 no 1 pp 5ndash20 2005

[37] M Bernas and B Płaczek ldquoFully connected neural networksensemble with signal strength clustering for indoor localizationinwireless sensor networksrdquo International Journal ofDistributedSensor Networks vol 2015 Article ID 403242 2015

[38] M Lewandowski T Orczyk and B Płaczek ldquoHuman activitydetection based on the iBeacon technologyrdquo Journal of MedicalInformatics Technologies vol 25 2016

[39] H-G Beyer and H-P Schwefel ldquoEvolution strategiesndashA com-prehensive introductionrdquo Natural Computing vol 1 no 1 pp3ndash52 2002

[40] M R Berthold N Cebron F Dill et al ldquoKNIMETheKonstanzInformation Minerrdquo in Data Analysis Machine Learning andApplications Studies inClassificationDataAnalysis andKnowl-edge Organization C Preisach H Burkhardt L Schmidt-Thieme and R Decker Eds Springer Berlin Germany

[41] B Scholkopf A J Smola R C Williamson and P L BartlettldquoNew support vector algorithmsrdquo Neural Computation vol 12no 5 pp 1207ndash1245 2000

[42] L Breiman ldquoRandom forestsrdquoMachine Learning vol 45 no 1pp 5ndash32 2001

[43] D F Specht ldquoProbabilistic neural networksrdquo Neural Networksvol 3 no 1 pp 109ndash118 1990

[44] D W Aha D Kibler and M K Albert ldquoInstance-BasedLearning Algorithmsrdquo Machine Learning vol 6 no 1 pp 37ndash66 1991

[45] N C Smeeton ldquoEarly History of the Kappa Statisticrdquo Biomet-rics vol 41 no 3 article 795 1985

International Journal of

AerospaceEngineeringHindawiwwwhindawicom Volume 2018

RoboticsJournal of

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Active and Passive Electronic Components

VLSI Design

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Shock and Vibration

Hindawiwwwhindawicom Volume 2018

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawiwwwhindawicom

Volume 2018

Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom

The Scientific World Journal

Volume 2018

Control Scienceand Engineering

Journal of

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom

Journal ofEngineeringVolume 2018

SensorsJournal of

Hindawiwwwhindawicom Volume 2018

International Journal of

RotatingMachinery

Hindawiwwwhindawicom Volume 2018

Modelling ampSimulationin EngineeringHindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Navigation and Observation

International Journal of

Hindawi

wwwhindawicom Volume 2018

Advances in

Multimedia

Submit your manuscripts atwwwhindawicom

Page 2: Road Traffic Monitoring System Based on Mobile …downloads.hindawi.com/journals/wcmc/2018/3251598.pdfIt should be noted that the intro-duced system structure, which includes BLE beacons

2 Wireless Communications and Mobile Computing

According to the proposed traffic monitoring approacha wireless network is composed of smartphones and battery-powered beacons The beacons and the smartphone devicesare placed on opposite sides of a road The smartphonesregister broadcasted beacons frames and collect values ofreceived signal strength indicator (RSSI) The proposedmethod utilizes RSSI data collected by mobile devices (egsmartphones) to recognize passing vehicles in a given areaThese tasks are performed by using a proposed ensemble ofclassifiers which significantly increases the vehicle detectionand classification accuracy

The novel aspects of this study include (1) proposal of avehicle detection and classification system which is suitablefor the crowd sourcing applications (2) design of classifierensemble that enables utilization of RSSI data for accuratevehicle detection and classification (3) verification of thenew Bluetooth-based traffic monitoring system in real-trafficconditions

The paper is organized as follows Section 2 includes asurvey of related literature Details of the proposed hybridtraffic monitoring system are discussed in Section 3 Exper-iments and their results are described in Section 4 Finallyconclusions are given in Section 5

2 Related Works and Contribution

Smartphones become the round-the-clock interface betweenuser and the environment which integrates the Internetnetwork (via WiFi 2G3G4G5G) with local-area networks(eg Bluetooth new generation NFC or Portable WiFiwhich allows the smartphone to act as a router and sharethe cellular connection with nearby devices) [6] It is worthnoting that each of these communication standards is char-acterized by different energy consumption and data transferparameters [8] Smartphone devices possess powerful com-putational capabilities and are equipped with various func-tional built-in sensors [9] that have enabled the developmentof mobile sensing technologies [10ndash14] Among them crowdsensing [12] plays important role due to the possibility ofcollecting useful data The crowd sensing approach utilizeslarge amounts of participants to monitor the surroundingenvironment by means of various sensors accelerometergyroscope compass microphone camera GPS and wirelessnetwork interfaces

The mobile sensing technologies were used for the devel-opment of noise detection [14] social behavior monitor-ing [15] health monitoring of disabled patients [16] andindoor localization [17 18] Another example is an accurateand energy-efficient smartphone-based traffic lane detectionsystem for vehicles which can detect different lane-levellandmarks with accuracy above 90 [19] Several solutionswere also proposed for road traffic monitoring [20 21]These solutions provide the GPS localization data for vehicletracking They require the mobile device to be present invehicle thus not all vehicles can be tracked in this way

In this paper a method is proposed which allows thesmartphones placed in road surrounding (eg on sidewalksin pedestriansrsquo pockets) to be used for traffic monitoringAccording to the introduced method vehicle detection and

classification is performed by analyzing strength of radiosignal received from Bluetooth beacons

Up to date several efforts have been made to explorethe possibility of vehicles detection and localization viachannel state information (CSI) [22] received signal strengthindicator (RSSI) [23 24] link quality indicator (LQI) andpacket loss rate [25]

A method which uses wireless transmission to detectroad traffic congestion was proposed in [25] This methodrequires a pair of wireless transmitter and receiver Thetransmitter continuously sends packets The receiver whichis placed on opposite side of a road evaluates RSSI LQI andpacket loss metrics It was shown that these metrics enablerecognition between free-flow and congested traffic stateswith high accuracyThemethod was implemented and testedwith use of ZigBee motes

Similar ZigBee network was adapted in [24] for vehiclesdetection The experimental results presented in that workconfirm that a vehicle passing between the network nodescauses a drop of RSSI value It was also observed that thegradient of RSSI drop depends on the vehicle speed

In [26] a method was introduced for vehicle detectionand speed estimation which is based on RSSI analysis innetwork composed of two WiFi access points and two WiFi-equipped laptops Mean value and variance of RSSI measure-ments were used to discriminate between three states emptyroad stopped vehicle and moving vehicle The experimentalresults reported in [26] show that variance of RSSI decreaseswith increasing speed of vehicle This dependency was usedfor speed estimation

Another WiFi-based traffic monitoring system was pre-sented in [22]This system utilizes single access point and onelaptop to provide functionalities of vehicle detection classifi-cation lane identification and speed estimation Accordingto that approach CSI patterns in WiFi network are capturedand analyzed to perform the trafficmonitoring tasksTheCSIcharacterizes signal strengths and phases of separate WiFisubcarriers

In [23] a radio-based approach for vehicle detection andclassification was introduced which combines ray tracingsimulations machine learning and RSSI measurements Theauthors have suggested that different types of vehicles havespecific RSSI fingerprints This fact was used to perform amachine-based vehicle classification The RSSI values wereanalyzed in awireless network of three transmitting and threereceiving units which were positioned on opposite sides of aroadThe six wireless units weremounted on delineator postsand equipped with directional antennas It was demonstratedthat such system is able to detect vehicles and categorizethem into two classes (passenger car and truck) It wasalso demonstrated that traffic lanes in a two-lane road havedifferent distributions of CSI data This fact was utilized toidentify in which lane a vehicle is detected

The wireless networks have been also used for detectionof parked vehicles In order to detect the parked vehiclesthe transmitting nodes are placed on parking space andthe receiving nodes are installed at a high location Whena vehicle is parked over the transmitting node a decreaseof the RSSI value is registered Thus the vehicles can be

Wireless Communications and Mobile Computing 3

M

M

MM

B

B

B

Figure 1 Placement of mobile devices (M) and beacons (B)

easily detected based on simple RSSI analysis Differentsystems of this type were implemented with use of CC1101wireless communication modules [27] and XBee motes[28]

The above-discussed methods from the literature arenot suitable for the crowd sourcing applications as theyrequire energy-expensive data transfers (WiFi) or specializedhardware (ZigBee modules directional antennas) The newapproach proposed in this paper utilizes the Bluetooth lowenergy (BLE) communication which is commonly availablein smartphones According to the introduced approach BLEbeacons are usedwith iBeacon protocol [29] to broadcast dataframesThebeacon frames are registered by smartphones thatcollect the RSSI measurements aggregate them and send toa server for further analysis It should be noted here thatthe BLE beacons are cheap battery-powered devices that canwork for a long time (years) without battery replacementor charging Moreover the use of BLE communicationsignificantly extends the lifetime of smartphone battery incomparison to WiFi transmission [30] Nevertheless beacondiscovery has a significant impact on smartphone batteryusage thus the discovery time interval should be plannedcarefully The application of BLE communication for RSSI-based vehicle detection and classification has not beenconsidered previously by other authors This study involvesdetailed verification of the above-mentioned solution in real-traffic conditions

Another important drawback of the existingmethods liesin limited accuracy of vehicle detection and classification Toovercome this drawback a new ensemble of classifiers wasdesigned in this study which accurately detects vehicles andrecognizes three vehicle classes based on RSSI data collectedfrom multiple smartphones

The existing methods utilize single classifiers to detectvehicle and recognize its class In the related works the RSSI-based vehicle classification was implemented with use ofvarious classificationmethods artificial neural networks [22]k-Nearest Neighbor (k-NN) support vector machine (SVM)[23] decision trees [31] and logistic regression [32] A SVMmethod was adopted in [23] to train vehicle classificationmodels and categorize vehicles into two classes (passenger carand truck) The state-of-the-art algorithms are trained usingraw data [23] or a set of predefined features [31 32] To thebest authorsrsquo knowledge classifier ensembles have not been

previously adapted to deal with the RSSI-based road trafficmonitoring tasks

In machine learning literature various ensemble meth-ods are presented which combine several classifier systemsthat use different models or datasets [33] Several boot-strapping methods were considered (bagging or boosting)which allows us to optimize classifier ensembles [34] ormerge classifier decision [35] Research in [36 37] showsthat combined classifier can outperform the best individualclassifier under some conditions (eg majority voting by agroup of independent classifiers) That works have motivatedthe approach described in this paper which involves designand verification of classifier ensembles for traffic monitoringwith use of the RSSI data In comparison with the state-of-the-art methods that are based on single classifiers theproposed approach enabled more accurate vehicle detectionand classification

3 Proposed Method

The proposed vehicle detection and classification systemutilizes RSSI data collected by mobile devices (eg smart-phones) in a predetermined region on the side of the roadMobile devices measure signal strength when receiving radioframes from BLE beacons across the street The RSSI valuestogether with information about position of the device aretransmitted to a server which performs data aggregation andclassification

Structure of the proposed traffic monitoring system ispresented in Figure 1 It should be noted that the intro-duced system structure which includes BLE beacons andmobile devices has not been considered in the literatureThe BLE beacons are installed at different heights becausesuch arrangement is suitable for vehicle classification ierecognition of personal cars semitrucks and trucks [32]Beacons use the iBeacon protocol [29] to broadcast framesThe mobile devices on the opposite side of the road useBLE communication to collect incoming beacon frames andevaluate their RSSI Position of the device can be determinedbased on both the RSSI information and the GPS signal Thecollected data are transmitted to a server via cellular networkor WiFi communication

According to the iBeacon protocol three fields in thebroadcasted frames are available that identify the sending

4 Wireless Communications and Mobile Computing

1 while mobile device is active do

2 begin

3 t= current time

4 repeat

5 if new beacon frame received and RSSI gt threshold then

6 add record (time position beacon ID RSSI) to buffer

7 until (current time - t) gt T8 send records from buffer to server

9 end

Algorithm 1 Mobile device operations

1 create table Records with columns time position beacon ID RSSI

2 create table Events with columns time event type

3 at each time step do

4 if New records received then

5 begin

6 Records= Records union New records

7 time min = select min(time) from New records

8 time min = time min - window size

9 Selected records = select from Records where time gt= time min

10 Aggregates= aggregation( Selected records window size )

11 New events = events recognition (Aggregates)

12 Events = events update (Events New Events )

13 End

Algorithm 2 Server operations

beacon UUID (universally unique identifier) Mayor andMinor value UUID contains 32 hexadecimal digits splitinto 5 groups separated by hyphens The iBeacon standardrequires also Mayor and Minor value to be assigned Thosetwo values help to identify beacons with greater accuracythan using the UUID alone The Minor and Major valuesare unsigned integers between 0 and 65535 The purpose ofthe UUID is to distinguish beacons in a given network frombeacons in other networks For instance the same UUIDcan be used for all beacons in a traffic monitoring systemwhich coversmany detection areasMajor values are intendedto identify a group of beacons eg all beacons in a certaindetection area can be assigned a unique Major value FinallyMinor values are intended to distinguish an individualbeacon The Minor value can be used for distinguishingindividual beacons installed at different heights within adetection area In this paper the 3-tuple of UUID Major andMinor fields is referred to as beacon ID

In this study new algorithms (Algorithms 1ndash5) weredesigned and implemented to enable accurate vehicle detec-tion and classification with use of BLE beacons and mobiledevices Details of the operations performed bymobile deviceare presented in Algorithm 1The received beacon frames areignored if the RSSI is below a predetermined threshold In theopposite situation a new data record is created and written toa buffer The data record contains information about framereception time device position ID of frame sender (beacon)and RSSI value The content of the buffer is periodically sent

to the server Frequency of these data transfers is controlledby parameter 119879 It should be noted that the beacon framescollection and data transfer to server can be performed inparallel if appropriate hardware solution is available

The objective of server operations (Algorithm 2) is torecognize event type based on the data records delivered frommobile devices The event type determines if the monitoredroad section was empty or a car was present in this sectionduring transmission of beacon frames Additionally the typeof the event indicates class of detected vehicle (personal carsemitruck or truck) According to the proposed method thetype of the event is recognized using a classifier ensemble(Algorithm 4)

Before execution of the classification procedure the inputdata are aggregated The proposed aggregation procedureis based on so-called sliding window concept [38] (Algo-rithm 3) It means that if a new data record is receivedwhich contains RSSI value for time t then the aggregationoperation refers to a collection of data records for which theframe reception time 1199051015840 satisfies condition t ndash 119908 le 1199051015840 let where 119908 is size of the time window Such collection ofdata records is used to calculate aggregates (statistics) ofRSSI values ie minimummaximum average and standarddeviation Separate aggregates are determined for each pairof the transmitter (beacon) position and the receiver (mobiledevice) position The positions of beacons do not changethus they are identified by the beacon ID In contrast currentposition of mobile device is assigned to the nearest reference

Wireless Communications and Mobile Computing 5

1 Input Records window size

2 Output Aggregates

3 create table Aggregates

4 with columns time min 1 1 max 1 1 min m n max m n

5 Times= Select time from Records

6 for each t in Times do

7 begin

8 for refPos = 1m do

9 for bID = 1n do

10 begin

11 RSSI data = Select RSSI from Records

12 where time is between t - window size and t

13 and distance(position refPos ) lt= d max

14 and beacon ID = bID

15 min refPos bID = min( RSSI data )

16 max refPos bID = max( RSSI data )

17 end

18 Insert t min 1 1 max 1 1 min m n max m n into Aggregates

19 End

Algorithm 3 Aggregation function

1 Input Aggregates

2 Output New events

3 create table New events with columns time event type

4 Times= Select time from Aggregates

5 for each t in Times do

6 begin

7 votes= empty array

8 for each classifier in ensemble

9 begin

10 [a b]= classifier range

11 data= Select min a 1 max a 1 min b n max b n

12 from Aggregates where time = t

13 event type = classifier(data)

14 votes[ event type ]= votes[ event type ] + classifier weight

15 end

16 event type = arg max (votes[ event type ])

17 Insert t event type into New events

18 End

Algorithm 4 Events recognition function

1 Input Events New events

2 Output Events

3 New times = Select time from New events

4 Times= Select time from Events

5 for each t in New times do

6 begin

7 event= Select from New events where time = t

8 if t is in Times then Delete from Events where time = t

9 Insert event into Events

10 End

Algorithm 5 Events update function

6 Wireless Communications and Mobile Computing

position It should be noted that a set of reference positionsin the region of interest on the side of the road has to bedetermined in advance

Details of the proposed data aggregation procedure arepresented by the pseudocode in Algorithm 3 For the sakeof simplicity it was assumed in this pseudocode that onlytwo statistics are to be calculated (maximum andminimum)In practical applications the number of statistics has to belarger as discussed in Section 4The symbolsmin refPos bIDand max refPos bID in Algorithm 3 denote the minimumand maximum RSSI value determined for frames sent frombeacon bID and received by amobile device close to referenceposition refPos in time window [t ndash 119908 t] The statementthat a mobile device is close to a reference position meansthat its distance to the reference position is below d max Itshould be noted that d max is set to be lower than half oftheminimumdistance between reference positions thus eachmobile device is assigned to single reference position Thenumber of reference positions and the number of beacons inAlgorithm 3 are denoted by119898 and n respectively

As it was already mentioned above in this section thetype of the event (which relates to vehicle presence and class)is recognized based on the aggregated RSSI data by usinga classifier ensemble (Algorithm 4) The proposed ensembleconsists of classifiers that are fed with various subsets of theaggregated data A different set of the reference positionsfor which the RSSI data are collected is assigned to eachclassifier in the ensemble Hereinafter this set will be referredto as the classifier rangeThe reference positions are identifiedby natural numbers 1 m Thus the classifier range canbe defined by a pair [a b] where 1 le a le m and a leb le m The range [119886 119887] means that the input dataset ofthe corresponding classifier includes the aggregates (egmin refPos bID and max refPos bID) that were determinedfor the reference positions refPos = a b In case of range[1 119898] the classifier utilizes the complete dataset On the otherhand the classifierrsquos input dataset includes the RSSI readingsfor only one reference position when a =b

For each classifier in the ensemble a weight is determinedwhich corresponds to number of the classifierrsquos votes Thetotal number of votes for a given event type is calculatedby adding the weights of the classifiers that have recognizedthis particular event type As a result the event type whichreceives the highest total number of votes is selected Incase of a tie the class which has higher a priori probabilityis selected Weights of the classifiers are adjusted duringtraining procedure with use of the evolutionary strategy [39]

In this study application of various machine learningalgorithms was considered for implementation of the pro-posed ensemble (support vector machines random forestprobabilistic neural network and k-nearest neighborsrsquo algo-rithm) [31 40] A separate training dataset which includesclasses (ie event types) determined by human observer wasused to train the classifiers

After the events are recognized an update of the vehiclesclassification and detection results is conducted in accor-dance with Algorithm 5This update is necessary because thenew results can be related to time moments for which someevents have already been recognized The new results are

Beacons

Referenceposition 1

Referenceposition 2

Referenceposition 3

Referenceposition 4

4 m

8 m

Figure 2 Test site with reference positions and beacons

Figure 3 Mobile application used for data collection

more credible as they take into account additional recentlycollected data Thus the previous results are deleted Finallythe table Events includes the information about event type forall time points covered by the available RSSI dataset It shouldbe also noted that in this study four event types are considered(empty road presence of personal car semitruck and truck)

4 Experimental Results

Usefulness of the proposed vehicle detection and classifica-tion method was verified during experiments in real-worldtraffic conditions A schemaof the test site aswell as distancesbetween reference positions and beacons is presented inFigure 2 Three BLE beacons were installed on road sideat height of 50 100 and 200 centimeters above the roadsurface This configuration was selected as providing themost promising results on the basis of preliminary tests [32]On the opposite side of the road four reference points weredetermined in equal distances of 4 meters In this area theRSSI measurements were conducted using four smartphonesRedmi 3S held at a height of about 1 meter near to thereference positions The data were collected in a periodof two hours During that period more than 400 vehicleshave passed through the analyzed road section A mobileapplication was developed to enable effective collection ofthe experimental data (Figure 3) Additional mobile deviceswere used by observers to record the events related topresence of vehicles in front of the reference locations withrecognition of three vehicle classes (personal car semitruck

Wireless Communications and Mobile Computing 7

minus95

minus90

minus85

minus80

minus75

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

RSSI

[dBm

]

Time [s]

C D D T

C - carD - semi truckT - truck

(a)

minus95

minus90

minus85

minus80

minus75

RSSI

[dBm

]

Time [s]1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

C D D T

C - carD - semi truckT - truck

(b)

Figure 4 Example of collected data (a) reference position 1 and (b) reference position 4

and truck) All themobile deviceswere synchronized viaNTPprotocol

Examples of collected records for two different referencepositions are presented in Figure 4 The vertical red linesin Figure 4 show the time instances when passing vehicleswere registered by the observers The labels below verticallines denote class of the vehicles These results show thatthe vehicles cause visible changes of RSSI for both locationsMoreover the signal noise increases with distance betweenbeacons and mobile device (Figure 4(a))

For the experimental purposes the collected data weredivided into training and test datasets The experiments wereconducted to evaluate the accuracy of automatic vehicleclassification based on the collected data with use of differentmachine learning algorithms ie support vector machines(SVM) random forest (RF) probabilistic neural network(PNN) and k-nearest neighborsrsquo algorithm (KNN)

The SVM algorithm [41] performs classification tasks byusing hyperplanes defined in a multidimensional space Thehyperplanes that separate training data points with differentclass labels are constructed at the training phase SVMemploys an iterative training procedure to find the optimalhyperplanes having the largest distance to the nearest trainingdata point of any class The larger distance results in lowergeneralization error of the classifier

In case of RF classifier [42] the training procedure createsa set of decision trees from randomly selected subset of train-ing data Each tree performs the classification independentlyand ldquovotesrdquo for the selected class Finally the votes fromdifferent decision trees are aggregated to decide the class ofa test object At this step the RF algorithm chooses the classhaving the majority of votes from particular decision trees

PNN [43] includes three layers of neurons (input layerhidden layer and output layer) The neurons in hidden layerdetermine similarity between test input vector and the train-ing vectors To evaluate this similarity each hidden neuronuses a Gaussian function which is centered on a trainingvector The hidden neurons are collected into groups onegroup for each of the classes There is also one neuron in theoutput layer for each classThe output neuron calculates classprobability on the basis of values received from all hiddenneurons in a given group As a result the posterior probabilityis evaluated for all considered classesThe final decision of theclassifier is the class with maximum probability

KNN algorithm [44] computes distances between thetest data point and all training data points in feature space

072073074075076077078079080081

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20k

Vehicle classification accuracy

Figure 5 Impact of parameter k (number of the nearest neighbors)on accuracy of KNN algorithm

Afterwards k training data points with the lowest distancesare selected as the nearest neighbors The test data point isassigned to the class which is most common among the k-nearest neighbors

During experiments the classification accuracy was com-pared for several RSSI-based traffic monitoring approachesincluding the proposed solution and the state-of-the-artmethods from the literature This comparison takes intoaccount the method with one receiver [25] solutions withmultiple spatially distributed receivers and single classifierwhich detects the vehicles based on a complete RSSI dataset[22 23] and the new introduced algorithmwith the ensembleof classifiers

Initial experiments were conducted to calibrate parame-ters of the algorithms In these experiments vehicle classifi-cation was performed with use of 8 aggregates (minimummaximum difference between max and min mean stan-dard deviation median Pearson correlation coefficient andnumber of received frames) The aggregates were calculatedbased on the RSSI data collected in four reference positionsin accordance with Algorithm 3

Accuracy of the KNN algorithm was tested for parameterk (number of the nearest neighbors) in range between 1and 20 Results of the tests are presented in Figure 5 Basedon these results the value k = 7 which gave the highestclassification accuracy was selected for further experiments

Figure 6 shows the classification accuracy that wasachieved by using the RF algorithm with different number

8 Wireless Communications and Mobile Computing

070

075

080

085

090

095

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20number of decision trees

Vehicle classification accuracy

Figure 6 Accuracy of random forest algorithm for different numberof decision trees

045

055

065

075

085

095

1 2 3 4 5 6Window size [s]

Vehicle classification accuracy

Random ForestKNN

Figure 7 Impact of window size parameter on accuracy of RF andKNN algorithms

of decision trees It can be observed in these results that theaccuracy does not change significantly for the number ofdecision trees above 5 However the accuracy achieved forthe tree number between 6 and 9 was slightly lower than forthe RF with 10 trees A little decrease of the accuracy wasalso observed for the tree number above 10Therefore duringexperiments described later in this section the number ofdecision trees was set to 10 It should be also noted that thecomplexity of the algorithm increases when using a larger setof the decision trees

The impact of the window size on vehicle classificationaccuracy was also examined during the preliminary exper-iments The window size was changed from 1 to 6 secondswith steps of 1 second As shown in Figure 7 for RF andKNN algorithms the best results were obtained when usingthe window size of 3 seconds In case of larger windows theclassification accuracy decreases because the data registeredfor multiple vehicles are aggregated in one window Similarresults were also observed for SVM and PNN algorithmsThus the 3-second window was used in further experiments

088

089

090

091

092

093

Noattributeremoved

Minimum Maximum Average Standarddeviation

Median Framecount

Difference Pearsonscorrelationcoefficient

Removed attribute

Vehicle classification accuracy

Figure 8 Impact of attribute selection on accuracy of RF algorithm

At the next step the most effective set of attributeswas selected with use of the backward elimination methodResults of the elimination for the RF algorithm are presentedin Figure 8 At the beginning the classification accuracy wastested using full dataset with 8 aggregates The result of thistest is shown by the leftmost bar in Figure 8 Next tests wereperformed for the 8 datasets that were created by removingparticular aggregates (attributes) As shown in Figure 8an improvement of the vehicle classification accuracy wasachieved after deletion of the ldquodifferencerdquo attribute (ie thedifference between maximum and minimum) Thus thereduced dataset includes 7 aggregates minimum maximummean standard deviation median Pearson correlation coef-ficient and number of received frames Further eliminationdid not improve the results It was verified that the deletionof the ldquodifferencerdquo attribute is beneficial for all consideredclassification algorithms

Table 1 shows the vehicle detection and classificationaccuracy obtained for the basic approach which takes intoaccount the signal strength measured by a single device[25] (in one reference position) These results were obtainedafter the above-discussed initial search of the best algorithmparameters As it was already mentioned in previous sectionin case of the vehicle classification task four classes ofevents are considered empty road presence of personal carsemitruck and truck For the vehicle detection problem twoclasses are taken into account empty road and presenceof a vehicle The accuracy (ACC) was calculated as overallaccuracy using the following formula

ACC =sum

ni=1 CiD

(1)

where n is number of classes Ci is number of items (events)in the test dataset that are correctly assigned to ith class (eventtype) and D is number of items in test dataset

It should be also noted that the results in Table 1 arepresented for the two classification algorithms that providethe best accuracy These results firmly show that the most

Wireless Communications and Mobile Computing 9

Table 1 Accuracy of vehicle detection and classification based on data collected in one reference position

Reference position Vehicle classification accuracy Vehicle detection accuracyKNN RF KNN RF

1 0788 0817 08486 08642 0702 0699 07311 08013 0725 0804 07807 08594 0822 0861 08982 0932

Table 2 Accuracy of vehicle classification based on data collected in four reference positions

Window size [s]Classification algorithm

RF KNN PNN SVMACC CK ACC CK ACC CK ACC CK

2 0885 0801 0619 0287 0533 0099 0525 00003 0922 0865 0809 0658 0684 0403 0561 00894 0914 0853 0773 0582 0802 0639 0734 05335 0843 0729 0794 0630 0629 0286 0538 00366 0799 0651 0747 0549 0728 0512 0559 0088

accurate vehicle classification and detection was possiblewhen the mobile device is placed opposite the beacons loca-tion (in reference position 4)The results confirmobservationthat noise in RSSI readings increases with the distance frombeacons to mobile device It should be also noted that thenumber of RSSI samples that are collected when a vehicleis present between beacons and mobile device decreaseswith the speed of the vehicle As a result lower accuracyis observed for higher speed of vehicles In the consideredtest site the vehicles were slowing down when passingthe reference position 1 since this position was close to acrossroadThus the accuracy obtained for reference position1 is higher than for reference positions 2 and 3

In further tests the other approachwas considered whichis based on application of multiple receivers and one classifier[22 23] According to this approach the vehicles wererecognized by single classifier using the dataset collectedin four reference positions Results of these experimentsare shown in Table 2 The classification accuracy (ACC)and Cohenrsquos kappa [45] (CK) is compared in Table 2 forall considered classification algorithms and various sizes ofthe sliding window When comparing the results in Table 2with those in Table 1 it can be observed that the RSSIdata collected by multiple devices in several locations alongthe road enable more accurate vehicle classification Similarexperiments were also conducted for the vehicle detectiontask and the accuracy of 0935 was achieved

The results in Table 2 firmly show that size of the slidingwindow has a significant impact on the accuracy of vehicledetection and classification Passing vehicles cause a dropin RSSI level This drop is longer for trucks and shorter forpersonal cars In order to correctly recognize the vehicle thesliding window has to cover the time when RSSI values arereduced If the sliding window is to narrow the lower RSSIvaluesmay be registered in entirewindow for different vehicleclasses and thus the classes cannot be correctly recognizedIf single classifier is used a wider window is also helpful

because the drop of RSSI is shifted in time for differentreference locations However in case of an excessive windowsize two successive vehicles can be captured in one windowwhich results in decreased accuracy of the detection andclassification The best result results were obtained by usingthe random forest classifier with window size of 3 seconds

The next step of the research was aimed at increasingthe accuracy of vehicle detection by using the proposedclassifier ensemble in combination with majority voting asdescribed in Section 3 It should be noted that the proposedmethod was used with time step of 1 second and d max =1 meter During the tests of the ensemble different rangesof individual member classifiers were taken into account(see Table 3) The input data of individual classifiers wereobtained not only from particular reference positions (egClassifier 1 in Ensemble no 1) but also from a connection ofthe neighboring positions (eg Classifier 1 in Ensemble no3) When analyzing the results presented in Table 3 it canbe observed that the highest accuracy was achieved for theensembles of the random forest classifiersThe best ensemble(no 5) combines the classifiers that are fed with data fromtwo neighboring reference positions (Classifiers 1-3) with theclassifier created for reference position 4 (Classifier 4) andthe classifier which utilizes the entire dataset (Classifier 5)Classifier 4 with range [4 4] was included in the ensembleas it provides the best accuracy when using data from singlereference position The high accuracy was also obtained forEnsembles no 2 and 6 Results of these ensembles are onlyslightly worse than those for Ensemble no 5 This fact showsthat the proposed approach achieves high vehicle classifica-tion and detection accuracy by combining local classifiers(that utilize data from two neighboring reference positionsor single reference position) with the global classifier (whichmakes decisions based on data collected in all referencepositions)

It was noted that the random forest algorithm wasabout 85 more effective than KNN The proposed method

10 Wireless Communications and Mobile Computing

Table 3 Accuracy of vehicle detection and classification with use of the proposed classifier ensemble

Ensemble no Classifier range Vehicle classification accuracy Vehicle detection accuracyClas 1 Clas 2 Clas 3 Clas 4 Clas 5 KNN RF KNN RF

1 [1 1] [2 2] [3 3] [4 4] - 0862 0890 0906 09562 [1 1] [2 2] [3 3] [4 4] [1 4] 0862 0935 0898 09613 [1 2] [2 3] [3 4] - - 0799 0922 0854 09634 [1 2] [2 3] [3 4] [4 4] - 0833 0922 0898 09695 [1 2] [2 3] [3 4] [4 4] [1 4] 0846 0943 0898 09776 [1 2] [2 3] [3 4] - [1 4] 0825 0940 0854 09697 [1 3] [2 4] - - - 0781 0911 0752 09378 [1 3] [2 4] [4 4] 0836 0922 0898 09589 [1 3] [2 4] [4 4] [1 4] 0846 0932 0898 096610 [4 4] [1 4] 0846 0924 0828 0935

070

075

080

085

090

095

100

RFensemble

no 2

RFensemble

no5

RFensemble

no6

RFsingle

classifier

KNNensemble

no 2

KNNensemble

no 5

KNNensemble

no 6

KNNsingle

classifier

Vehicle detection accuracy

Figure 9 Comparison of vehicle detection accuracy for classifierensembles and for single classifiers

achieves the accuracy above 97 for vehicle detection taskand above 94 in case of the vehicle classification taskIt means that the introduced classifier ensemble providesbetter results than the state-of-the-art methods that utilizeindividual classifiers (see Tables 1 and 2)

Results obtained for the best classifier ensembles and forthe individual (single) classifiers are compared in Figures9 and 10 The box plots show minimum first quartilemedian third quartile and maximum of the accuracy valuesfor 30 tests For each test different training and testingdatasets were selected from the measurement data In theseresults significant differences of the accuracy are visible whencomparing the single classifiers with their ensemble counter-parts Similarly the accuracy differences are significant whencomparing the RF classifiers with KNN classifiers It shouldbe also noted that the accuracies achieved by the best RFensembles do not differ significantly Thus selection amongthese ensembles should be considered as a tuning of theproposed method

The higher accuracy of RF ensemble can be explainedby the fact that the RF algorithm has several features whichenable effective training of the classifier According to thisalgorithm all decision trees in the forest are created by

070

075

080

085

090

095

100

RFensemble

no 2

RFensemble

no5

RFensemble

no6

RFsingle

classifier

KNNensemble

no 2

KNNensemble

no 5

KNNensemble

no 6

KNNsingle

classifier

Vehicle classification accuracy

Figure 10 Comparison of vehicle classification accuracy for classi-fier ensembles and for single classifiers

using randomly selected subsets of the training dataset Therandom selection applies to both the events (rows) and theaggregates (columns) Each decision tree further divides thetraining data into smaller subsets until the subsets are smallor all events in these subsets belong to one class In contrast toRF the other compared algorithms (includingKNN) performthe training procedures with use of the complete trainingdataset

5 Conclusions

The proposed vehicle detection and classification approachuses mobile devices (smartphones) and Bluetooth beaconsfor road traffic monitoring It allows detecting three classesof vehicles by analyzing strength of radio signal received fromBLE beacons that are installed at different heights by the roadThis approach is suitable for crowd sourcing applicationsaimed at reducing travel time congestion and emissionsAdvantages of the introduced method were demonstratedduring experimental evaluation in real-traffic conditionsExtensive experiments were conducted to test different clas-sification approaches and data aggregation methods In com-parison with state-of-the-art RSSI-based vehicle detection

Wireless Communications and Mobile Computing 11

methods higher accuracy was achieved by introducing adedicated ensemble of random forest classifiers withmajorityvoting

The presented solution can be extended to several bea-cons installed along the road to obtain information concern-ing vehicle velocity and direction Another interesting topicis related to data preprocessing on mobile devices in order toreduce the communication effort Finally additional studieswill be necessary to introduce methods that can be usedto activate the Bluetooth modules and beacons when it isnecessary and reduce the energy consumption

Data Availability

The data used to support the findings of this study areincluded within the supplementary information file

Conflicts of Interest

The authors declare that there are no conflicts of interestregarding the publication of this paper

Acknowledgments

The research was supported by the National Centre forResearch and Development (NCBR) [Grant no LIDER180064L-715NCBR2016]

Supplementary Materials

The supplementary material file (csv) includes a raw RSSIdataset where ldquoidrdquo denotes number of measurement ldquoNoderdquois an identifier of mobile device (receiver) ldquoiBeaconrdquo is anidentifier of beacon (transmitter) ldquoRSSIrdquo is the measuredRSSI value ldquoClassrdquo describes type of observed event (Eempty road C personal car D semitruck and T truck) andldquoFlagrdquo indicates the measurements for which the events wererecorded (symbol ldquo+rdquo) (Supplementary Materials)

References

[1] H Chang Y Wang and P A Ioannou ldquoThe use of micro-scopic traffic simulation model for traffic control systemsrdquo inProceedings of the 2007 International Symposium on InformationTechnology Convergence ISITC 2007 pp 120ndash124 November2007

[2] M Bernas B Płaczek P Porwik and T Pamuła ldquoSegmentationof vehicle detector data for improved k-nearest neighbours-based traffic flow predictionrdquo IET Intelligent Transport Systemsvol 9 no 3 pp 264ndash274 2014

[3] I Ahmad R M Noor I Ali M Imran and A VasilakosldquoCharacterizing the role of vehicular cloud computing in roadtrafficmanagementrdquo International Journal of Distributed SensorNetworks vol 13 no 5 2017

[4] B Płaczek ldquoA self-organizing system for urban traffic controlbased on predictive interval microscopic modelrdquo EngineeringApplications of Artificial Intelligence vol 34 pp 75ndash84 2014

[5] M Karpinski A Senart and V Cahill ldquoSensor networks forsmart roadsrdquo in Proceedings of the 4th Annual IEEE Interna-tional Conference on Pervasive Computing and CommunicationsWorkshops (PerCom rsquo06) pp 310ndash314 IEEE Pisa Italy March2006

[6] G Chatzimilioudis A Konstantinidis C Laoudias and DZeinalipour-Yazti ldquoCrowdsourcing with smartphonesrdquo IEEEInternet Computing vol 16 no 5 pp 36ndash44 2012

[7] R Prabha and M G Kabadi ldquoKNODET A Framework toMine GPS Data for Intelligent Transportation Systems at TrafficSignalsrdquo in Proceedings of the 2017 International Conference onRecent Advances in Electronics and Communication Technology(ICRAECT) pp 85ndash89 Bangalore India March 2017

[8] Y Ma L Zhou Z Gu Y Song and B Wang ldquoChannel Accessand Power Control for Mobile Crowdsourcing in Device-to-DeviceUnderlaidCellularNetworksrdquoWireless Communicationsand Mobile Computing vol 2018 Article ID 7192840 13 pages2018

[9] X Zhang Z Yang W Sun et al ldquoIncentives for mobile crowdsensing A surveyrdquo IEEE Communications Surveys amp Tutorialsvol 18 no 1 pp 54ndash67 2016

[10] N D Lane E Miluzzo H Lu D Peebles T Choudhury andA T Campbell ldquoA survey of mobile phone sensingrdquo IEEECommunications Magazine vol 48 no 9 pp 140ndash150 2010

[11] W Z Khan Y Xiang M Y Aalsalem and Q Arshad ldquoMobilephone sensing systems a surveyrdquo IEEE Communications Sur-veys amp Tutorials vol 15 no 1 pp 402ndash427 2013

[12] R K Ganti F Ye and H Lei ldquoMobile crowdsensing currentstate and future challengesrdquo IEEE Communications Magazinevol 49 no 11 pp 32ndash39 2011

[13] A T Campbell S B Eisenman N D Lane et al ldquoThe rise ofpeople-centric sensingrdquo IEEE Internet Computing vol 12 no 4pp 12ndash21 2008

[14] N Maisonneuve M Stevens M E Niessen and L SteelsldquoNoiseTube Measuring and mapping noise pollution withmobile phonesrdquo Information Technologies in EnvironmentalEngineering pp 215ndash228 2009

[15] C Costa C Laoudias D Zeinalipour-Yazti and D GunopulosldquoSmartTrace Finding similar trajectories in smartphone net-works without disclosing the tracesrdquo in Proceedings of the 2011IEEE 27th International Conference on Data Engineering ICDE2011 pp 1288ndash1291 April 2011

[16] J Gomez J C Torrado and G Montoro ldquoUsing Smartphonesto Assist People withDown Syndrome inTheir Labour Trainingand Integration A Case Studyrdquo Wireless Communications andMobile Computing vol 2017 Article ID 5062371 15 pages 2017

[17] CWu Z Yang and Y Liu ldquoSmartphones based crowdsourcingfor indoor localizationrdquo IEEE Transactions on Mobile Comput-ing vol 14 no 2 pp 444ndash457 2015

[18] S Matyas C Matyas C Schlieder P Kiefer H Mitarai andM Kamata ldquoDesigning location-based mobile games witha purpose Collecting geospatial data with cityexplorerrdquo inProceedings of the 2008 International Conference on Advancesin Computer Entertainment Technology ACE 2008 pp 244ndash247December 2008

[19] H Aly A Basalamah and M Youssef ldquoRobust and ubiquitoussmartphone-based lane detectionrdquo Pervasive and Mobile Com-puting vol 26 pp 35ndash56 2016

[20] E Koukoumidis L-S Peh and M R Martonosi ldquoSignalGuruleveraging mobile phones for collaborative traffic signal sched-ule advisoryrdquo in Proceedings of the 9th International Conference

12 Wireless Communications and Mobile Computing

on Mobile Systems Applications and Services pp 127ndash140 July2011

[21] A Thiagarajan L Ravindranath K LaCurts et al ldquoVTrackaccurate energy-aware road traffic delay estimation usingmobile phonesrdquo in Proceedings of the 7th ACM Conference onEmbedded Networked Sensor Systems (SenSys rsquo09) pp 85ndash98November 2009

[22] MWon S Zhang and SH Son ldquoWiTraffic Low-cost and non-intrusive traffic monitoring system using WiFirdquo in Proceedingsof the 26th International Conference on Computer Communica-tions and Networks ICCCN 2017 pp 1ndash9 IEEE August 2017

[23] MHaferkampMAl-Askary DDorn et al ldquoRadio-based Traf-fic Flow Detection and Vehicle Classification for Future SmartCitiesrdquo in 2017 IEEE 85thVehicular TechnologyConference (VTCSpring) pp 1ndash5 Sydney NSW Australia 2017

[24] G Horvat D Sostaric and D Zagar ldquoUsing radio irregularityfor vehicle detection in adaptive roadway lightingrdquo in Proceed-ings of the 35th International Convention on Information andCommunication Technology Electronics and MicroelectronicsMIPRO 2012 pp 748ndash753 IEEE May 2012

[25] S Roy R Sen S Kulkarni P Kulkarni B Raman and L KSingh ldquoWireless across road RF based road traffic congestiondetectionrdquo in Proceedings of the 2011 Third International Con-ference on Communication Systems and Networks (COMSNETS2011) pp 1ndash6 IEEE January 2011

[26] N Kassem A E Kosba and M Youssef ldquoRF-based vehicledetection and speed estimationrdquo in 2012 IEEE 75th VehicularTechnology Conference (VTC Spring) pp 1ndash5 IEEE

[27] X Li and J Wu ldquoA new method and verification of vehiclesdetection based on RSSI variationrdquo in 2016 10th InternationalConference on Sensing Technology (ICST) pp 1ndash6 IEEE

[28] P Mestre R Guedes P Couto J Matias J C Fernandes andC Serodio ldquoVehicle Detection for Outdoor Car Parks usingIEEE802154rdquo Lecture Notes in Engineering and ComputerScience Newswood Limited ndash IAENG 2013

[29] Apple Inc Getting Started with iBeacon Tech Rep 10 June2014

[30] A Lindemann B Schnor J Sohre and P Vogel ldquoIndoorpositioning A comparison of WiFi and Bluetooth Low Energyfor region monitoringrdquo in Proceedings of the International JointConference on Biomedical Engineering Systems and TechnologiesVolume 5 HEALTHINF pp 314ndash321 Rome Italy February2016

[31] VMartsenyuk KWarwas K Augustynek et al ldquoOnmultivari-ate method of qualitative analysis of Hodgkin-Huxley modelwith decision tree inductionrdquo in Proceedings of the 2016 16thInternational Conference on Control Automation and Systems(ICCAS) pp 489ndash494 Gyeongju South Korea October 2016

[32] M Bernas B Płaczek and W Korski ldquoWireless Networkwith Bluetooth Low Energy Beacons for Vehicle Detectionand Classificationrdquo in CN 2018 Computer Networks P GajM Sawicki G Suchacka and A Kwiecien Eds vol 860 ofCommunications inComputer and Information Science pp 429ndash444 Springer 2018

[33] MWozniak M Grana and E Corchado ldquoA survey of multipleclassifier systems as hybrid systemsrdquo Information Fusion vol 16no 1 pp 3ndash17 2014

[34] G Marcialis and F Roli ldquoFusion of face recognition algo-rithms for video-based surveillance systemsrdquo in MultisensorSurveillance Systems The Fusion Perspective G L Foresti CRegazzoni and P Varshney Eds pp 235ndash250 2003

[35] R Polikar ldquoEnsemble learningrdquo Scholarpedia vol 3 no 12article 2776 2008

[36] G Brown J Wyatt R Harris and X Yao ldquoDiversity creationmethods a survey and categorisationrdquo Information Fusion vol6 no 1 pp 5ndash20 2005

[37] M Bernas and B Płaczek ldquoFully connected neural networksensemble with signal strength clustering for indoor localizationinwireless sensor networksrdquo International Journal ofDistributedSensor Networks vol 2015 Article ID 403242 2015

[38] M Lewandowski T Orczyk and B Płaczek ldquoHuman activitydetection based on the iBeacon technologyrdquo Journal of MedicalInformatics Technologies vol 25 2016

[39] H-G Beyer and H-P Schwefel ldquoEvolution strategiesndashA com-prehensive introductionrdquo Natural Computing vol 1 no 1 pp3ndash52 2002

[40] M R Berthold N Cebron F Dill et al ldquoKNIMETheKonstanzInformation Minerrdquo in Data Analysis Machine Learning andApplications Studies inClassificationDataAnalysis andKnowl-edge Organization C Preisach H Burkhardt L Schmidt-Thieme and R Decker Eds Springer Berlin Germany

[41] B Scholkopf A J Smola R C Williamson and P L BartlettldquoNew support vector algorithmsrdquo Neural Computation vol 12no 5 pp 1207ndash1245 2000

[42] L Breiman ldquoRandom forestsrdquoMachine Learning vol 45 no 1pp 5ndash32 2001

[43] D F Specht ldquoProbabilistic neural networksrdquo Neural Networksvol 3 no 1 pp 109ndash118 1990

[44] D W Aha D Kibler and M K Albert ldquoInstance-BasedLearning Algorithmsrdquo Machine Learning vol 6 no 1 pp 37ndash66 1991

[45] N C Smeeton ldquoEarly History of the Kappa Statisticrdquo Biomet-rics vol 41 no 3 article 795 1985

International Journal of

AerospaceEngineeringHindawiwwwhindawicom Volume 2018

RoboticsJournal of

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Active and Passive Electronic Components

VLSI Design

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Shock and Vibration

Hindawiwwwhindawicom Volume 2018

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawiwwwhindawicom

Volume 2018

Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom

The Scientific World Journal

Volume 2018

Control Scienceand Engineering

Journal of

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom

Journal ofEngineeringVolume 2018

SensorsJournal of

Hindawiwwwhindawicom Volume 2018

International Journal of

RotatingMachinery

Hindawiwwwhindawicom Volume 2018

Modelling ampSimulationin EngineeringHindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Navigation and Observation

International Journal of

Hindawi

wwwhindawicom Volume 2018

Advances in

Multimedia

Submit your manuscripts atwwwhindawicom

Page 3: Road Traffic Monitoring System Based on Mobile …downloads.hindawi.com/journals/wcmc/2018/3251598.pdfIt should be noted that the intro-duced system structure, which includes BLE beacons

Wireless Communications and Mobile Computing 3

M

M

MM

B

B

B

Figure 1 Placement of mobile devices (M) and beacons (B)

easily detected based on simple RSSI analysis Differentsystems of this type were implemented with use of CC1101wireless communication modules [27] and XBee motes[28]

The above-discussed methods from the literature arenot suitable for the crowd sourcing applications as theyrequire energy-expensive data transfers (WiFi) or specializedhardware (ZigBee modules directional antennas) The newapproach proposed in this paper utilizes the Bluetooth lowenergy (BLE) communication which is commonly availablein smartphones According to the introduced approach BLEbeacons are usedwith iBeacon protocol [29] to broadcast dataframesThebeacon frames are registered by smartphones thatcollect the RSSI measurements aggregate them and send toa server for further analysis It should be noted here thatthe BLE beacons are cheap battery-powered devices that canwork for a long time (years) without battery replacementor charging Moreover the use of BLE communicationsignificantly extends the lifetime of smartphone battery incomparison to WiFi transmission [30] Nevertheless beacondiscovery has a significant impact on smartphone batteryusage thus the discovery time interval should be plannedcarefully The application of BLE communication for RSSI-based vehicle detection and classification has not beenconsidered previously by other authors This study involvesdetailed verification of the above-mentioned solution in real-traffic conditions

Another important drawback of the existingmethods liesin limited accuracy of vehicle detection and classification Toovercome this drawback a new ensemble of classifiers wasdesigned in this study which accurately detects vehicles andrecognizes three vehicle classes based on RSSI data collectedfrom multiple smartphones

The existing methods utilize single classifiers to detectvehicle and recognize its class In the related works the RSSI-based vehicle classification was implemented with use ofvarious classificationmethods artificial neural networks [22]k-Nearest Neighbor (k-NN) support vector machine (SVM)[23] decision trees [31] and logistic regression [32] A SVMmethod was adopted in [23] to train vehicle classificationmodels and categorize vehicles into two classes (passenger carand truck) The state-of-the-art algorithms are trained usingraw data [23] or a set of predefined features [31 32] To thebest authorsrsquo knowledge classifier ensembles have not been

previously adapted to deal with the RSSI-based road trafficmonitoring tasks

In machine learning literature various ensemble meth-ods are presented which combine several classifier systemsthat use different models or datasets [33] Several boot-strapping methods were considered (bagging or boosting)which allows us to optimize classifier ensembles [34] ormerge classifier decision [35] Research in [36 37] showsthat combined classifier can outperform the best individualclassifier under some conditions (eg majority voting by agroup of independent classifiers) That works have motivatedthe approach described in this paper which involves designand verification of classifier ensembles for traffic monitoringwith use of the RSSI data In comparison with the state-of-the-art methods that are based on single classifiers theproposed approach enabled more accurate vehicle detectionand classification

3 Proposed Method

The proposed vehicle detection and classification systemutilizes RSSI data collected by mobile devices (eg smart-phones) in a predetermined region on the side of the roadMobile devices measure signal strength when receiving radioframes from BLE beacons across the street The RSSI valuestogether with information about position of the device aretransmitted to a server which performs data aggregation andclassification

Structure of the proposed traffic monitoring system ispresented in Figure 1 It should be noted that the intro-duced system structure which includes BLE beacons andmobile devices has not been considered in the literatureThe BLE beacons are installed at different heights becausesuch arrangement is suitable for vehicle classification ierecognition of personal cars semitrucks and trucks [32]Beacons use the iBeacon protocol [29] to broadcast framesThe mobile devices on the opposite side of the road useBLE communication to collect incoming beacon frames andevaluate their RSSI Position of the device can be determinedbased on both the RSSI information and the GPS signal Thecollected data are transmitted to a server via cellular networkor WiFi communication

According to the iBeacon protocol three fields in thebroadcasted frames are available that identify the sending

4 Wireless Communications and Mobile Computing

1 while mobile device is active do

2 begin

3 t= current time

4 repeat

5 if new beacon frame received and RSSI gt threshold then

6 add record (time position beacon ID RSSI) to buffer

7 until (current time - t) gt T8 send records from buffer to server

9 end

Algorithm 1 Mobile device operations

1 create table Records with columns time position beacon ID RSSI

2 create table Events with columns time event type

3 at each time step do

4 if New records received then

5 begin

6 Records= Records union New records

7 time min = select min(time) from New records

8 time min = time min - window size

9 Selected records = select from Records where time gt= time min

10 Aggregates= aggregation( Selected records window size )

11 New events = events recognition (Aggregates)

12 Events = events update (Events New Events )

13 End

Algorithm 2 Server operations

beacon UUID (universally unique identifier) Mayor andMinor value UUID contains 32 hexadecimal digits splitinto 5 groups separated by hyphens The iBeacon standardrequires also Mayor and Minor value to be assigned Thosetwo values help to identify beacons with greater accuracythan using the UUID alone The Minor and Major valuesare unsigned integers between 0 and 65535 The purpose ofthe UUID is to distinguish beacons in a given network frombeacons in other networks For instance the same UUIDcan be used for all beacons in a traffic monitoring systemwhich coversmany detection areasMajor values are intendedto identify a group of beacons eg all beacons in a certaindetection area can be assigned a unique Major value FinallyMinor values are intended to distinguish an individualbeacon The Minor value can be used for distinguishingindividual beacons installed at different heights within adetection area In this paper the 3-tuple of UUID Major andMinor fields is referred to as beacon ID

In this study new algorithms (Algorithms 1ndash5) weredesigned and implemented to enable accurate vehicle detec-tion and classification with use of BLE beacons and mobiledevices Details of the operations performed bymobile deviceare presented in Algorithm 1The received beacon frames areignored if the RSSI is below a predetermined threshold In theopposite situation a new data record is created and written toa buffer The data record contains information about framereception time device position ID of frame sender (beacon)and RSSI value The content of the buffer is periodically sent

to the server Frequency of these data transfers is controlledby parameter 119879 It should be noted that the beacon framescollection and data transfer to server can be performed inparallel if appropriate hardware solution is available

The objective of server operations (Algorithm 2) is torecognize event type based on the data records delivered frommobile devices The event type determines if the monitoredroad section was empty or a car was present in this sectionduring transmission of beacon frames Additionally the typeof the event indicates class of detected vehicle (personal carsemitruck or truck) According to the proposed method thetype of the event is recognized using a classifier ensemble(Algorithm 4)

Before execution of the classification procedure the inputdata are aggregated The proposed aggregation procedureis based on so-called sliding window concept [38] (Algo-rithm 3) It means that if a new data record is receivedwhich contains RSSI value for time t then the aggregationoperation refers to a collection of data records for which theframe reception time 1199051015840 satisfies condition t ndash 119908 le 1199051015840 let where 119908 is size of the time window Such collection ofdata records is used to calculate aggregates (statistics) ofRSSI values ie minimummaximum average and standarddeviation Separate aggregates are determined for each pairof the transmitter (beacon) position and the receiver (mobiledevice) position The positions of beacons do not changethus they are identified by the beacon ID In contrast currentposition of mobile device is assigned to the nearest reference

Wireless Communications and Mobile Computing 5

1 Input Records window size

2 Output Aggregates

3 create table Aggregates

4 with columns time min 1 1 max 1 1 min m n max m n

5 Times= Select time from Records

6 for each t in Times do

7 begin

8 for refPos = 1m do

9 for bID = 1n do

10 begin

11 RSSI data = Select RSSI from Records

12 where time is between t - window size and t

13 and distance(position refPos ) lt= d max

14 and beacon ID = bID

15 min refPos bID = min( RSSI data )

16 max refPos bID = max( RSSI data )

17 end

18 Insert t min 1 1 max 1 1 min m n max m n into Aggregates

19 End

Algorithm 3 Aggregation function

1 Input Aggregates

2 Output New events

3 create table New events with columns time event type

4 Times= Select time from Aggregates

5 for each t in Times do

6 begin

7 votes= empty array

8 for each classifier in ensemble

9 begin

10 [a b]= classifier range

11 data= Select min a 1 max a 1 min b n max b n

12 from Aggregates where time = t

13 event type = classifier(data)

14 votes[ event type ]= votes[ event type ] + classifier weight

15 end

16 event type = arg max (votes[ event type ])

17 Insert t event type into New events

18 End

Algorithm 4 Events recognition function

1 Input Events New events

2 Output Events

3 New times = Select time from New events

4 Times= Select time from Events

5 for each t in New times do

6 begin

7 event= Select from New events where time = t

8 if t is in Times then Delete from Events where time = t

9 Insert event into Events

10 End

Algorithm 5 Events update function

6 Wireless Communications and Mobile Computing

position It should be noted that a set of reference positionsin the region of interest on the side of the road has to bedetermined in advance

Details of the proposed data aggregation procedure arepresented by the pseudocode in Algorithm 3 For the sakeof simplicity it was assumed in this pseudocode that onlytwo statistics are to be calculated (maximum andminimum)In practical applications the number of statistics has to belarger as discussed in Section 4The symbolsmin refPos bIDand max refPos bID in Algorithm 3 denote the minimumand maximum RSSI value determined for frames sent frombeacon bID and received by amobile device close to referenceposition refPos in time window [t ndash 119908 t] The statementthat a mobile device is close to a reference position meansthat its distance to the reference position is below d max Itshould be noted that d max is set to be lower than half oftheminimumdistance between reference positions thus eachmobile device is assigned to single reference position Thenumber of reference positions and the number of beacons inAlgorithm 3 are denoted by119898 and n respectively

As it was already mentioned above in this section thetype of the event (which relates to vehicle presence and class)is recognized based on the aggregated RSSI data by usinga classifier ensemble (Algorithm 4) The proposed ensembleconsists of classifiers that are fed with various subsets of theaggregated data A different set of the reference positionsfor which the RSSI data are collected is assigned to eachclassifier in the ensemble Hereinafter this set will be referredto as the classifier rangeThe reference positions are identifiedby natural numbers 1 m Thus the classifier range canbe defined by a pair [a b] where 1 le a le m and a leb le m The range [119886 119887] means that the input dataset ofthe corresponding classifier includes the aggregates (egmin refPos bID and max refPos bID) that were determinedfor the reference positions refPos = a b In case of range[1 119898] the classifier utilizes the complete dataset On the otherhand the classifierrsquos input dataset includes the RSSI readingsfor only one reference position when a =b

For each classifier in the ensemble a weight is determinedwhich corresponds to number of the classifierrsquos votes Thetotal number of votes for a given event type is calculatedby adding the weights of the classifiers that have recognizedthis particular event type As a result the event type whichreceives the highest total number of votes is selected Incase of a tie the class which has higher a priori probabilityis selected Weights of the classifiers are adjusted duringtraining procedure with use of the evolutionary strategy [39]

In this study application of various machine learningalgorithms was considered for implementation of the pro-posed ensemble (support vector machines random forestprobabilistic neural network and k-nearest neighborsrsquo algo-rithm) [31 40] A separate training dataset which includesclasses (ie event types) determined by human observer wasused to train the classifiers

After the events are recognized an update of the vehiclesclassification and detection results is conducted in accor-dance with Algorithm 5This update is necessary because thenew results can be related to time moments for which someevents have already been recognized The new results are

Beacons

Referenceposition 1

Referenceposition 2

Referenceposition 3

Referenceposition 4

4 m

8 m

Figure 2 Test site with reference positions and beacons

Figure 3 Mobile application used for data collection

more credible as they take into account additional recentlycollected data Thus the previous results are deleted Finallythe table Events includes the information about event type forall time points covered by the available RSSI dataset It shouldbe also noted that in this study four event types are considered(empty road presence of personal car semitruck and truck)

4 Experimental Results

Usefulness of the proposed vehicle detection and classifica-tion method was verified during experiments in real-worldtraffic conditions A schemaof the test site aswell as distancesbetween reference positions and beacons is presented inFigure 2 Three BLE beacons were installed on road sideat height of 50 100 and 200 centimeters above the roadsurface This configuration was selected as providing themost promising results on the basis of preliminary tests [32]On the opposite side of the road four reference points weredetermined in equal distances of 4 meters In this area theRSSI measurements were conducted using four smartphonesRedmi 3S held at a height of about 1 meter near to thereference positions The data were collected in a periodof two hours During that period more than 400 vehicleshave passed through the analyzed road section A mobileapplication was developed to enable effective collection ofthe experimental data (Figure 3) Additional mobile deviceswere used by observers to record the events related topresence of vehicles in front of the reference locations withrecognition of three vehicle classes (personal car semitruck

Wireless Communications and Mobile Computing 7

minus95

minus90

minus85

minus80

minus75

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

RSSI

[dBm

]

Time [s]

C D D T

C - carD - semi truckT - truck

(a)

minus95

minus90

minus85

minus80

minus75

RSSI

[dBm

]

Time [s]1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

C D D T

C - carD - semi truckT - truck

(b)

Figure 4 Example of collected data (a) reference position 1 and (b) reference position 4

and truck) All themobile deviceswere synchronized viaNTPprotocol

Examples of collected records for two different referencepositions are presented in Figure 4 The vertical red linesin Figure 4 show the time instances when passing vehicleswere registered by the observers The labels below verticallines denote class of the vehicles These results show thatthe vehicles cause visible changes of RSSI for both locationsMoreover the signal noise increases with distance betweenbeacons and mobile device (Figure 4(a))

For the experimental purposes the collected data weredivided into training and test datasets The experiments wereconducted to evaluate the accuracy of automatic vehicleclassification based on the collected data with use of differentmachine learning algorithms ie support vector machines(SVM) random forest (RF) probabilistic neural network(PNN) and k-nearest neighborsrsquo algorithm (KNN)

The SVM algorithm [41] performs classification tasks byusing hyperplanes defined in a multidimensional space Thehyperplanes that separate training data points with differentclass labels are constructed at the training phase SVMemploys an iterative training procedure to find the optimalhyperplanes having the largest distance to the nearest trainingdata point of any class The larger distance results in lowergeneralization error of the classifier

In case of RF classifier [42] the training procedure createsa set of decision trees from randomly selected subset of train-ing data Each tree performs the classification independentlyand ldquovotesrdquo for the selected class Finally the votes fromdifferent decision trees are aggregated to decide the class ofa test object At this step the RF algorithm chooses the classhaving the majority of votes from particular decision trees

PNN [43] includes three layers of neurons (input layerhidden layer and output layer) The neurons in hidden layerdetermine similarity between test input vector and the train-ing vectors To evaluate this similarity each hidden neuronuses a Gaussian function which is centered on a trainingvector The hidden neurons are collected into groups onegroup for each of the classes There is also one neuron in theoutput layer for each classThe output neuron calculates classprobability on the basis of values received from all hiddenneurons in a given group As a result the posterior probabilityis evaluated for all considered classesThe final decision of theclassifier is the class with maximum probability

KNN algorithm [44] computes distances between thetest data point and all training data points in feature space

072073074075076077078079080081

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20k

Vehicle classification accuracy

Figure 5 Impact of parameter k (number of the nearest neighbors)on accuracy of KNN algorithm

Afterwards k training data points with the lowest distancesare selected as the nearest neighbors The test data point isassigned to the class which is most common among the k-nearest neighbors

During experiments the classification accuracy was com-pared for several RSSI-based traffic monitoring approachesincluding the proposed solution and the state-of-the-artmethods from the literature This comparison takes intoaccount the method with one receiver [25] solutions withmultiple spatially distributed receivers and single classifierwhich detects the vehicles based on a complete RSSI dataset[22 23] and the new introduced algorithmwith the ensembleof classifiers

Initial experiments were conducted to calibrate parame-ters of the algorithms In these experiments vehicle classifi-cation was performed with use of 8 aggregates (minimummaximum difference between max and min mean stan-dard deviation median Pearson correlation coefficient andnumber of received frames) The aggregates were calculatedbased on the RSSI data collected in four reference positionsin accordance with Algorithm 3

Accuracy of the KNN algorithm was tested for parameterk (number of the nearest neighbors) in range between 1and 20 Results of the tests are presented in Figure 5 Basedon these results the value k = 7 which gave the highestclassification accuracy was selected for further experiments

Figure 6 shows the classification accuracy that wasachieved by using the RF algorithm with different number

8 Wireless Communications and Mobile Computing

070

075

080

085

090

095

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20number of decision trees

Vehicle classification accuracy

Figure 6 Accuracy of random forest algorithm for different numberof decision trees

045

055

065

075

085

095

1 2 3 4 5 6Window size [s]

Vehicle classification accuracy

Random ForestKNN

Figure 7 Impact of window size parameter on accuracy of RF andKNN algorithms

of decision trees It can be observed in these results that theaccuracy does not change significantly for the number ofdecision trees above 5 However the accuracy achieved forthe tree number between 6 and 9 was slightly lower than forthe RF with 10 trees A little decrease of the accuracy wasalso observed for the tree number above 10Therefore duringexperiments described later in this section the number ofdecision trees was set to 10 It should be also noted that thecomplexity of the algorithm increases when using a larger setof the decision trees

The impact of the window size on vehicle classificationaccuracy was also examined during the preliminary exper-iments The window size was changed from 1 to 6 secondswith steps of 1 second As shown in Figure 7 for RF andKNN algorithms the best results were obtained when usingthe window size of 3 seconds In case of larger windows theclassification accuracy decreases because the data registeredfor multiple vehicles are aggregated in one window Similarresults were also observed for SVM and PNN algorithmsThus the 3-second window was used in further experiments

088

089

090

091

092

093

Noattributeremoved

Minimum Maximum Average Standarddeviation

Median Framecount

Difference Pearsonscorrelationcoefficient

Removed attribute

Vehicle classification accuracy

Figure 8 Impact of attribute selection on accuracy of RF algorithm

At the next step the most effective set of attributeswas selected with use of the backward elimination methodResults of the elimination for the RF algorithm are presentedin Figure 8 At the beginning the classification accuracy wastested using full dataset with 8 aggregates The result of thistest is shown by the leftmost bar in Figure 8 Next tests wereperformed for the 8 datasets that were created by removingparticular aggregates (attributes) As shown in Figure 8an improvement of the vehicle classification accuracy wasachieved after deletion of the ldquodifferencerdquo attribute (ie thedifference between maximum and minimum) Thus thereduced dataset includes 7 aggregates minimum maximummean standard deviation median Pearson correlation coef-ficient and number of received frames Further eliminationdid not improve the results It was verified that the deletionof the ldquodifferencerdquo attribute is beneficial for all consideredclassification algorithms

Table 1 shows the vehicle detection and classificationaccuracy obtained for the basic approach which takes intoaccount the signal strength measured by a single device[25] (in one reference position) These results were obtainedafter the above-discussed initial search of the best algorithmparameters As it was already mentioned in previous sectionin case of the vehicle classification task four classes ofevents are considered empty road presence of personal carsemitruck and truck For the vehicle detection problem twoclasses are taken into account empty road and presenceof a vehicle The accuracy (ACC) was calculated as overallaccuracy using the following formula

ACC =sum

ni=1 CiD

(1)

where n is number of classes Ci is number of items (events)in the test dataset that are correctly assigned to ith class (eventtype) and D is number of items in test dataset

It should be also noted that the results in Table 1 arepresented for the two classification algorithms that providethe best accuracy These results firmly show that the most

Wireless Communications and Mobile Computing 9

Table 1 Accuracy of vehicle detection and classification based on data collected in one reference position

Reference position Vehicle classification accuracy Vehicle detection accuracyKNN RF KNN RF

1 0788 0817 08486 08642 0702 0699 07311 08013 0725 0804 07807 08594 0822 0861 08982 0932

Table 2 Accuracy of vehicle classification based on data collected in four reference positions

Window size [s]Classification algorithm

RF KNN PNN SVMACC CK ACC CK ACC CK ACC CK

2 0885 0801 0619 0287 0533 0099 0525 00003 0922 0865 0809 0658 0684 0403 0561 00894 0914 0853 0773 0582 0802 0639 0734 05335 0843 0729 0794 0630 0629 0286 0538 00366 0799 0651 0747 0549 0728 0512 0559 0088

accurate vehicle classification and detection was possiblewhen the mobile device is placed opposite the beacons loca-tion (in reference position 4)The results confirmobservationthat noise in RSSI readings increases with the distance frombeacons to mobile device It should be also noted that thenumber of RSSI samples that are collected when a vehicleis present between beacons and mobile device decreaseswith the speed of the vehicle As a result lower accuracyis observed for higher speed of vehicles In the consideredtest site the vehicles were slowing down when passingthe reference position 1 since this position was close to acrossroadThus the accuracy obtained for reference position1 is higher than for reference positions 2 and 3

In further tests the other approachwas considered whichis based on application of multiple receivers and one classifier[22 23] According to this approach the vehicles wererecognized by single classifier using the dataset collectedin four reference positions Results of these experimentsare shown in Table 2 The classification accuracy (ACC)and Cohenrsquos kappa [45] (CK) is compared in Table 2 forall considered classification algorithms and various sizes ofthe sliding window When comparing the results in Table 2with those in Table 1 it can be observed that the RSSIdata collected by multiple devices in several locations alongthe road enable more accurate vehicle classification Similarexperiments were also conducted for the vehicle detectiontask and the accuracy of 0935 was achieved

The results in Table 2 firmly show that size of the slidingwindow has a significant impact on the accuracy of vehicledetection and classification Passing vehicles cause a dropin RSSI level This drop is longer for trucks and shorter forpersonal cars In order to correctly recognize the vehicle thesliding window has to cover the time when RSSI values arereduced If the sliding window is to narrow the lower RSSIvaluesmay be registered in entirewindow for different vehicleclasses and thus the classes cannot be correctly recognizedIf single classifier is used a wider window is also helpful

because the drop of RSSI is shifted in time for differentreference locations However in case of an excessive windowsize two successive vehicles can be captured in one windowwhich results in decreased accuracy of the detection andclassification The best result results were obtained by usingthe random forest classifier with window size of 3 seconds

The next step of the research was aimed at increasingthe accuracy of vehicle detection by using the proposedclassifier ensemble in combination with majority voting asdescribed in Section 3 It should be noted that the proposedmethod was used with time step of 1 second and d max =1 meter During the tests of the ensemble different rangesof individual member classifiers were taken into account(see Table 3) The input data of individual classifiers wereobtained not only from particular reference positions (egClassifier 1 in Ensemble no 1) but also from a connection ofthe neighboring positions (eg Classifier 1 in Ensemble no3) When analyzing the results presented in Table 3 it canbe observed that the highest accuracy was achieved for theensembles of the random forest classifiersThe best ensemble(no 5) combines the classifiers that are fed with data fromtwo neighboring reference positions (Classifiers 1-3) with theclassifier created for reference position 4 (Classifier 4) andthe classifier which utilizes the entire dataset (Classifier 5)Classifier 4 with range [4 4] was included in the ensembleas it provides the best accuracy when using data from singlereference position The high accuracy was also obtained forEnsembles no 2 and 6 Results of these ensembles are onlyslightly worse than those for Ensemble no 5 This fact showsthat the proposed approach achieves high vehicle classifica-tion and detection accuracy by combining local classifiers(that utilize data from two neighboring reference positionsor single reference position) with the global classifier (whichmakes decisions based on data collected in all referencepositions)

It was noted that the random forest algorithm wasabout 85 more effective than KNN The proposed method

10 Wireless Communications and Mobile Computing

Table 3 Accuracy of vehicle detection and classification with use of the proposed classifier ensemble

Ensemble no Classifier range Vehicle classification accuracy Vehicle detection accuracyClas 1 Clas 2 Clas 3 Clas 4 Clas 5 KNN RF KNN RF

1 [1 1] [2 2] [3 3] [4 4] - 0862 0890 0906 09562 [1 1] [2 2] [3 3] [4 4] [1 4] 0862 0935 0898 09613 [1 2] [2 3] [3 4] - - 0799 0922 0854 09634 [1 2] [2 3] [3 4] [4 4] - 0833 0922 0898 09695 [1 2] [2 3] [3 4] [4 4] [1 4] 0846 0943 0898 09776 [1 2] [2 3] [3 4] - [1 4] 0825 0940 0854 09697 [1 3] [2 4] - - - 0781 0911 0752 09378 [1 3] [2 4] [4 4] 0836 0922 0898 09589 [1 3] [2 4] [4 4] [1 4] 0846 0932 0898 096610 [4 4] [1 4] 0846 0924 0828 0935

070

075

080

085

090

095

100

RFensemble

no 2

RFensemble

no5

RFensemble

no6

RFsingle

classifier

KNNensemble

no 2

KNNensemble

no 5

KNNensemble

no 6

KNNsingle

classifier

Vehicle detection accuracy

Figure 9 Comparison of vehicle detection accuracy for classifierensembles and for single classifiers

achieves the accuracy above 97 for vehicle detection taskand above 94 in case of the vehicle classification taskIt means that the introduced classifier ensemble providesbetter results than the state-of-the-art methods that utilizeindividual classifiers (see Tables 1 and 2)

Results obtained for the best classifier ensembles and forthe individual (single) classifiers are compared in Figures9 and 10 The box plots show minimum first quartilemedian third quartile and maximum of the accuracy valuesfor 30 tests For each test different training and testingdatasets were selected from the measurement data In theseresults significant differences of the accuracy are visible whencomparing the single classifiers with their ensemble counter-parts Similarly the accuracy differences are significant whencomparing the RF classifiers with KNN classifiers It shouldbe also noted that the accuracies achieved by the best RFensembles do not differ significantly Thus selection amongthese ensembles should be considered as a tuning of theproposed method

The higher accuracy of RF ensemble can be explainedby the fact that the RF algorithm has several features whichenable effective training of the classifier According to thisalgorithm all decision trees in the forest are created by

070

075

080

085

090

095

100

RFensemble

no 2

RFensemble

no5

RFensemble

no6

RFsingle

classifier

KNNensemble

no 2

KNNensemble

no 5

KNNensemble

no 6

KNNsingle

classifier

Vehicle classification accuracy

Figure 10 Comparison of vehicle classification accuracy for classi-fier ensembles and for single classifiers

using randomly selected subsets of the training dataset Therandom selection applies to both the events (rows) and theaggregates (columns) Each decision tree further divides thetraining data into smaller subsets until the subsets are smallor all events in these subsets belong to one class In contrast toRF the other compared algorithms (includingKNN) performthe training procedures with use of the complete trainingdataset

5 Conclusions

The proposed vehicle detection and classification approachuses mobile devices (smartphones) and Bluetooth beaconsfor road traffic monitoring It allows detecting three classesof vehicles by analyzing strength of radio signal received fromBLE beacons that are installed at different heights by the roadThis approach is suitable for crowd sourcing applicationsaimed at reducing travel time congestion and emissionsAdvantages of the introduced method were demonstratedduring experimental evaluation in real-traffic conditionsExtensive experiments were conducted to test different clas-sification approaches and data aggregation methods In com-parison with state-of-the-art RSSI-based vehicle detection

Wireless Communications and Mobile Computing 11

methods higher accuracy was achieved by introducing adedicated ensemble of random forest classifiers withmajorityvoting

The presented solution can be extended to several bea-cons installed along the road to obtain information concern-ing vehicle velocity and direction Another interesting topicis related to data preprocessing on mobile devices in order toreduce the communication effort Finally additional studieswill be necessary to introduce methods that can be usedto activate the Bluetooth modules and beacons when it isnecessary and reduce the energy consumption

Data Availability

The data used to support the findings of this study areincluded within the supplementary information file

Conflicts of Interest

The authors declare that there are no conflicts of interestregarding the publication of this paper

Acknowledgments

The research was supported by the National Centre forResearch and Development (NCBR) [Grant no LIDER180064L-715NCBR2016]

Supplementary Materials

The supplementary material file (csv) includes a raw RSSIdataset where ldquoidrdquo denotes number of measurement ldquoNoderdquois an identifier of mobile device (receiver) ldquoiBeaconrdquo is anidentifier of beacon (transmitter) ldquoRSSIrdquo is the measuredRSSI value ldquoClassrdquo describes type of observed event (Eempty road C personal car D semitruck and T truck) andldquoFlagrdquo indicates the measurements for which the events wererecorded (symbol ldquo+rdquo) (Supplementary Materials)

References

[1] H Chang Y Wang and P A Ioannou ldquoThe use of micro-scopic traffic simulation model for traffic control systemsrdquo inProceedings of the 2007 International Symposium on InformationTechnology Convergence ISITC 2007 pp 120ndash124 November2007

[2] M Bernas B Płaczek P Porwik and T Pamuła ldquoSegmentationof vehicle detector data for improved k-nearest neighbours-based traffic flow predictionrdquo IET Intelligent Transport Systemsvol 9 no 3 pp 264ndash274 2014

[3] I Ahmad R M Noor I Ali M Imran and A VasilakosldquoCharacterizing the role of vehicular cloud computing in roadtrafficmanagementrdquo International Journal of Distributed SensorNetworks vol 13 no 5 2017

[4] B Płaczek ldquoA self-organizing system for urban traffic controlbased on predictive interval microscopic modelrdquo EngineeringApplications of Artificial Intelligence vol 34 pp 75ndash84 2014

[5] M Karpinski A Senart and V Cahill ldquoSensor networks forsmart roadsrdquo in Proceedings of the 4th Annual IEEE Interna-tional Conference on Pervasive Computing and CommunicationsWorkshops (PerCom rsquo06) pp 310ndash314 IEEE Pisa Italy March2006

[6] G Chatzimilioudis A Konstantinidis C Laoudias and DZeinalipour-Yazti ldquoCrowdsourcing with smartphonesrdquo IEEEInternet Computing vol 16 no 5 pp 36ndash44 2012

[7] R Prabha and M G Kabadi ldquoKNODET A Framework toMine GPS Data for Intelligent Transportation Systems at TrafficSignalsrdquo in Proceedings of the 2017 International Conference onRecent Advances in Electronics and Communication Technology(ICRAECT) pp 85ndash89 Bangalore India March 2017

[8] Y Ma L Zhou Z Gu Y Song and B Wang ldquoChannel Accessand Power Control for Mobile Crowdsourcing in Device-to-DeviceUnderlaidCellularNetworksrdquoWireless Communicationsand Mobile Computing vol 2018 Article ID 7192840 13 pages2018

[9] X Zhang Z Yang W Sun et al ldquoIncentives for mobile crowdsensing A surveyrdquo IEEE Communications Surveys amp Tutorialsvol 18 no 1 pp 54ndash67 2016

[10] N D Lane E Miluzzo H Lu D Peebles T Choudhury andA T Campbell ldquoA survey of mobile phone sensingrdquo IEEECommunications Magazine vol 48 no 9 pp 140ndash150 2010

[11] W Z Khan Y Xiang M Y Aalsalem and Q Arshad ldquoMobilephone sensing systems a surveyrdquo IEEE Communications Sur-veys amp Tutorials vol 15 no 1 pp 402ndash427 2013

[12] R K Ganti F Ye and H Lei ldquoMobile crowdsensing currentstate and future challengesrdquo IEEE Communications Magazinevol 49 no 11 pp 32ndash39 2011

[13] A T Campbell S B Eisenman N D Lane et al ldquoThe rise ofpeople-centric sensingrdquo IEEE Internet Computing vol 12 no 4pp 12ndash21 2008

[14] N Maisonneuve M Stevens M E Niessen and L SteelsldquoNoiseTube Measuring and mapping noise pollution withmobile phonesrdquo Information Technologies in EnvironmentalEngineering pp 215ndash228 2009

[15] C Costa C Laoudias D Zeinalipour-Yazti and D GunopulosldquoSmartTrace Finding similar trajectories in smartphone net-works without disclosing the tracesrdquo in Proceedings of the 2011IEEE 27th International Conference on Data Engineering ICDE2011 pp 1288ndash1291 April 2011

[16] J Gomez J C Torrado and G Montoro ldquoUsing Smartphonesto Assist People withDown Syndrome inTheir Labour Trainingand Integration A Case Studyrdquo Wireless Communications andMobile Computing vol 2017 Article ID 5062371 15 pages 2017

[17] CWu Z Yang and Y Liu ldquoSmartphones based crowdsourcingfor indoor localizationrdquo IEEE Transactions on Mobile Comput-ing vol 14 no 2 pp 444ndash457 2015

[18] S Matyas C Matyas C Schlieder P Kiefer H Mitarai andM Kamata ldquoDesigning location-based mobile games witha purpose Collecting geospatial data with cityexplorerrdquo inProceedings of the 2008 International Conference on Advancesin Computer Entertainment Technology ACE 2008 pp 244ndash247December 2008

[19] H Aly A Basalamah and M Youssef ldquoRobust and ubiquitoussmartphone-based lane detectionrdquo Pervasive and Mobile Com-puting vol 26 pp 35ndash56 2016

[20] E Koukoumidis L-S Peh and M R Martonosi ldquoSignalGuruleveraging mobile phones for collaborative traffic signal sched-ule advisoryrdquo in Proceedings of the 9th International Conference

12 Wireless Communications and Mobile Computing

on Mobile Systems Applications and Services pp 127ndash140 July2011

[21] A Thiagarajan L Ravindranath K LaCurts et al ldquoVTrackaccurate energy-aware road traffic delay estimation usingmobile phonesrdquo in Proceedings of the 7th ACM Conference onEmbedded Networked Sensor Systems (SenSys rsquo09) pp 85ndash98November 2009

[22] MWon S Zhang and SH Son ldquoWiTraffic Low-cost and non-intrusive traffic monitoring system using WiFirdquo in Proceedingsof the 26th International Conference on Computer Communica-tions and Networks ICCCN 2017 pp 1ndash9 IEEE August 2017

[23] MHaferkampMAl-Askary DDorn et al ldquoRadio-based Traf-fic Flow Detection and Vehicle Classification for Future SmartCitiesrdquo in 2017 IEEE 85thVehicular TechnologyConference (VTCSpring) pp 1ndash5 Sydney NSW Australia 2017

[24] G Horvat D Sostaric and D Zagar ldquoUsing radio irregularityfor vehicle detection in adaptive roadway lightingrdquo in Proceed-ings of the 35th International Convention on Information andCommunication Technology Electronics and MicroelectronicsMIPRO 2012 pp 748ndash753 IEEE May 2012

[25] S Roy R Sen S Kulkarni P Kulkarni B Raman and L KSingh ldquoWireless across road RF based road traffic congestiondetectionrdquo in Proceedings of the 2011 Third International Con-ference on Communication Systems and Networks (COMSNETS2011) pp 1ndash6 IEEE January 2011

[26] N Kassem A E Kosba and M Youssef ldquoRF-based vehicledetection and speed estimationrdquo in 2012 IEEE 75th VehicularTechnology Conference (VTC Spring) pp 1ndash5 IEEE

[27] X Li and J Wu ldquoA new method and verification of vehiclesdetection based on RSSI variationrdquo in 2016 10th InternationalConference on Sensing Technology (ICST) pp 1ndash6 IEEE

[28] P Mestre R Guedes P Couto J Matias J C Fernandes andC Serodio ldquoVehicle Detection for Outdoor Car Parks usingIEEE802154rdquo Lecture Notes in Engineering and ComputerScience Newswood Limited ndash IAENG 2013

[29] Apple Inc Getting Started with iBeacon Tech Rep 10 June2014

[30] A Lindemann B Schnor J Sohre and P Vogel ldquoIndoorpositioning A comparison of WiFi and Bluetooth Low Energyfor region monitoringrdquo in Proceedings of the International JointConference on Biomedical Engineering Systems and TechnologiesVolume 5 HEALTHINF pp 314ndash321 Rome Italy February2016

[31] VMartsenyuk KWarwas K Augustynek et al ldquoOnmultivari-ate method of qualitative analysis of Hodgkin-Huxley modelwith decision tree inductionrdquo in Proceedings of the 2016 16thInternational Conference on Control Automation and Systems(ICCAS) pp 489ndash494 Gyeongju South Korea October 2016

[32] M Bernas B Płaczek and W Korski ldquoWireless Networkwith Bluetooth Low Energy Beacons for Vehicle Detectionand Classificationrdquo in CN 2018 Computer Networks P GajM Sawicki G Suchacka and A Kwiecien Eds vol 860 ofCommunications inComputer and Information Science pp 429ndash444 Springer 2018

[33] MWozniak M Grana and E Corchado ldquoA survey of multipleclassifier systems as hybrid systemsrdquo Information Fusion vol 16no 1 pp 3ndash17 2014

[34] G Marcialis and F Roli ldquoFusion of face recognition algo-rithms for video-based surveillance systemsrdquo in MultisensorSurveillance Systems The Fusion Perspective G L Foresti CRegazzoni and P Varshney Eds pp 235ndash250 2003

[35] R Polikar ldquoEnsemble learningrdquo Scholarpedia vol 3 no 12article 2776 2008

[36] G Brown J Wyatt R Harris and X Yao ldquoDiversity creationmethods a survey and categorisationrdquo Information Fusion vol6 no 1 pp 5ndash20 2005

[37] M Bernas and B Płaczek ldquoFully connected neural networksensemble with signal strength clustering for indoor localizationinwireless sensor networksrdquo International Journal ofDistributedSensor Networks vol 2015 Article ID 403242 2015

[38] M Lewandowski T Orczyk and B Płaczek ldquoHuman activitydetection based on the iBeacon technologyrdquo Journal of MedicalInformatics Technologies vol 25 2016

[39] H-G Beyer and H-P Schwefel ldquoEvolution strategiesndashA com-prehensive introductionrdquo Natural Computing vol 1 no 1 pp3ndash52 2002

[40] M R Berthold N Cebron F Dill et al ldquoKNIMETheKonstanzInformation Minerrdquo in Data Analysis Machine Learning andApplications Studies inClassificationDataAnalysis andKnowl-edge Organization C Preisach H Burkhardt L Schmidt-Thieme and R Decker Eds Springer Berlin Germany

[41] B Scholkopf A J Smola R C Williamson and P L BartlettldquoNew support vector algorithmsrdquo Neural Computation vol 12no 5 pp 1207ndash1245 2000

[42] L Breiman ldquoRandom forestsrdquoMachine Learning vol 45 no 1pp 5ndash32 2001

[43] D F Specht ldquoProbabilistic neural networksrdquo Neural Networksvol 3 no 1 pp 109ndash118 1990

[44] D W Aha D Kibler and M K Albert ldquoInstance-BasedLearning Algorithmsrdquo Machine Learning vol 6 no 1 pp 37ndash66 1991

[45] N C Smeeton ldquoEarly History of the Kappa Statisticrdquo Biomet-rics vol 41 no 3 article 795 1985

International Journal of

AerospaceEngineeringHindawiwwwhindawicom Volume 2018

RoboticsJournal of

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Active and Passive Electronic Components

VLSI Design

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Shock and Vibration

Hindawiwwwhindawicom Volume 2018

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawiwwwhindawicom

Volume 2018

Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom

The Scientific World Journal

Volume 2018

Control Scienceand Engineering

Journal of

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom

Journal ofEngineeringVolume 2018

SensorsJournal of

Hindawiwwwhindawicom Volume 2018

International Journal of

RotatingMachinery

Hindawiwwwhindawicom Volume 2018

Modelling ampSimulationin EngineeringHindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Navigation and Observation

International Journal of

Hindawi

wwwhindawicom Volume 2018

Advances in

Multimedia

Submit your manuscripts atwwwhindawicom

Page 4: Road Traffic Monitoring System Based on Mobile …downloads.hindawi.com/journals/wcmc/2018/3251598.pdfIt should be noted that the intro-duced system structure, which includes BLE beacons

4 Wireless Communications and Mobile Computing

1 while mobile device is active do

2 begin

3 t= current time

4 repeat

5 if new beacon frame received and RSSI gt threshold then

6 add record (time position beacon ID RSSI) to buffer

7 until (current time - t) gt T8 send records from buffer to server

9 end

Algorithm 1 Mobile device operations

1 create table Records with columns time position beacon ID RSSI

2 create table Events with columns time event type

3 at each time step do

4 if New records received then

5 begin

6 Records= Records union New records

7 time min = select min(time) from New records

8 time min = time min - window size

9 Selected records = select from Records where time gt= time min

10 Aggregates= aggregation( Selected records window size )

11 New events = events recognition (Aggregates)

12 Events = events update (Events New Events )

13 End

Algorithm 2 Server operations

beacon UUID (universally unique identifier) Mayor andMinor value UUID contains 32 hexadecimal digits splitinto 5 groups separated by hyphens The iBeacon standardrequires also Mayor and Minor value to be assigned Thosetwo values help to identify beacons with greater accuracythan using the UUID alone The Minor and Major valuesare unsigned integers between 0 and 65535 The purpose ofthe UUID is to distinguish beacons in a given network frombeacons in other networks For instance the same UUIDcan be used for all beacons in a traffic monitoring systemwhich coversmany detection areasMajor values are intendedto identify a group of beacons eg all beacons in a certaindetection area can be assigned a unique Major value FinallyMinor values are intended to distinguish an individualbeacon The Minor value can be used for distinguishingindividual beacons installed at different heights within adetection area In this paper the 3-tuple of UUID Major andMinor fields is referred to as beacon ID

In this study new algorithms (Algorithms 1ndash5) weredesigned and implemented to enable accurate vehicle detec-tion and classification with use of BLE beacons and mobiledevices Details of the operations performed bymobile deviceare presented in Algorithm 1The received beacon frames areignored if the RSSI is below a predetermined threshold In theopposite situation a new data record is created and written toa buffer The data record contains information about framereception time device position ID of frame sender (beacon)and RSSI value The content of the buffer is periodically sent

to the server Frequency of these data transfers is controlledby parameter 119879 It should be noted that the beacon framescollection and data transfer to server can be performed inparallel if appropriate hardware solution is available

The objective of server operations (Algorithm 2) is torecognize event type based on the data records delivered frommobile devices The event type determines if the monitoredroad section was empty or a car was present in this sectionduring transmission of beacon frames Additionally the typeof the event indicates class of detected vehicle (personal carsemitruck or truck) According to the proposed method thetype of the event is recognized using a classifier ensemble(Algorithm 4)

Before execution of the classification procedure the inputdata are aggregated The proposed aggregation procedureis based on so-called sliding window concept [38] (Algo-rithm 3) It means that if a new data record is receivedwhich contains RSSI value for time t then the aggregationoperation refers to a collection of data records for which theframe reception time 1199051015840 satisfies condition t ndash 119908 le 1199051015840 let where 119908 is size of the time window Such collection ofdata records is used to calculate aggregates (statistics) ofRSSI values ie minimummaximum average and standarddeviation Separate aggregates are determined for each pairof the transmitter (beacon) position and the receiver (mobiledevice) position The positions of beacons do not changethus they are identified by the beacon ID In contrast currentposition of mobile device is assigned to the nearest reference

Wireless Communications and Mobile Computing 5

1 Input Records window size

2 Output Aggregates

3 create table Aggregates

4 with columns time min 1 1 max 1 1 min m n max m n

5 Times= Select time from Records

6 for each t in Times do

7 begin

8 for refPos = 1m do

9 for bID = 1n do

10 begin

11 RSSI data = Select RSSI from Records

12 where time is between t - window size and t

13 and distance(position refPos ) lt= d max

14 and beacon ID = bID

15 min refPos bID = min( RSSI data )

16 max refPos bID = max( RSSI data )

17 end

18 Insert t min 1 1 max 1 1 min m n max m n into Aggregates

19 End

Algorithm 3 Aggregation function

1 Input Aggregates

2 Output New events

3 create table New events with columns time event type

4 Times= Select time from Aggregates

5 for each t in Times do

6 begin

7 votes= empty array

8 for each classifier in ensemble

9 begin

10 [a b]= classifier range

11 data= Select min a 1 max a 1 min b n max b n

12 from Aggregates where time = t

13 event type = classifier(data)

14 votes[ event type ]= votes[ event type ] + classifier weight

15 end

16 event type = arg max (votes[ event type ])

17 Insert t event type into New events

18 End

Algorithm 4 Events recognition function

1 Input Events New events

2 Output Events

3 New times = Select time from New events

4 Times= Select time from Events

5 for each t in New times do

6 begin

7 event= Select from New events where time = t

8 if t is in Times then Delete from Events where time = t

9 Insert event into Events

10 End

Algorithm 5 Events update function

6 Wireless Communications and Mobile Computing

position It should be noted that a set of reference positionsin the region of interest on the side of the road has to bedetermined in advance

Details of the proposed data aggregation procedure arepresented by the pseudocode in Algorithm 3 For the sakeof simplicity it was assumed in this pseudocode that onlytwo statistics are to be calculated (maximum andminimum)In practical applications the number of statistics has to belarger as discussed in Section 4The symbolsmin refPos bIDand max refPos bID in Algorithm 3 denote the minimumand maximum RSSI value determined for frames sent frombeacon bID and received by amobile device close to referenceposition refPos in time window [t ndash 119908 t] The statementthat a mobile device is close to a reference position meansthat its distance to the reference position is below d max Itshould be noted that d max is set to be lower than half oftheminimumdistance between reference positions thus eachmobile device is assigned to single reference position Thenumber of reference positions and the number of beacons inAlgorithm 3 are denoted by119898 and n respectively

As it was already mentioned above in this section thetype of the event (which relates to vehicle presence and class)is recognized based on the aggregated RSSI data by usinga classifier ensemble (Algorithm 4) The proposed ensembleconsists of classifiers that are fed with various subsets of theaggregated data A different set of the reference positionsfor which the RSSI data are collected is assigned to eachclassifier in the ensemble Hereinafter this set will be referredto as the classifier rangeThe reference positions are identifiedby natural numbers 1 m Thus the classifier range canbe defined by a pair [a b] where 1 le a le m and a leb le m The range [119886 119887] means that the input dataset ofthe corresponding classifier includes the aggregates (egmin refPos bID and max refPos bID) that were determinedfor the reference positions refPos = a b In case of range[1 119898] the classifier utilizes the complete dataset On the otherhand the classifierrsquos input dataset includes the RSSI readingsfor only one reference position when a =b

For each classifier in the ensemble a weight is determinedwhich corresponds to number of the classifierrsquos votes Thetotal number of votes for a given event type is calculatedby adding the weights of the classifiers that have recognizedthis particular event type As a result the event type whichreceives the highest total number of votes is selected Incase of a tie the class which has higher a priori probabilityis selected Weights of the classifiers are adjusted duringtraining procedure with use of the evolutionary strategy [39]

In this study application of various machine learningalgorithms was considered for implementation of the pro-posed ensemble (support vector machines random forestprobabilistic neural network and k-nearest neighborsrsquo algo-rithm) [31 40] A separate training dataset which includesclasses (ie event types) determined by human observer wasused to train the classifiers

After the events are recognized an update of the vehiclesclassification and detection results is conducted in accor-dance with Algorithm 5This update is necessary because thenew results can be related to time moments for which someevents have already been recognized The new results are

Beacons

Referenceposition 1

Referenceposition 2

Referenceposition 3

Referenceposition 4

4 m

8 m

Figure 2 Test site with reference positions and beacons

Figure 3 Mobile application used for data collection

more credible as they take into account additional recentlycollected data Thus the previous results are deleted Finallythe table Events includes the information about event type forall time points covered by the available RSSI dataset It shouldbe also noted that in this study four event types are considered(empty road presence of personal car semitruck and truck)

4 Experimental Results

Usefulness of the proposed vehicle detection and classifica-tion method was verified during experiments in real-worldtraffic conditions A schemaof the test site aswell as distancesbetween reference positions and beacons is presented inFigure 2 Three BLE beacons were installed on road sideat height of 50 100 and 200 centimeters above the roadsurface This configuration was selected as providing themost promising results on the basis of preliminary tests [32]On the opposite side of the road four reference points weredetermined in equal distances of 4 meters In this area theRSSI measurements were conducted using four smartphonesRedmi 3S held at a height of about 1 meter near to thereference positions The data were collected in a periodof two hours During that period more than 400 vehicleshave passed through the analyzed road section A mobileapplication was developed to enable effective collection ofthe experimental data (Figure 3) Additional mobile deviceswere used by observers to record the events related topresence of vehicles in front of the reference locations withrecognition of three vehicle classes (personal car semitruck

Wireless Communications and Mobile Computing 7

minus95

minus90

minus85

minus80

minus75

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

RSSI

[dBm

]

Time [s]

C D D T

C - carD - semi truckT - truck

(a)

minus95

minus90

minus85

minus80

minus75

RSSI

[dBm

]

Time [s]1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

C D D T

C - carD - semi truckT - truck

(b)

Figure 4 Example of collected data (a) reference position 1 and (b) reference position 4

and truck) All themobile deviceswere synchronized viaNTPprotocol

Examples of collected records for two different referencepositions are presented in Figure 4 The vertical red linesin Figure 4 show the time instances when passing vehicleswere registered by the observers The labels below verticallines denote class of the vehicles These results show thatthe vehicles cause visible changes of RSSI for both locationsMoreover the signal noise increases with distance betweenbeacons and mobile device (Figure 4(a))

For the experimental purposes the collected data weredivided into training and test datasets The experiments wereconducted to evaluate the accuracy of automatic vehicleclassification based on the collected data with use of differentmachine learning algorithms ie support vector machines(SVM) random forest (RF) probabilistic neural network(PNN) and k-nearest neighborsrsquo algorithm (KNN)

The SVM algorithm [41] performs classification tasks byusing hyperplanes defined in a multidimensional space Thehyperplanes that separate training data points with differentclass labels are constructed at the training phase SVMemploys an iterative training procedure to find the optimalhyperplanes having the largest distance to the nearest trainingdata point of any class The larger distance results in lowergeneralization error of the classifier

In case of RF classifier [42] the training procedure createsa set of decision trees from randomly selected subset of train-ing data Each tree performs the classification independentlyand ldquovotesrdquo for the selected class Finally the votes fromdifferent decision trees are aggregated to decide the class ofa test object At this step the RF algorithm chooses the classhaving the majority of votes from particular decision trees

PNN [43] includes three layers of neurons (input layerhidden layer and output layer) The neurons in hidden layerdetermine similarity between test input vector and the train-ing vectors To evaluate this similarity each hidden neuronuses a Gaussian function which is centered on a trainingvector The hidden neurons are collected into groups onegroup for each of the classes There is also one neuron in theoutput layer for each classThe output neuron calculates classprobability on the basis of values received from all hiddenneurons in a given group As a result the posterior probabilityis evaluated for all considered classesThe final decision of theclassifier is the class with maximum probability

KNN algorithm [44] computes distances between thetest data point and all training data points in feature space

072073074075076077078079080081

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20k

Vehicle classification accuracy

Figure 5 Impact of parameter k (number of the nearest neighbors)on accuracy of KNN algorithm

Afterwards k training data points with the lowest distancesare selected as the nearest neighbors The test data point isassigned to the class which is most common among the k-nearest neighbors

During experiments the classification accuracy was com-pared for several RSSI-based traffic monitoring approachesincluding the proposed solution and the state-of-the-artmethods from the literature This comparison takes intoaccount the method with one receiver [25] solutions withmultiple spatially distributed receivers and single classifierwhich detects the vehicles based on a complete RSSI dataset[22 23] and the new introduced algorithmwith the ensembleof classifiers

Initial experiments were conducted to calibrate parame-ters of the algorithms In these experiments vehicle classifi-cation was performed with use of 8 aggregates (minimummaximum difference between max and min mean stan-dard deviation median Pearson correlation coefficient andnumber of received frames) The aggregates were calculatedbased on the RSSI data collected in four reference positionsin accordance with Algorithm 3

Accuracy of the KNN algorithm was tested for parameterk (number of the nearest neighbors) in range between 1and 20 Results of the tests are presented in Figure 5 Basedon these results the value k = 7 which gave the highestclassification accuracy was selected for further experiments

Figure 6 shows the classification accuracy that wasachieved by using the RF algorithm with different number

8 Wireless Communications and Mobile Computing

070

075

080

085

090

095

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20number of decision trees

Vehicle classification accuracy

Figure 6 Accuracy of random forest algorithm for different numberof decision trees

045

055

065

075

085

095

1 2 3 4 5 6Window size [s]

Vehicle classification accuracy

Random ForestKNN

Figure 7 Impact of window size parameter on accuracy of RF andKNN algorithms

of decision trees It can be observed in these results that theaccuracy does not change significantly for the number ofdecision trees above 5 However the accuracy achieved forthe tree number between 6 and 9 was slightly lower than forthe RF with 10 trees A little decrease of the accuracy wasalso observed for the tree number above 10Therefore duringexperiments described later in this section the number ofdecision trees was set to 10 It should be also noted that thecomplexity of the algorithm increases when using a larger setof the decision trees

The impact of the window size on vehicle classificationaccuracy was also examined during the preliminary exper-iments The window size was changed from 1 to 6 secondswith steps of 1 second As shown in Figure 7 for RF andKNN algorithms the best results were obtained when usingthe window size of 3 seconds In case of larger windows theclassification accuracy decreases because the data registeredfor multiple vehicles are aggregated in one window Similarresults were also observed for SVM and PNN algorithmsThus the 3-second window was used in further experiments

088

089

090

091

092

093

Noattributeremoved

Minimum Maximum Average Standarddeviation

Median Framecount

Difference Pearsonscorrelationcoefficient

Removed attribute

Vehicle classification accuracy

Figure 8 Impact of attribute selection on accuracy of RF algorithm

At the next step the most effective set of attributeswas selected with use of the backward elimination methodResults of the elimination for the RF algorithm are presentedin Figure 8 At the beginning the classification accuracy wastested using full dataset with 8 aggregates The result of thistest is shown by the leftmost bar in Figure 8 Next tests wereperformed for the 8 datasets that were created by removingparticular aggregates (attributes) As shown in Figure 8an improvement of the vehicle classification accuracy wasachieved after deletion of the ldquodifferencerdquo attribute (ie thedifference between maximum and minimum) Thus thereduced dataset includes 7 aggregates minimum maximummean standard deviation median Pearson correlation coef-ficient and number of received frames Further eliminationdid not improve the results It was verified that the deletionof the ldquodifferencerdquo attribute is beneficial for all consideredclassification algorithms

Table 1 shows the vehicle detection and classificationaccuracy obtained for the basic approach which takes intoaccount the signal strength measured by a single device[25] (in one reference position) These results were obtainedafter the above-discussed initial search of the best algorithmparameters As it was already mentioned in previous sectionin case of the vehicle classification task four classes ofevents are considered empty road presence of personal carsemitruck and truck For the vehicle detection problem twoclasses are taken into account empty road and presenceof a vehicle The accuracy (ACC) was calculated as overallaccuracy using the following formula

ACC =sum

ni=1 CiD

(1)

where n is number of classes Ci is number of items (events)in the test dataset that are correctly assigned to ith class (eventtype) and D is number of items in test dataset

It should be also noted that the results in Table 1 arepresented for the two classification algorithms that providethe best accuracy These results firmly show that the most

Wireless Communications and Mobile Computing 9

Table 1 Accuracy of vehicle detection and classification based on data collected in one reference position

Reference position Vehicle classification accuracy Vehicle detection accuracyKNN RF KNN RF

1 0788 0817 08486 08642 0702 0699 07311 08013 0725 0804 07807 08594 0822 0861 08982 0932

Table 2 Accuracy of vehicle classification based on data collected in four reference positions

Window size [s]Classification algorithm

RF KNN PNN SVMACC CK ACC CK ACC CK ACC CK

2 0885 0801 0619 0287 0533 0099 0525 00003 0922 0865 0809 0658 0684 0403 0561 00894 0914 0853 0773 0582 0802 0639 0734 05335 0843 0729 0794 0630 0629 0286 0538 00366 0799 0651 0747 0549 0728 0512 0559 0088

accurate vehicle classification and detection was possiblewhen the mobile device is placed opposite the beacons loca-tion (in reference position 4)The results confirmobservationthat noise in RSSI readings increases with the distance frombeacons to mobile device It should be also noted that thenumber of RSSI samples that are collected when a vehicleis present between beacons and mobile device decreaseswith the speed of the vehicle As a result lower accuracyis observed for higher speed of vehicles In the consideredtest site the vehicles were slowing down when passingthe reference position 1 since this position was close to acrossroadThus the accuracy obtained for reference position1 is higher than for reference positions 2 and 3

In further tests the other approachwas considered whichis based on application of multiple receivers and one classifier[22 23] According to this approach the vehicles wererecognized by single classifier using the dataset collectedin four reference positions Results of these experimentsare shown in Table 2 The classification accuracy (ACC)and Cohenrsquos kappa [45] (CK) is compared in Table 2 forall considered classification algorithms and various sizes ofthe sliding window When comparing the results in Table 2with those in Table 1 it can be observed that the RSSIdata collected by multiple devices in several locations alongthe road enable more accurate vehicle classification Similarexperiments were also conducted for the vehicle detectiontask and the accuracy of 0935 was achieved

The results in Table 2 firmly show that size of the slidingwindow has a significant impact on the accuracy of vehicledetection and classification Passing vehicles cause a dropin RSSI level This drop is longer for trucks and shorter forpersonal cars In order to correctly recognize the vehicle thesliding window has to cover the time when RSSI values arereduced If the sliding window is to narrow the lower RSSIvaluesmay be registered in entirewindow for different vehicleclasses and thus the classes cannot be correctly recognizedIf single classifier is used a wider window is also helpful

because the drop of RSSI is shifted in time for differentreference locations However in case of an excessive windowsize two successive vehicles can be captured in one windowwhich results in decreased accuracy of the detection andclassification The best result results were obtained by usingthe random forest classifier with window size of 3 seconds

The next step of the research was aimed at increasingthe accuracy of vehicle detection by using the proposedclassifier ensemble in combination with majority voting asdescribed in Section 3 It should be noted that the proposedmethod was used with time step of 1 second and d max =1 meter During the tests of the ensemble different rangesof individual member classifiers were taken into account(see Table 3) The input data of individual classifiers wereobtained not only from particular reference positions (egClassifier 1 in Ensemble no 1) but also from a connection ofthe neighboring positions (eg Classifier 1 in Ensemble no3) When analyzing the results presented in Table 3 it canbe observed that the highest accuracy was achieved for theensembles of the random forest classifiersThe best ensemble(no 5) combines the classifiers that are fed with data fromtwo neighboring reference positions (Classifiers 1-3) with theclassifier created for reference position 4 (Classifier 4) andthe classifier which utilizes the entire dataset (Classifier 5)Classifier 4 with range [4 4] was included in the ensembleas it provides the best accuracy when using data from singlereference position The high accuracy was also obtained forEnsembles no 2 and 6 Results of these ensembles are onlyslightly worse than those for Ensemble no 5 This fact showsthat the proposed approach achieves high vehicle classifica-tion and detection accuracy by combining local classifiers(that utilize data from two neighboring reference positionsor single reference position) with the global classifier (whichmakes decisions based on data collected in all referencepositions)

It was noted that the random forest algorithm wasabout 85 more effective than KNN The proposed method

10 Wireless Communications and Mobile Computing

Table 3 Accuracy of vehicle detection and classification with use of the proposed classifier ensemble

Ensemble no Classifier range Vehicle classification accuracy Vehicle detection accuracyClas 1 Clas 2 Clas 3 Clas 4 Clas 5 KNN RF KNN RF

1 [1 1] [2 2] [3 3] [4 4] - 0862 0890 0906 09562 [1 1] [2 2] [3 3] [4 4] [1 4] 0862 0935 0898 09613 [1 2] [2 3] [3 4] - - 0799 0922 0854 09634 [1 2] [2 3] [3 4] [4 4] - 0833 0922 0898 09695 [1 2] [2 3] [3 4] [4 4] [1 4] 0846 0943 0898 09776 [1 2] [2 3] [3 4] - [1 4] 0825 0940 0854 09697 [1 3] [2 4] - - - 0781 0911 0752 09378 [1 3] [2 4] [4 4] 0836 0922 0898 09589 [1 3] [2 4] [4 4] [1 4] 0846 0932 0898 096610 [4 4] [1 4] 0846 0924 0828 0935

070

075

080

085

090

095

100

RFensemble

no 2

RFensemble

no5

RFensemble

no6

RFsingle

classifier

KNNensemble

no 2

KNNensemble

no 5

KNNensemble

no 6

KNNsingle

classifier

Vehicle detection accuracy

Figure 9 Comparison of vehicle detection accuracy for classifierensembles and for single classifiers

achieves the accuracy above 97 for vehicle detection taskand above 94 in case of the vehicle classification taskIt means that the introduced classifier ensemble providesbetter results than the state-of-the-art methods that utilizeindividual classifiers (see Tables 1 and 2)

Results obtained for the best classifier ensembles and forthe individual (single) classifiers are compared in Figures9 and 10 The box plots show minimum first quartilemedian third quartile and maximum of the accuracy valuesfor 30 tests For each test different training and testingdatasets were selected from the measurement data In theseresults significant differences of the accuracy are visible whencomparing the single classifiers with their ensemble counter-parts Similarly the accuracy differences are significant whencomparing the RF classifiers with KNN classifiers It shouldbe also noted that the accuracies achieved by the best RFensembles do not differ significantly Thus selection amongthese ensembles should be considered as a tuning of theproposed method

The higher accuracy of RF ensemble can be explainedby the fact that the RF algorithm has several features whichenable effective training of the classifier According to thisalgorithm all decision trees in the forest are created by

070

075

080

085

090

095

100

RFensemble

no 2

RFensemble

no5

RFensemble

no6

RFsingle

classifier

KNNensemble

no 2

KNNensemble

no 5

KNNensemble

no 6

KNNsingle

classifier

Vehicle classification accuracy

Figure 10 Comparison of vehicle classification accuracy for classi-fier ensembles and for single classifiers

using randomly selected subsets of the training dataset Therandom selection applies to both the events (rows) and theaggregates (columns) Each decision tree further divides thetraining data into smaller subsets until the subsets are smallor all events in these subsets belong to one class In contrast toRF the other compared algorithms (includingKNN) performthe training procedures with use of the complete trainingdataset

5 Conclusions

The proposed vehicle detection and classification approachuses mobile devices (smartphones) and Bluetooth beaconsfor road traffic monitoring It allows detecting three classesof vehicles by analyzing strength of radio signal received fromBLE beacons that are installed at different heights by the roadThis approach is suitable for crowd sourcing applicationsaimed at reducing travel time congestion and emissionsAdvantages of the introduced method were demonstratedduring experimental evaluation in real-traffic conditionsExtensive experiments were conducted to test different clas-sification approaches and data aggregation methods In com-parison with state-of-the-art RSSI-based vehicle detection

Wireless Communications and Mobile Computing 11

methods higher accuracy was achieved by introducing adedicated ensemble of random forest classifiers withmajorityvoting

The presented solution can be extended to several bea-cons installed along the road to obtain information concern-ing vehicle velocity and direction Another interesting topicis related to data preprocessing on mobile devices in order toreduce the communication effort Finally additional studieswill be necessary to introduce methods that can be usedto activate the Bluetooth modules and beacons when it isnecessary and reduce the energy consumption

Data Availability

The data used to support the findings of this study areincluded within the supplementary information file

Conflicts of Interest

The authors declare that there are no conflicts of interestregarding the publication of this paper

Acknowledgments

The research was supported by the National Centre forResearch and Development (NCBR) [Grant no LIDER180064L-715NCBR2016]

Supplementary Materials

The supplementary material file (csv) includes a raw RSSIdataset where ldquoidrdquo denotes number of measurement ldquoNoderdquois an identifier of mobile device (receiver) ldquoiBeaconrdquo is anidentifier of beacon (transmitter) ldquoRSSIrdquo is the measuredRSSI value ldquoClassrdquo describes type of observed event (Eempty road C personal car D semitruck and T truck) andldquoFlagrdquo indicates the measurements for which the events wererecorded (symbol ldquo+rdquo) (Supplementary Materials)

References

[1] H Chang Y Wang and P A Ioannou ldquoThe use of micro-scopic traffic simulation model for traffic control systemsrdquo inProceedings of the 2007 International Symposium on InformationTechnology Convergence ISITC 2007 pp 120ndash124 November2007

[2] M Bernas B Płaczek P Porwik and T Pamuła ldquoSegmentationof vehicle detector data for improved k-nearest neighbours-based traffic flow predictionrdquo IET Intelligent Transport Systemsvol 9 no 3 pp 264ndash274 2014

[3] I Ahmad R M Noor I Ali M Imran and A VasilakosldquoCharacterizing the role of vehicular cloud computing in roadtrafficmanagementrdquo International Journal of Distributed SensorNetworks vol 13 no 5 2017

[4] B Płaczek ldquoA self-organizing system for urban traffic controlbased on predictive interval microscopic modelrdquo EngineeringApplications of Artificial Intelligence vol 34 pp 75ndash84 2014

[5] M Karpinski A Senart and V Cahill ldquoSensor networks forsmart roadsrdquo in Proceedings of the 4th Annual IEEE Interna-tional Conference on Pervasive Computing and CommunicationsWorkshops (PerCom rsquo06) pp 310ndash314 IEEE Pisa Italy March2006

[6] G Chatzimilioudis A Konstantinidis C Laoudias and DZeinalipour-Yazti ldquoCrowdsourcing with smartphonesrdquo IEEEInternet Computing vol 16 no 5 pp 36ndash44 2012

[7] R Prabha and M G Kabadi ldquoKNODET A Framework toMine GPS Data for Intelligent Transportation Systems at TrafficSignalsrdquo in Proceedings of the 2017 International Conference onRecent Advances in Electronics and Communication Technology(ICRAECT) pp 85ndash89 Bangalore India March 2017

[8] Y Ma L Zhou Z Gu Y Song and B Wang ldquoChannel Accessand Power Control for Mobile Crowdsourcing in Device-to-DeviceUnderlaidCellularNetworksrdquoWireless Communicationsand Mobile Computing vol 2018 Article ID 7192840 13 pages2018

[9] X Zhang Z Yang W Sun et al ldquoIncentives for mobile crowdsensing A surveyrdquo IEEE Communications Surveys amp Tutorialsvol 18 no 1 pp 54ndash67 2016

[10] N D Lane E Miluzzo H Lu D Peebles T Choudhury andA T Campbell ldquoA survey of mobile phone sensingrdquo IEEECommunications Magazine vol 48 no 9 pp 140ndash150 2010

[11] W Z Khan Y Xiang M Y Aalsalem and Q Arshad ldquoMobilephone sensing systems a surveyrdquo IEEE Communications Sur-veys amp Tutorials vol 15 no 1 pp 402ndash427 2013

[12] R K Ganti F Ye and H Lei ldquoMobile crowdsensing currentstate and future challengesrdquo IEEE Communications Magazinevol 49 no 11 pp 32ndash39 2011

[13] A T Campbell S B Eisenman N D Lane et al ldquoThe rise ofpeople-centric sensingrdquo IEEE Internet Computing vol 12 no 4pp 12ndash21 2008

[14] N Maisonneuve M Stevens M E Niessen and L SteelsldquoNoiseTube Measuring and mapping noise pollution withmobile phonesrdquo Information Technologies in EnvironmentalEngineering pp 215ndash228 2009

[15] C Costa C Laoudias D Zeinalipour-Yazti and D GunopulosldquoSmartTrace Finding similar trajectories in smartphone net-works without disclosing the tracesrdquo in Proceedings of the 2011IEEE 27th International Conference on Data Engineering ICDE2011 pp 1288ndash1291 April 2011

[16] J Gomez J C Torrado and G Montoro ldquoUsing Smartphonesto Assist People withDown Syndrome inTheir Labour Trainingand Integration A Case Studyrdquo Wireless Communications andMobile Computing vol 2017 Article ID 5062371 15 pages 2017

[17] CWu Z Yang and Y Liu ldquoSmartphones based crowdsourcingfor indoor localizationrdquo IEEE Transactions on Mobile Comput-ing vol 14 no 2 pp 444ndash457 2015

[18] S Matyas C Matyas C Schlieder P Kiefer H Mitarai andM Kamata ldquoDesigning location-based mobile games witha purpose Collecting geospatial data with cityexplorerrdquo inProceedings of the 2008 International Conference on Advancesin Computer Entertainment Technology ACE 2008 pp 244ndash247December 2008

[19] H Aly A Basalamah and M Youssef ldquoRobust and ubiquitoussmartphone-based lane detectionrdquo Pervasive and Mobile Com-puting vol 26 pp 35ndash56 2016

[20] E Koukoumidis L-S Peh and M R Martonosi ldquoSignalGuruleveraging mobile phones for collaborative traffic signal sched-ule advisoryrdquo in Proceedings of the 9th International Conference

12 Wireless Communications and Mobile Computing

on Mobile Systems Applications and Services pp 127ndash140 July2011

[21] A Thiagarajan L Ravindranath K LaCurts et al ldquoVTrackaccurate energy-aware road traffic delay estimation usingmobile phonesrdquo in Proceedings of the 7th ACM Conference onEmbedded Networked Sensor Systems (SenSys rsquo09) pp 85ndash98November 2009

[22] MWon S Zhang and SH Son ldquoWiTraffic Low-cost and non-intrusive traffic monitoring system using WiFirdquo in Proceedingsof the 26th International Conference on Computer Communica-tions and Networks ICCCN 2017 pp 1ndash9 IEEE August 2017

[23] MHaferkampMAl-Askary DDorn et al ldquoRadio-based Traf-fic Flow Detection and Vehicle Classification for Future SmartCitiesrdquo in 2017 IEEE 85thVehicular TechnologyConference (VTCSpring) pp 1ndash5 Sydney NSW Australia 2017

[24] G Horvat D Sostaric and D Zagar ldquoUsing radio irregularityfor vehicle detection in adaptive roadway lightingrdquo in Proceed-ings of the 35th International Convention on Information andCommunication Technology Electronics and MicroelectronicsMIPRO 2012 pp 748ndash753 IEEE May 2012

[25] S Roy R Sen S Kulkarni P Kulkarni B Raman and L KSingh ldquoWireless across road RF based road traffic congestiondetectionrdquo in Proceedings of the 2011 Third International Con-ference on Communication Systems and Networks (COMSNETS2011) pp 1ndash6 IEEE January 2011

[26] N Kassem A E Kosba and M Youssef ldquoRF-based vehicledetection and speed estimationrdquo in 2012 IEEE 75th VehicularTechnology Conference (VTC Spring) pp 1ndash5 IEEE

[27] X Li and J Wu ldquoA new method and verification of vehiclesdetection based on RSSI variationrdquo in 2016 10th InternationalConference on Sensing Technology (ICST) pp 1ndash6 IEEE

[28] P Mestre R Guedes P Couto J Matias J C Fernandes andC Serodio ldquoVehicle Detection for Outdoor Car Parks usingIEEE802154rdquo Lecture Notes in Engineering and ComputerScience Newswood Limited ndash IAENG 2013

[29] Apple Inc Getting Started with iBeacon Tech Rep 10 June2014

[30] A Lindemann B Schnor J Sohre and P Vogel ldquoIndoorpositioning A comparison of WiFi and Bluetooth Low Energyfor region monitoringrdquo in Proceedings of the International JointConference on Biomedical Engineering Systems and TechnologiesVolume 5 HEALTHINF pp 314ndash321 Rome Italy February2016

[31] VMartsenyuk KWarwas K Augustynek et al ldquoOnmultivari-ate method of qualitative analysis of Hodgkin-Huxley modelwith decision tree inductionrdquo in Proceedings of the 2016 16thInternational Conference on Control Automation and Systems(ICCAS) pp 489ndash494 Gyeongju South Korea October 2016

[32] M Bernas B Płaczek and W Korski ldquoWireless Networkwith Bluetooth Low Energy Beacons for Vehicle Detectionand Classificationrdquo in CN 2018 Computer Networks P GajM Sawicki G Suchacka and A Kwiecien Eds vol 860 ofCommunications inComputer and Information Science pp 429ndash444 Springer 2018

[33] MWozniak M Grana and E Corchado ldquoA survey of multipleclassifier systems as hybrid systemsrdquo Information Fusion vol 16no 1 pp 3ndash17 2014

[34] G Marcialis and F Roli ldquoFusion of face recognition algo-rithms for video-based surveillance systemsrdquo in MultisensorSurveillance Systems The Fusion Perspective G L Foresti CRegazzoni and P Varshney Eds pp 235ndash250 2003

[35] R Polikar ldquoEnsemble learningrdquo Scholarpedia vol 3 no 12article 2776 2008

[36] G Brown J Wyatt R Harris and X Yao ldquoDiversity creationmethods a survey and categorisationrdquo Information Fusion vol6 no 1 pp 5ndash20 2005

[37] M Bernas and B Płaczek ldquoFully connected neural networksensemble with signal strength clustering for indoor localizationinwireless sensor networksrdquo International Journal ofDistributedSensor Networks vol 2015 Article ID 403242 2015

[38] M Lewandowski T Orczyk and B Płaczek ldquoHuman activitydetection based on the iBeacon technologyrdquo Journal of MedicalInformatics Technologies vol 25 2016

[39] H-G Beyer and H-P Schwefel ldquoEvolution strategiesndashA com-prehensive introductionrdquo Natural Computing vol 1 no 1 pp3ndash52 2002

[40] M R Berthold N Cebron F Dill et al ldquoKNIMETheKonstanzInformation Minerrdquo in Data Analysis Machine Learning andApplications Studies inClassificationDataAnalysis andKnowl-edge Organization C Preisach H Burkhardt L Schmidt-Thieme and R Decker Eds Springer Berlin Germany

[41] B Scholkopf A J Smola R C Williamson and P L BartlettldquoNew support vector algorithmsrdquo Neural Computation vol 12no 5 pp 1207ndash1245 2000

[42] L Breiman ldquoRandom forestsrdquoMachine Learning vol 45 no 1pp 5ndash32 2001

[43] D F Specht ldquoProbabilistic neural networksrdquo Neural Networksvol 3 no 1 pp 109ndash118 1990

[44] D W Aha D Kibler and M K Albert ldquoInstance-BasedLearning Algorithmsrdquo Machine Learning vol 6 no 1 pp 37ndash66 1991

[45] N C Smeeton ldquoEarly History of the Kappa Statisticrdquo Biomet-rics vol 41 no 3 article 795 1985

International Journal of

AerospaceEngineeringHindawiwwwhindawicom Volume 2018

RoboticsJournal of

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Active and Passive Electronic Components

VLSI Design

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Shock and Vibration

Hindawiwwwhindawicom Volume 2018

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawiwwwhindawicom

Volume 2018

Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom

The Scientific World Journal

Volume 2018

Control Scienceand Engineering

Journal of

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom

Journal ofEngineeringVolume 2018

SensorsJournal of

Hindawiwwwhindawicom Volume 2018

International Journal of

RotatingMachinery

Hindawiwwwhindawicom Volume 2018

Modelling ampSimulationin EngineeringHindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Navigation and Observation

International Journal of

Hindawi

wwwhindawicom Volume 2018

Advances in

Multimedia

Submit your manuscripts atwwwhindawicom

Page 5: Road Traffic Monitoring System Based on Mobile …downloads.hindawi.com/journals/wcmc/2018/3251598.pdfIt should be noted that the intro-duced system structure, which includes BLE beacons

Wireless Communications and Mobile Computing 5

1 Input Records window size

2 Output Aggregates

3 create table Aggregates

4 with columns time min 1 1 max 1 1 min m n max m n

5 Times= Select time from Records

6 for each t in Times do

7 begin

8 for refPos = 1m do

9 for bID = 1n do

10 begin

11 RSSI data = Select RSSI from Records

12 where time is between t - window size and t

13 and distance(position refPos ) lt= d max

14 and beacon ID = bID

15 min refPos bID = min( RSSI data )

16 max refPos bID = max( RSSI data )

17 end

18 Insert t min 1 1 max 1 1 min m n max m n into Aggregates

19 End

Algorithm 3 Aggregation function

1 Input Aggregates

2 Output New events

3 create table New events with columns time event type

4 Times= Select time from Aggregates

5 for each t in Times do

6 begin

7 votes= empty array

8 for each classifier in ensemble

9 begin

10 [a b]= classifier range

11 data= Select min a 1 max a 1 min b n max b n

12 from Aggregates where time = t

13 event type = classifier(data)

14 votes[ event type ]= votes[ event type ] + classifier weight

15 end

16 event type = arg max (votes[ event type ])

17 Insert t event type into New events

18 End

Algorithm 4 Events recognition function

1 Input Events New events

2 Output Events

3 New times = Select time from New events

4 Times= Select time from Events

5 for each t in New times do

6 begin

7 event= Select from New events where time = t

8 if t is in Times then Delete from Events where time = t

9 Insert event into Events

10 End

Algorithm 5 Events update function

6 Wireless Communications and Mobile Computing

position It should be noted that a set of reference positionsin the region of interest on the side of the road has to bedetermined in advance

Details of the proposed data aggregation procedure arepresented by the pseudocode in Algorithm 3 For the sakeof simplicity it was assumed in this pseudocode that onlytwo statistics are to be calculated (maximum andminimum)In practical applications the number of statistics has to belarger as discussed in Section 4The symbolsmin refPos bIDand max refPos bID in Algorithm 3 denote the minimumand maximum RSSI value determined for frames sent frombeacon bID and received by amobile device close to referenceposition refPos in time window [t ndash 119908 t] The statementthat a mobile device is close to a reference position meansthat its distance to the reference position is below d max Itshould be noted that d max is set to be lower than half oftheminimumdistance between reference positions thus eachmobile device is assigned to single reference position Thenumber of reference positions and the number of beacons inAlgorithm 3 are denoted by119898 and n respectively

As it was already mentioned above in this section thetype of the event (which relates to vehicle presence and class)is recognized based on the aggregated RSSI data by usinga classifier ensemble (Algorithm 4) The proposed ensembleconsists of classifiers that are fed with various subsets of theaggregated data A different set of the reference positionsfor which the RSSI data are collected is assigned to eachclassifier in the ensemble Hereinafter this set will be referredto as the classifier rangeThe reference positions are identifiedby natural numbers 1 m Thus the classifier range canbe defined by a pair [a b] where 1 le a le m and a leb le m The range [119886 119887] means that the input dataset ofthe corresponding classifier includes the aggregates (egmin refPos bID and max refPos bID) that were determinedfor the reference positions refPos = a b In case of range[1 119898] the classifier utilizes the complete dataset On the otherhand the classifierrsquos input dataset includes the RSSI readingsfor only one reference position when a =b

For each classifier in the ensemble a weight is determinedwhich corresponds to number of the classifierrsquos votes Thetotal number of votes for a given event type is calculatedby adding the weights of the classifiers that have recognizedthis particular event type As a result the event type whichreceives the highest total number of votes is selected Incase of a tie the class which has higher a priori probabilityis selected Weights of the classifiers are adjusted duringtraining procedure with use of the evolutionary strategy [39]

In this study application of various machine learningalgorithms was considered for implementation of the pro-posed ensemble (support vector machines random forestprobabilistic neural network and k-nearest neighborsrsquo algo-rithm) [31 40] A separate training dataset which includesclasses (ie event types) determined by human observer wasused to train the classifiers

After the events are recognized an update of the vehiclesclassification and detection results is conducted in accor-dance with Algorithm 5This update is necessary because thenew results can be related to time moments for which someevents have already been recognized The new results are

Beacons

Referenceposition 1

Referenceposition 2

Referenceposition 3

Referenceposition 4

4 m

8 m

Figure 2 Test site with reference positions and beacons

Figure 3 Mobile application used for data collection

more credible as they take into account additional recentlycollected data Thus the previous results are deleted Finallythe table Events includes the information about event type forall time points covered by the available RSSI dataset It shouldbe also noted that in this study four event types are considered(empty road presence of personal car semitruck and truck)

4 Experimental Results

Usefulness of the proposed vehicle detection and classifica-tion method was verified during experiments in real-worldtraffic conditions A schemaof the test site aswell as distancesbetween reference positions and beacons is presented inFigure 2 Three BLE beacons were installed on road sideat height of 50 100 and 200 centimeters above the roadsurface This configuration was selected as providing themost promising results on the basis of preliminary tests [32]On the opposite side of the road four reference points weredetermined in equal distances of 4 meters In this area theRSSI measurements were conducted using four smartphonesRedmi 3S held at a height of about 1 meter near to thereference positions The data were collected in a periodof two hours During that period more than 400 vehicleshave passed through the analyzed road section A mobileapplication was developed to enable effective collection ofthe experimental data (Figure 3) Additional mobile deviceswere used by observers to record the events related topresence of vehicles in front of the reference locations withrecognition of three vehicle classes (personal car semitruck

Wireless Communications and Mobile Computing 7

minus95

minus90

minus85

minus80

minus75

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

RSSI

[dBm

]

Time [s]

C D D T

C - carD - semi truckT - truck

(a)

minus95

minus90

minus85

minus80

minus75

RSSI

[dBm

]

Time [s]1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

C D D T

C - carD - semi truckT - truck

(b)

Figure 4 Example of collected data (a) reference position 1 and (b) reference position 4

and truck) All themobile deviceswere synchronized viaNTPprotocol

Examples of collected records for two different referencepositions are presented in Figure 4 The vertical red linesin Figure 4 show the time instances when passing vehicleswere registered by the observers The labels below verticallines denote class of the vehicles These results show thatthe vehicles cause visible changes of RSSI for both locationsMoreover the signal noise increases with distance betweenbeacons and mobile device (Figure 4(a))

For the experimental purposes the collected data weredivided into training and test datasets The experiments wereconducted to evaluate the accuracy of automatic vehicleclassification based on the collected data with use of differentmachine learning algorithms ie support vector machines(SVM) random forest (RF) probabilistic neural network(PNN) and k-nearest neighborsrsquo algorithm (KNN)

The SVM algorithm [41] performs classification tasks byusing hyperplanes defined in a multidimensional space Thehyperplanes that separate training data points with differentclass labels are constructed at the training phase SVMemploys an iterative training procedure to find the optimalhyperplanes having the largest distance to the nearest trainingdata point of any class The larger distance results in lowergeneralization error of the classifier

In case of RF classifier [42] the training procedure createsa set of decision trees from randomly selected subset of train-ing data Each tree performs the classification independentlyand ldquovotesrdquo for the selected class Finally the votes fromdifferent decision trees are aggregated to decide the class ofa test object At this step the RF algorithm chooses the classhaving the majority of votes from particular decision trees

PNN [43] includes three layers of neurons (input layerhidden layer and output layer) The neurons in hidden layerdetermine similarity between test input vector and the train-ing vectors To evaluate this similarity each hidden neuronuses a Gaussian function which is centered on a trainingvector The hidden neurons are collected into groups onegroup for each of the classes There is also one neuron in theoutput layer for each classThe output neuron calculates classprobability on the basis of values received from all hiddenneurons in a given group As a result the posterior probabilityis evaluated for all considered classesThe final decision of theclassifier is the class with maximum probability

KNN algorithm [44] computes distances between thetest data point and all training data points in feature space

072073074075076077078079080081

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20k

Vehicle classification accuracy

Figure 5 Impact of parameter k (number of the nearest neighbors)on accuracy of KNN algorithm

Afterwards k training data points with the lowest distancesare selected as the nearest neighbors The test data point isassigned to the class which is most common among the k-nearest neighbors

During experiments the classification accuracy was com-pared for several RSSI-based traffic monitoring approachesincluding the proposed solution and the state-of-the-artmethods from the literature This comparison takes intoaccount the method with one receiver [25] solutions withmultiple spatially distributed receivers and single classifierwhich detects the vehicles based on a complete RSSI dataset[22 23] and the new introduced algorithmwith the ensembleof classifiers

Initial experiments were conducted to calibrate parame-ters of the algorithms In these experiments vehicle classifi-cation was performed with use of 8 aggregates (minimummaximum difference between max and min mean stan-dard deviation median Pearson correlation coefficient andnumber of received frames) The aggregates were calculatedbased on the RSSI data collected in four reference positionsin accordance with Algorithm 3

Accuracy of the KNN algorithm was tested for parameterk (number of the nearest neighbors) in range between 1and 20 Results of the tests are presented in Figure 5 Basedon these results the value k = 7 which gave the highestclassification accuracy was selected for further experiments

Figure 6 shows the classification accuracy that wasachieved by using the RF algorithm with different number

8 Wireless Communications and Mobile Computing

070

075

080

085

090

095

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20number of decision trees

Vehicle classification accuracy

Figure 6 Accuracy of random forest algorithm for different numberof decision trees

045

055

065

075

085

095

1 2 3 4 5 6Window size [s]

Vehicle classification accuracy

Random ForestKNN

Figure 7 Impact of window size parameter on accuracy of RF andKNN algorithms

of decision trees It can be observed in these results that theaccuracy does not change significantly for the number ofdecision trees above 5 However the accuracy achieved forthe tree number between 6 and 9 was slightly lower than forthe RF with 10 trees A little decrease of the accuracy wasalso observed for the tree number above 10Therefore duringexperiments described later in this section the number ofdecision trees was set to 10 It should be also noted that thecomplexity of the algorithm increases when using a larger setof the decision trees

The impact of the window size on vehicle classificationaccuracy was also examined during the preliminary exper-iments The window size was changed from 1 to 6 secondswith steps of 1 second As shown in Figure 7 for RF andKNN algorithms the best results were obtained when usingthe window size of 3 seconds In case of larger windows theclassification accuracy decreases because the data registeredfor multiple vehicles are aggregated in one window Similarresults were also observed for SVM and PNN algorithmsThus the 3-second window was used in further experiments

088

089

090

091

092

093

Noattributeremoved

Minimum Maximum Average Standarddeviation

Median Framecount

Difference Pearsonscorrelationcoefficient

Removed attribute

Vehicle classification accuracy

Figure 8 Impact of attribute selection on accuracy of RF algorithm

At the next step the most effective set of attributeswas selected with use of the backward elimination methodResults of the elimination for the RF algorithm are presentedin Figure 8 At the beginning the classification accuracy wastested using full dataset with 8 aggregates The result of thistest is shown by the leftmost bar in Figure 8 Next tests wereperformed for the 8 datasets that were created by removingparticular aggregates (attributes) As shown in Figure 8an improvement of the vehicle classification accuracy wasachieved after deletion of the ldquodifferencerdquo attribute (ie thedifference between maximum and minimum) Thus thereduced dataset includes 7 aggregates minimum maximummean standard deviation median Pearson correlation coef-ficient and number of received frames Further eliminationdid not improve the results It was verified that the deletionof the ldquodifferencerdquo attribute is beneficial for all consideredclassification algorithms

Table 1 shows the vehicle detection and classificationaccuracy obtained for the basic approach which takes intoaccount the signal strength measured by a single device[25] (in one reference position) These results were obtainedafter the above-discussed initial search of the best algorithmparameters As it was already mentioned in previous sectionin case of the vehicle classification task four classes ofevents are considered empty road presence of personal carsemitruck and truck For the vehicle detection problem twoclasses are taken into account empty road and presenceof a vehicle The accuracy (ACC) was calculated as overallaccuracy using the following formula

ACC =sum

ni=1 CiD

(1)

where n is number of classes Ci is number of items (events)in the test dataset that are correctly assigned to ith class (eventtype) and D is number of items in test dataset

It should be also noted that the results in Table 1 arepresented for the two classification algorithms that providethe best accuracy These results firmly show that the most

Wireless Communications and Mobile Computing 9

Table 1 Accuracy of vehicle detection and classification based on data collected in one reference position

Reference position Vehicle classification accuracy Vehicle detection accuracyKNN RF KNN RF

1 0788 0817 08486 08642 0702 0699 07311 08013 0725 0804 07807 08594 0822 0861 08982 0932

Table 2 Accuracy of vehicle classification based on data collected in four reference positions

Window size [s]Classification algorithm

RF KNN PNN SVMACC CK ACC CK ACC CK ACC CK

2 0885 0801 0619 0287 0533 0099 0525 00003 0922 0865 0809 0658 0684 0403 0561 00894 0914 0853 0773 0582 0802 0639 0734 05335 0843 0729 0794 0630 0629 0286 0538 00366 0799 0651 0747 0549 0728 0512 0559 0088

accurate vehicle classification and detection was possiblewhen the mobile device is placed opposite the beacons loca-tion (in reference position 4)The results confirmobservationthat noise in RSSI readings increases with the distance frombeacons to mobile device It should be also noted that thenumber of RSSI samples that are collected when a vehicleis present between beacons and mobile device decreaseswith the speed of the vehicle As a result lower accuracyis observed for higher speed of vehicles In the consideredtest site the vehicles were slowing down when passingthe reference position 1 since this position was close to acrossroadThus the accuracy obtained for reference position1 is higher than for reference positions 2 and 3

In further tests the other approachwas considered whichis based on application of multiple receivers and one classifier[22 23] According to this approach the vehicles wererecognized by single classifier using the dataset collectedin four reference positions Results of these experimentsare shown in Table 2 The classification accuracy (ACC)and Cohenrsquos kappa [45] (CK) is compared in Table 2 forall considered classification algorithms and various sizes ofthe sliding window When comparing the results in Table 2with those in Table 1 it can be observed that the RSSIdata collected by multiple devices in several locations alongthe road enable more accurate vehicle classification Similarexperiments were also conducted for the vehicle detectiontask and the accuracy of 0935 was achieved

The results in Table 2 firmly show that size of the slidingwindow has a significant impact on the accuracy of vehicledetection and classification Passing vehicles cause a dropin RSSI level This drop is longer for trucks and shorter forpersonal cars In order to correctly recognize the vehicle thesliding window has to cover the time when RSSI values arereduced If the sliding window is to narrow the lower RSSIvaluesmay be registered in entirewindow for different vehicleclasses and thus the classes cannot be correctly recognizedIf single classifier is used a wider window is also helpful

because the drop of RSSI is shifted in time for differentreference locations However in case of an excessive windowsize two successive vehicles can be captured in one windowwhich results in decreased accuracy of the detection andclassification The best result results were obtained by usingthe random forest classifier with window size of 3 seconds

The next step of the research was aimed at increasingthe accuracy of vehicle detection by using the proposedclassifier ensemble in combination with majority voting asdescribed in Section 3 It should be noted that the proposedmethod was used with time step of 1 second and d max =1 meter During the tests of the ensemble different rangesof individual member classifiers were taken into account(see Table 3) The input data of individual classifiers wereobtained not only from particular reference positions (egClassifier 1 in Ensemble no 1) but also from a connection ofthe neighboring positions (eg Classifier 1 in Ensemble no3) When analyzing the results presented in Table 3 it canbe observed that the highest accuracy was achieved for theensembles of the random forest classifiersThe best ensemble(no 5) combines the classifiers that are fed with data fromtwo neighboring reference positions (Classifiers 1-3) with theclassifier created for reference position 4 (Classifier 4) andthe classifier which utilizes the entire dataset (Classifier 5)Classifier 4 with range [4 4] was included in the ensembleas it provides the best accuracy when using data from singlereference position The high accuracy was also obtained forEnsembles no 2 and 6 Results of these ensembles are onlyslightly worse than those for Ensemble no 5 This fact showsthat the proposed approach achieves high vehicle classifica-tion and detection accuracy by combining local classifiers(that utilize data from two neighboring reference positionsor single reference position) with the global classifier (whichmakes decisions based on data collected in all referencepositions)

It was noted that the random forest algorithm wasabout 85 more effective than KNN The proposed method

10 Wireless Communications and Mobile Computing

Table 3 Accuracy of vehicle detection and classification with use of the proposed classifier ensemble

Ensemble no Classifier range Vehicle classification accuracy Vehicle detection accuracyClas 1 Clas 2 Clas 3 Clas 4 Clas 5 KNN RF KNN RF

1 [1 1] [2 2] [3 3] [4 4] - 0862 0890 0906 09562 [1 1] [2 2] [3 3] [4 4] [1 4] 0862 0935 0898 09613 [1 2] [2 3] [3 4] - - 0799 0922 0854 09634 [1 2] [2 3] [3 4] [4 4] - 0833 0922 0898 09695 [1 2] [2 3] [3 4] [4 4] [1 4] 0846 0943 0898 09776 [1 2] [2 3] [3 4] - [1 4] 0825 0940 0854 09697 [1 3] [2 4] - - - 0781 0911 0752 09378 [1 3] [2 4] [4 4] 0836 0922 0898 09589 [1 3] [2 4] [4 4] [1 4] 0846 0932 0898 096610 [4 4] [1 4] 0846 0924 0828 0935

070

075

080

085

090

095

100

RFensemble

no 2

RFensemble

no5

RFensemble

no6

RFsingle

classifier

KNNensemble

no 2

KNNensemble

no 5

KNNensemble

no 6

KNNsingle

classifier

Vehicle detection accuracy

Figure 9 Comparison of vehicle detection accuracy for classifierensembles and for single classifiers

achieves the accuracy above 97 for vehicle detection taskand above 94 in case of the vehicle classification taskIt means that the introduced classifier ensemble providesbetter results than the state-of-the-art methods that utilizeindividual classifiers (see Tables 1 and 2)

Results obtained for the best classifier ensembles and forthe individual (single) classifiers are compared in Figures9 and 10 The box plots show minimum first quartilemedian third quartile and maximum of the accuracy valuesfor 30 tests For each test different training and testingdatasets were selected from the measurement data In theseresults significant differences of the accuracy are visible whencomparing the single classifiers with their ensemble counter-parts Similarly the accuracy differences are significant whencomparing the RF classifiers with KNN classifiers It shouldbe also noted that the accuracies achieved by the best RFensembles do not differ significantly Thus selection amongthese ensembles should be considered as a tuning of theproposed method

The higher accuracy of RF ensemble can be explainedby the fact that the RF algorithm has several features whichenable effective training of the classifier According to thisalgorithm all decision trees in the forest are created by

070

075

080

085

090

095

100

RFensemble

no 2

RFensemble

no5

RFensemble

no6

RFsingle

classifier

KNNensemble

no 2

KNNensemble

no 5

KNNensemble

no 6

KNNsingle

classifier

Vehicle classification accuracy

Figure 10 Comparison of vehicle classification accuracy for classi-fier ensembles and for single classifiers

using randomly selected subsets of the training dataset Therandom selection applies to both the events (rows) and theaggregates (columns) Each decision tree further divides thetraining data into smaller subsets until the subsets are smallor all events in these subsets belong to one class In contrast toRF the other compared algorithms (includingKNN) performthe training procedures with use of the complete trainingdataset

5 Conclusions

The proposed vehicle detection and classification approachuses mobile devices (smartphones) and Bluetooth beaconsfor road traffic monitoring It allows detecting three classesof vehicles by analyzing strength of radio signal received fromBLE beacons that are installed at different heights by the roadThis approach is suitable for crowd sourcing applicationsaimed at reducing travel time congestion and emissionsAdvantages of the introduced method were demonstratedduring experimental evaluation in real-traffic conditionsExtensive experiments were conducted to test different clas-sification approaches and data aggregation methods In com-parison with state-of-the-art RSSI-based vehicle detection

Wireless Communications and Mobile Computing 11

methods higher accuracy was achieved by introducing adedicated ensemble of random forest classifiers withmajorityvoting

The presented solution can be extended to several bea-cons installed along the road to obtain information concern-ing vehicle velocity and direction Another interesting topicis related to data preprocessing on mobile devices in order toreduce the communication effort Finally additional studieswill be necessary to introduce methods that can be usedto activate the Bluetooth modules and beacons when it isnecessary and reduce the energy consumption

Data Availability

The data used to support the findings of this study areincluded within the supplementary information file

Conflicts of Interest

The authors declare that there are no conflicts of interestregarding the publication of this paper

Acknowledgments

The research was supported by the National Centre forResearch and Development (NCBR) [Grant no LIDER180064L-715NCBR2016]

Supplementary Materials

The supplementary material file (csv) includes a raw RSSIdataset where ldquoidrdquo denotes number of measurement ldquoNoderdquois an identifier of mobile device (receiver) ldquoiBeaconrdquo is anidentifier of beacon (transmitter) ldquoRSSIrdquo is the measuredRSSI value ldquoClassrdquo describes type of observed event (Eempty road C personal car D semitruck and T truck) andldquoFlagrdquo indicates the measurements for which the events wererecorded (symbol ldquo+rdquo) (Supplementary Materials)

References

[1] H Chang Y Wang and P A Ioannou ldquoThe use of micro-scopic traffic simulation model for traffic control systemsrdquo inProceedings of the 2007 International Symposium on InformationTechnology Convergence ISITC 2007 pp 120ndash124 November2007

[2] M Bernas B Płaczek P Porwik and T Pamuła ldquoSegmentationof vehicle detector data for improved k-nearest neighbours-based traffic flow predictionrdquo IET Intelligent Transport Systemsvol 9 no 3 pp 264ndash274 2014

[3] I Ahmad R M Noor I Ali M Imran and A VasilakosldquoCharacterizing the role of vehicular cloud computing in roadtrafficmanagementrdquo International Journal of Distributed SensorNetworks vol 13 no 5 2017

[4] B Płaczek ldquoA self-organizing system for urban traffic controlbased on predictive interval microscopic modelrdquo EngineeringApplications of Artificial Intelligence vol 34 pp 75ndash84 2014

[5] M Karpinski A Senart and V Cahill ldquoSensor networks forsmart roadsrdquo in Proceedings of the 4th Annual IEEE Interna-tional Conference on Pervasive Computing and CommunicationsWorkshops (PerCom rsquo06) pp 310ndash314 IEEE Pisa Italy March2006

[6] G Chatzimilioudis A Konstantinidis C Laoudias and DZeinalipour-Yazti ldquoCrowdsourcing with smartphonesrdquo IEEEInternet Computing vol 16 no 5 pp 36ndash44 2012

[7] R Prabha and M G Kabadi ldquoKNODET A Framework toMine GPS Data for Intelligent Transportation Systems at TrafficSignalsrdquo in Proceedings of the 2017 International Conference onRecent Advances in Electronics and Communication Technology(ICRAECT) pp 85ndash89 Bangalore India March 2017

[8] Y Ma L Zhou Z Gu Y Song and B Wang ldquoChannel Accessand Power Control for Mobile Crowdsourcing in Device-to-DeviceUnderlaidCellularNetworksrdquoWireless Communicationsand Mobile Computing vol 2018 Article ID 7192840 13 pages2018

[9] X Zhang Z Yang W Sun et al ldquoIncentives for mobile crowdsensing A surveyrdquo IEEE Communications Surveys amp Tutorialsvol 18 no 1 pp 54ndash67 2016

[10] N D Lane E Miluzzo H Lu D Peebles T Choudhury andA T Campbell ldquoA survey of mobile phone sensingrdquo IEEECommunications Magazine vol 48 no 9 pp 140ndash150 2010

[11] W Z Khan Y Xiang M Y Aalsalem and Q Arshad ldquoMobilephone sensing systems a surveyrdquo IEEE Communications Sur-veys amp Tutorials vol 15 no 1 pp 402ndash427 2013

[12] R K Ganti F Ye and H Lei ldquoMobile crowdsensing currentstate and future challengesrdquo IEEE Communications Magazinevol 49 no 11 pp 32ndash39 2011

[13] A T Campbell S B Eisenman N D Lane et al ldquoThe rise ofpeople-centric sensingrdquo IEEE Internet Computing vol 12 no 4pp 12ndash21 2008

[14] N Maisonneuve M Stevens M E Niessen and L SteelsldquoNoiseTube Measuring and mapping noise pollution withmobile phonesrdquo Information Technologies in EnvironmentalEngineering pp 215ndash228 2009

[15] C Costa C Laoudias D Zeinalipour-Yazti and D GunopulosldquoSmartTrace Finding similar trajectories in smartphone net-works without disclosing the tracesrdquo in Proceedings of the 2011IEEE 27th International Conference on Data Engineering ICDE2011 pp 1288ndash1291 April 2011

[16] J Gomez J C Torrado and G Montoro ldquoUsing Smartphonesto Assist People withDown Syndrome inTheir Labour Trainingand Integration A Case Studyrdquo Wireless Communications andMobile Computing vol 2017 Article ID 5062371 15 pages 2017

[17] CWu Z Yang and Y Liu ldquoSmartphones based crowdsourcingfor indoor localizationrdquo IEEE Transactions on Mobile Comput-ing vol 14 no 2 pp 444ndash457 2015

[18] S Matyas C Matyas C Schlieder P Kiefer H Mitarai andM Kamata ldquoDesigning location-based mobile games witha purpose Collecting geospatial data with cityexplorerrdquo inProceedings of the 2008 International Conference on Advancesin Computer Entertainment Technology ACE 2008 pp 244ndash247December 2008

[19] H Aly A Basalamah and M Youssef ldquoRobust and ubiquitoussmartphone-based lane detectionrdquo Pervasive and Mobile Com-puting vol 26 pp 35ndash56 2016

[20] E Koukoumidis L-S Peh and M R Martonosi ldquoSignalGuruleveraging mobile phones for collaborative traffic signal sched-ule advisoryrdquo in Proceedings of the 9th International Conference

12 Wireless Communications and Mobile Computing

on Mobile Systems Applications and Services pp 127ndash140 July2011

[21] A Thiagarajan L Ravindranath K LaCurts et al ldquoVTrackaccurate energy-aware road traffic delay estimation usingmobile phonesrdquo in Proceedings of the 7th ACM Conference onEmbedded Networked Sensor Systems (SenSys rsquo09) pp 85ndash98November 2009

[22] MWon S Zhang and SH Son ldquoWiTraffic Low-cost and non-intrusive traffic monitoring system using WiFirdquo in Proceedingsof the 26th International Conference on Computer Communica-tions and Networks ICCCN 2017 pp 1ndash9 IEEE August 2017

[23] MHaferkampMAl-Askary DDorn et al ldquoRadio-based Traf-fic Flow Detection and Vehicle Classification for Future SmartCitiesrdquo in 2017 IEEE 85thVehicular TechnologyConference (VTCSpring) pp 1ndash5 Sydney NSW Australia 2017

[24] G Horvat D Sostaric and D Zagar ldquoUsing radio irregularityfor vehicle detection in adaptive roadway lightingrdquo in Proceed-ings of the 35th International Convention on Information andCommunication Technology Electronics and MicroelectronicsMIPRO 2012 pp 748ndash753 IEEE May 2012

[25] S Roy R Sen S Kulkarni P Kulkarni B Raman and L KSingh ldquoWireless across road RF based road traffic congestiondetectionrdquo in Proceedings of the 2011 Third International Con-ference on Communication Systems and Networks (COMSNETS2011) pp 1ndash6 IEEE January 2011

[26] N Kassem A E Kosba and M Youssef ldquoRF-based vehicledetection and speed estimationrdquo in 2012 IEEE 75th VehicularTechnology Conference (VTC Spring) pp 1ndash5 IEEE

[27] X Li and J Wu ldquoA new method and verification of vehiclesdetection based on RSSI variationrdquo in 2016 10th InternationalConference on Sensing Technology (ICST) pp 1ndash6 IEEE

[28] P Mestre R Guedes P Couto J Matias J C Fernandes andC Serodio ldquoVehicle Detection for Outdoor Car Parks usingIEEE802154rdquo Lecture Notes in Engineering and ComputerScience Newswood Limited ndash IAENG 2013

[29] Apple Inc Getting Started with iBeacon Tech Rep 10 June2014

[30] A Lindemann B Schnor J Sohre and P Vogel ldquoIndoorpositioning A comparison of WiFi and Bluetooth Low Energyfor region monitoringrdquo in Proceedings of the International JointConference on Biomedical Engineering Systems and TechnologiesVolume 5 HEALTHINF pp 314ndash321 Rome Italy February2016

[31] VMartsenyuk KWarwas K Augustynek et al ldquoOnmultivari-ate method of qualitative analysis of Hodgkin-Huxley modelwith decision tree inductionrdquo in Proceedings of the 2016 16thInternational Conference on Control Automation and Systems(ICCAS) pp 489ndash494 Gyeongju South Korea October 2016

[32] M Bernas B Płaczek and W Korski ldquoWireless Networkwith Bluetooth Low Energy Beacons for Vehicle Detectionand Classificationrdquo in CN 2018 Computer Networks P GajM Sawicki G Suchacka and A Kwiecien Eds vol 860 ofCommunications inComputer and Information Science pp 429ndash444 Springer 2018

[33] MWozniak M Grana and E Corchado ldquoA survey of multipleclassifier systems as hybrid systemsrdquo Information Fusion vol 16no 1 pp 3ndash17 2014

[34] G Marcialis and F Roli ldquoFusion of face recognition algo-rithms for video-based surveillance systemsrdquo in MultisensorSurveillance Systems The Fusion Perspective G L Foresti CRegazzoni and P Varshney Eds pp 235ndash250 2003

[35] R Polikar ldquoEnsemble learningrdquo Scholarpedia vol 3 no 12article 2776 2008

[36] G Brown J Wyatt R Harris and X Yao ldquoDiversity creationmethods a survey and categorisationrdquo Information Fusion vol6 no 1 pp 5ndash20 2005

[37] M Bernas and B Płaczek ldquoFully connected neural networksensemble with signal strength clustering for indoor localizationinwireless sensor networksrdquo International Journal ofDistributedSensor Networks vol 2015 Article ID 403242 2015

[38] M Lewandowski T Orczyk and B Płaczek ldquoHuman activitydetection based on the iBeacon technologyrdquo Journal of MedicalInformatics Technologies vol 25 2016

[39] H-G Beyer and H-P Schwefel ldquoEvolution strategiesndashA com-prehensive introductionrdquo Natural Computing vol 1 no 1 pp3ndash52 2002

[40] M R Berthold N Cebron F Dill et al ldquoKNIMETheKonstanzInformation Minerrdquo in Data Analysis Machine Learning andApplications Studies inClassificationDataAnalysis andKnowl-edge Organization C Preisach H Burkhardt L Schmidt-Thieme and R Decker Eds Springer Berlin Germany

[41] B Scholkopf A J Smola R C Williamson and P L BartlettldquoNew support vector algorithmsrdquo Neural Computation vol 12no 5 pp 1207ndash1245 2000

[42] L Breiman ldquoRandom forestsrdquoMachine Learning vol 45 no 1pp 5ndash32 2001

[43] D F Specht ldquoProbabilistic neural networksrdquo Neural Networksvol 3 no 1 pp 109ndash118 1990

[44] D W Aha D Kibler and M K Albert ldquoInstance-BasedLearning Algorithmsrdquo Machine Learning vol 6 no 1 pp 37ndash66 1991

[45] N C Smeeton ldquoEarly History of the Kappa Statisticrdquo Biomet-rics vol 41 no 3 article 795 1985

International Journal of

AerospaceEngineeringHindawiwwwhindawicom Volume 2018

RoboticsJournal of

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Active and Passive Electronic Components

VLSI Design

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Shock and Vibration

Hindawiwwwhindawicom Volume 2018

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawiwwwhindawicom

Volume 2018

Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom

The Scientific World Journal

Volume 2018

Control Scienceand Engineering

Journal of

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom

Journal ofEngineeringVolume 2018

SensorsJournal of

Hindawiwwwhindawicom Volume 2018

International Journal of

RotatingMachinery

Hindawiwwwhindawicom Volume 2018

Modelling ampSimulationin EngineeringHindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Navigation and Observation

International Journal of

Hindawi

wwwhindawicom Volume 2018

Advances in

Multimedia

Submit your manuscripts atwwwhindawicom

Page 6: Road Traffic Monitoring System Based on Mobile …downloads.hindawi.com/journals/wcmc/2018/3251598.pdfIt should be noted that the intro-duced system structure, which includes BLE beacons

6 Wireless Communications and Mobile Computing

position It should be noted that a set of reference positionsin the region of interest on the side of the road has to bedetermined in advance

Details of the proposed data aggregation procedure arepresented by the pseudocode in Algorithm 3 For the sakeof simplicity it was assumed in this pseudocode that onlytwo statistics are to be calculated (maximum andminimum)In practical applications the number of statistics has to belarger as discussed in Section 4The symbolsmin refPos bIDand max refPos bID in Algorithm 3 denote the minimumand maximum RSSI value determined for frames sent frombeacon bID and received by amobile device close to referenceposition refPos in time window [t ndash 119908 t] The statementthat a mobile device is close to a reference position meansthat its distance to the reference position is below d max Itshould be noted that d max is set to be lower than half oftheminimumdistance between reference positions thus eachmobile device is assigned to single reference position Thenumber of reference positions and the number of beacons inAlgorithm 3 are denoted by119898 and n respectively

As it was already mentioned above in this section thetype of the event (which relates to vehicle presence and class)is recognized based on the aggregated RSSI data by usinga classifier ensemble (Algorithm 4) The proposed ensembleconsists of classifiers that are fed with various subsets of theaggregated data A different set of the reference positionsfor which the RSSI data are collected is assigned to eachclassifier in the ensemble Hereinafter this set will be referredto as the classifier rangeThe reference positions are identifiedby natural numbers 1 m Thus the classifier range canbe defined by a pair [a b] where 1 le a le m and a leb le m The range [119886 119887] means that the input dataset ofthe corresponding classifier includes the aggregates (egmin refPos bID and max refPos bID) that were determinedfor the reference positions refPos = a b In case of range[1 119898] the classifier utilizes the complete dataset On the otherhand the classifierrsquos input dataset includes the RSSI readingsfor only one reference position when a =b

For each classifier in the ensemble a weight is determinedwhich corresponds to number of the classifierrsquos votes Thetotal number of votes for a given event type is calculatedby adding the weights of the classifiers that have recognizedthis particular event type As a result the event type whichreceives the highest total number of votes is selected Incase of a tie the class which has higher a priori probabilityis selected Weights of the classifiers are adjusted duringtraining procedure with use of the evolutionary strategy [39]

In this study application of various machine learningalgorithms was considered for implementation of the pro-posed ensemble (support vector machines random forestprobabilistic neural network and k-nearest neighborsrsquo algo-rithm) [31 40] A separate training dataset which includesclasses (ie event types) determined by human observer wasused to train the classifiers

After the events are recognized an update of the vehiclesclassification and detection results is conducted in accor-dance with Algorithm 5This update is necessary because thenew results can be related to time moments for which someevents have already been recognized The new results are

Beacons

Referenceposition 1

Referenceposition 2

Referenceposition 3

Referenceposition 4

4 m

8 m

Figure 2 Test site with reference positions and beacons

Figure 3 Mobile application used for data collection

more credible as they take into account additional recentlycollected data Thus the previous results are deleted Finallythe table Events includes the information about event type forall time points covered by the available RSSI dataset It shouldbe also noted that in this study four event types are considered(empty road presence of personal car semitruck and truck)

4 Experimental Results

Usefulness of the proposed vehicle detection and classifica-tion method was verified during experiments in real-worldtraffic conditions A schemaof the test site aswell as distancesbetween reference positions and beacons is presented inFigure 2 Three BLE beacons were installed on road sideat height of 50 100 and 200 centimeters above the roadsurface This configuration was selected as providing themost promising results on the basis of preliminary tests [32]On the opposite side of the road four reference points weredetermined in equal distances of 4 meters In this area theRSSI measurements were conducted using four smartphonesRedmi 3S held at a height of about 1 meter near to thereference positions The data were collected in a periodof two hours During that period more than 400 vehicleshave passed through the analyzed road section A mobileapplication was developed to enable effective collection ofthe experimental data (Figure 3) Additional mobile deviceswere used by observers to record the events related topresence of vehicles in front of the reference locations withrecognition of three vehicle classes (personal car semitruck

Wireless Communications and Mobile Computing 7

minus95

minus90

minus85

minus80

minus75

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

RSSI

[dBm

]

Time [s]

C D D T

C - carD - semi truckT - truck

(a)

minus95

minus90

minus85

minus80

minus75

RSSI

[dBm

]

Time [s]1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

C D D T

C - carD - semi truckT - truck

(b)

Figure 4 Example of collected data (a) reference position 1 and (b) reference position 4

and truck) All themobile deviceswere synchronized viaNTPprotocol

Examples of collected records for two different referencepositions are presented in Figure 4 The vertical red linesin Figure 4 show the time instances when passing vehicleswere registered by the observers The labels below verticallines denote class of the vehicles These results show thatthe vehicles cause visible changes of RSSI for both locationsMoreover the signal noise increases with distance betweenbeacons and mobile device (Figure 4(a))

For the experimental purposes the collected data weredivided into training and test datasets The experiments wereconducted to evaluate the accuracy of automatic vehicleclassification based on the collected data with use of differentmachine learning algorithms ie support vector machines(SVM) random forest (RF) probabilistic neural network(PNN) and k-nearest neighborsrsquo algorithm (KNN)

The SVM algorithm [41] performs classification tasks byusing hyperplanes defined in a multidimensional space Thehyperplanes that separate training data points with differentclass labels are constructed at the training phase SVMemploys an iterative training procedure to find the optimalhyperplanes having the largest distance to the nearest trainingdata point of any class The larger distance results in lowergeneralization error of the classifier

In case of RF classifier [42] the training procedure createsa set of decision trees from randomly selected subset of train-ing data Each tree performs the classification independentlyand ldquovotesrdquo for the selected class Finally the votes fromdifferent decision trees are aggregated to decide the class ofa test object At this step the RF algorithm chooses the classhaving the majority of votes from particular decision trees

PNN [43] includes three layers of neurons (input layerhidden layer and output layer) The neurons in hidden layerdetermine similarity between test input vector and the train-ing vectors To evaluate this similarity each hidden neuronuses a Gaussian function which is centered on a trainingvector The hidden neurons are collected into groups onegroup for each of the classes There is also one neuron in theoutput layer for each classThe output neuron calculates classprobability on the basis of values received from all hiddenneurons in a given group As a result the posterior probabilityis evaluated for all considered classesThe final decision of theclassifier is the class with maximum probability

KNN algorithm [44] computes distances between thetest data point and all training data points in feature space

072073074075076077078079080081

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20k

Vehicle classification accuracy

Figure 5 Impact of parameter k (number of the nearest neighbors)on accuracy of KNN algorithm

Afterwards k training data points with the lowest distancesare selected as the nearest neighbors The test data point isassigned to the class which is most common among the k-nearest neighbors

During experiments the classification accuracy was com-pared for several RSSI-based traffic monitoring approachesincluding the proposed solution and the state-of-the-artmethods from the literature This comparison takes intoaccount the method with one receiver [25] solutions withmultiple spatially distributed receivers and single classifierwhich detects the vehicles based on a complete RSSI dataset[22 23] and the new introduced algorithmwith the ensembleof classifiers

Initial experiments were conducted to calibrate parame-ters of the algorithms In these experiments vehicle classifi-cation was performed with use of 8 aggregates (minimummaximum difference between max and min mean stan-dard deviation median Pearson correlation coefficient andnumber of received frames) The aggregates were calculatedbased on the RSSI data collected in four reference positionsin accordance with Algorithm 3

Accuracy of the KNN algorithm was tested for parameterk (number of the nearest neighbors) in range between 1and 20 Results of the tests are presented in Figure 5 Basedon these results the value k = 7 which gave the highestclassification accuracy was selected for further experiments

Figure 6 shows the classification accuracy that wasachieved by using the RF algorithm with different number

8 Wireless Communications and Mobile Computing

070

075

080

085

090

095

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20number of decision trees

Vehicle classification accuracy

Figure 6 Accuracy of random forest algorithm for different numberof decision trees

045

055

065

075

085

095

1 2 3 4 5 6Window size [s]

Vehicle classification accuracy

Random ForestKNN

Figure 7 Impact of window size parameter on accuracy of RF andKNN algorithms

of decision trees It can be observed in these results that theaccuracy does not change significantly for the number ofdecision trees above 5 However the accuracy achieved forthe tree number between 6 and 9 was slightly lower than forthe RF with 10 trees A little decrease of the accuracy wasalso observed for the tree number above 10Therefore duringexperiments described later in this section the number ofdecision trees was set to 10 It should be also noted that thecomplexity of the algorithm increases when using a larger setof the decision trees

The impact of the window size on vehicle classificationaccuracy was also examined during the preliminary exper-iments The window size was changed from 1 to 6 secondswith steps of 1 second As shown in Figure 7 for RF andKNN algorithms the best results were obtained when usingthe window size of 3 seconds In case of larger windows theclassification accuracy decreases because the data registeredfor multiple vehicles are aggregated in one window Similarresults were also observed for SVM and PNN algorithmsThus the 3-second window was used in further experiments

088

089

090

091

092

093

Noattributeremoved

Minimum Maximum Average Standarddeviation

Median Framecount

Difference Pearsonscorrelationcoefficient

Removed attribute

Vehicle classification accuracy

Figure 8 Impact of attribute selection on accuracy of RF algorithm

At the next step the most effective set of attributeswas selected with use of the backward elimination methodResults of the elimination for the RF algorithm are presentedin Figure 8 At the beginning the classification accuracy wastested using full dataset with 8 aggregates The result of thistest is shown by the leftmost bar in Figure 8 Next tests wereperformed for the 8 datasets that were created by removingparticular aggregates (attributes) As shown in Figure 8an improvement of the vehicle classification accuracy wasachieved after deletion of the ldquodifferencerdquo attribute (ie thedifference between maximum and minimum) Thus thereduced dataset includes 7 aggregates minimum maximummean standard deviation median Pearson correlation coef-ficient and number of received frames Further eliminationdid not improve the results It was verified that the deletionof the ldquodifferencerdquo attribute is beneficial for all consideredclassification algorithms

Table 1 shows the vehicle detection and classificationaccuracy obtained for the basic approach which takes intoaccount the signal strength measured by a single device[25] (in one reference position) These results were obtainedafter the above-discussed initial search of the best algorithmparameters As it was already mentioned in previous sectionin case of the vehicle classification task four classes ofevents are considered empty road presence of personal carsemitruck and truck For the vehicle detection problem twoclasses are taken into account empty road and presenceof a vehicle The accuracy (ACC) was calculated as overallaccuracy using the following formula

ACC =sum

ni=1 CiD

(1)

where n is number of classes Ci is number of items (events)in the test dataset that are correctly assigned to ith class (eventtype) and D is number of items in test dataset

It should be also noted that the results in Table 1 arepresented for the two classification algorithms that providethe best accuracy These results firmly show that the most

Wireless Communications and Mobile Computing 9

Table 1 Accuracy of vehicle detection and classification based on data collected in one reference position

Reference position Vehicle classification accuracy Vehicle detection accuracyKNN RF KNN RF

1 0788 0817 08486 08642 0702 0699 07311 08013 0725 0804 07807 08594 0822 0861 08982 0932

Table 2 Accuracy of vehicle classification based on data collected in four reference positions

Window size [s]Classification algorithm

RF KNN PNN SVMACC CK ACC CK ACC CK ACC CK

2 0885 0801 0619 0287 0533 0099 0525 00003 0922 0865 0809 0658 0684 0403 0561 00894 0914 0853 0773 0582 0802 0639 0734 05335 0843 0729 0794 0630 0629 0286 0538 00366 0799 0651 0747 0549 0728 0512 0559 0088

accurate vehicle classification and detection was possiblewhen the mobile device is placed opposite the beacons loca-tion (in reference position 4)The results confirmobservationthat noise in RSSI readings increases with the distance frombeacons to mobile device It should be also noted that thenumber of RSSI samples that are collected when a vehicleis present between beacons and mobile device decreaseswith the speed of the vehicle As a result lower accuracyis observed for higher speed of vehicles In the consideredtest site the vehicles were slowing down when passingthe reference position 1 since this position was close to acrossroadThus the accuracy obtained for reference position1 is higher than for reference positions 2 and 3

In further tests the other approachwas considered whichis based on application of multiple receivers and one classifier[22 23] According to this approach the vehicles wererecognized by single classifier using the dataset collectedin four reference positions Results of these experimentsare shown in Table 2 The classification accuracy (ACC)and Cohenrsquos kappa [45] (CK) is compared in Table 2 forall considered classification algorithms and various sizes ofthe sliding window When comparing the results in Table 2with those in Table 1 it can be observed that the RSSIdata collected by multiple devices in several locations alongthe road enable more accurate vehicle classification Similarexperiments were also conducted for the vehicle detectiontask and the accuracy of 0935 was achieved

The results in Table 2 firmly show that size of the slidingwindow has a significant impact on the accuracy of vehicledetection and classification Passing vehicles cause a dropin RSSI level This drop is longer for trucks and shorter forpersonal cars In order to correctly recognize the vehicle thesliding window has to cover the time when RSSI values arereduced If the sliding window is to narrow the lower RSSIvaluesmay be registered in entirewindow for different vehicleclasses and thus the classes cannot be correctly recognizedIf single classifier is used a wider window is also helpful

because the drop of RSSI is shifted in time for differentreference locations However in case of an excessive windowsize two successive vehicles can be captured in one windowwhich results in decreased accuracy of the detection andclassification The best result results were obtained by usingthe random forest classifier with window size of 3 seconds

The next step of the research was aimed at increasingthe accuracy of vehicle detection by using the proposedclassifier ensemble in combination with majority voting asdescribed in Section 3 It should be noted that the proposedmethod was used with time step of 1 second and d max =1 meter During the tests of the ensemble different rangesof individual member classifiers were taken into account(see Table 3) The input data of individual classifiers wereobtained not only from particular reference positions (egClassifier 1 in Ensemble no 1) but also from a connection ofthe neighboring positions (eg Classifier 1 in Ensemble no3) When analyzing the results presented in Table 3 it canbe observed that the highest accuracy was achieved for theensembles of the random forest classifiersThe best ensemble(no 5) combines the classifiers that are fed with data fromtwo neighboring reference positions (Classifiers 1-3) with theclassifier created for reference position 4 (Classifier 4) andthe classifier which utilizes the entire dataset (Classifier 5)Classifier 4 with range [4 4] was included in the ensembleas it provides the best accuracy when using data from singlereference position The high accuracy was also obtained forEnsembles no 2 and 6 Results of these ensembles are onlyslightly worse than those for Ensemble no 5 This fact showsthat the proposed approach achieves high vehicle classifica-tion and detection accuracy by combining local classifiers(that utilize data from two neighboring reference positionsor single reference position) with the global classifier (whichmakes decisions based on data collected in all referencepositions)

It was noted that the random forest algorithm wasabout 85 more effective than KNN The proposed method

10 Wireless Communications and Mobile Computing

Table 3 Accuracy of vehicle detection and classification with use of the proposed classifier ensemble

Ensemble no Classifier range Vehicle classification accuracy Vehicle detection accuracyClas 1 Clas 2 Clas 3 Clas 4 Clas 5 KNN RF KNN RF

1 [1 1] [2 2] [3 3] [4 4] - 0862 0890 0906 09562 [1 1] [2 2] [3 3] [4 4] [1 4] 0862 0935 0898 09613 [1 2] [2 3] [3 4] - - 0799 0922 0854 09634 [1 2] [2 3] [3 4] [4 4] - 0833 0922 0898 09695 [1 2] [2 3] [3 4] [4 4] [1 4] 0846 0943 0898 09776 [1 2] [2 3] [3 4] - [1 4] 0825 0940 0854 09697 [1 3] [2 4] - - - 0781 0911 0752 09378 [1 3] [2 4] [4 4] 0836 0922 0898 09589 [1 3] [2 4] [4 4] [1 4] 0846 0932 0898 096610 [4 4] [1 4] 0846 0924 0828 0935

070

075

080

085

090

095

100

RFensemble

no 2

RFensemble

no5

RFensemble

no6

RFsingle

classifier

KNNensemble

no 2

KNNensemble

no 5

KNNensemble

no 6

KNNsingle

classifier

Vehicle detection accuracy

Figure 9 Comparison of vehicle detection accuracy for classifierensembles and for single classifiers

achieves the accuracy above 97 for vehicle detection taskand above 94 in case of the vehicle classification taskIt means that the introduced classifier ensemble providesbetter results than the state-of-the-art methods that utilizeindividual classifiers (see Tables 1 and 2)

Results obtained for the best classifier ensembles and forthe individual (single) classifiers are compared in Figures9 and 10 The box plots show minimum first quartilemedian third quartile and maximum of the accuracy valuesfor 30 tests For each test different training and testingdatasets were selected from the measurement data In theseresults significant differences of the accuracy are visible whencomparing the single classifiers with their ensemble counter-parts Similarly the accuracy differences are significant whencomparing the RF classifiers with KNN classifiers It shouldbe also noted that the accuracies achieved by the best RFensembles do not differ significantly Thus selection amongthese ensembles should be considered as a tuning of theproposed method

The higher accuracy of RF ensemble can be explainedby the fact that the RF algorithm has several features whichenable effective training of the classifier According to thisalgorithm all decision trees in the forest are created by

070

075

080

085

090

095

100

RFensemble

no 2

RFensemble

no5

RFensemble

no6

RFsingle

classifier

KNNensemble

no 2

KNNensemble

no 5

KNNensemble

no 6

KNNsingle

classifier

Vehicle classification accuracy

Figure 10 Comparison of vehicle classification accuracy for classi-fier ensembles and for single classifiers

using randomly selected subsets of the training dataset Therandom selection applies to both the events (rows) and theaggregates (columns) Each decision tree further divides thetraining data into smaller subsets until the subsets are smallor all events in these subsets belong to one class In contrast toRF the other compared algorithms (includingKNN) performthe training procedures with use of the complete trainingdataset

5 Conclusions

The proposed vehicle detection and classification approachuses mobile devices (smartphones) and Bluetooth beaconsfor road traffic monitoring It allows detecting three classesof vehicles by analyzing strength of radio signal received fromBLE beacons that are installed at different heights by the roadThis approach is suitable for crowd sourcing applicationsaimed at reducing travel time congestion and emissionsAdvantages of the introduced method were demonstratedduring experimental evaluation in real-traffic conditionsExtensive experiments were conducted to test different clas-sification approaches and data aggregation methods In com-parison with state-of-the-art RSSI-based vehicle detection

Wireless Communications and Mobile Computing 11

methods higher accuracy was achieved by introducing adedicated ensemble of random forest classifiers withmajorityvoting

The presented solution can be extended to several bea-cons installed along the road to obtain information concern-ing vehicle velocity and direction Another interesting topicis related to data preprocessing on mobile devices in order toreduce the communication effort Finally additional studieswill be necessary to introduce methods that can be usedto activate the Bluetooth modules and beacons when it isnecessary and reduce the energy consumption

Data Availability

The data used to support the findings of this study areincluded within the supplementary information file

Conflicts of Interest

The authors declare that there are no conflicts of interestregarding the publication of this paper

Acknowledgments

The research was supported by the National Centre forResearch and Development (NCBR) [Grant no LIDER180064L-715NCBR2016]

Supplementary Materials

The supplementary material file (csv) includes a raw RSSIdataset where ldquoidrdquo denotes number of measurement ldquoNoderdquois an identifier of mobile device (receiver) ldquoiBeaconrdquo is anidentifier of beacon (transmitter) ldquoRSSIrdquo is the measuredRSSI value ldquoClassrdquo describes type of observed event (Eempty road C personal car D semitruck and T truck) andldquoFlagrdquo indicates the measurements for which the events wererecorded (symbol ldquo+rdquo) (Supplementary Materials)

References

[1] H Chang Y Wang and P A Ioannou ldquoThe use of micro-scopic traffic simulation model for traffic control systemsrdquo inProceedings of the 2007 International Symposium on InformationTechnology Convergence ISITC 2007 pp 120ndash124 November2007

[2] M Bernas B Płaczek P Porwik and T Pamuła ldquoSegmentationof vehicle detector data for improved k-nearest neighbours-based traffic flow predictionrdquo IET Intelligent Transport Systemsvol 9 no 3 pp 264ndash274 2014

[3] I Ahmad R M Noor I Ali M Imran and A VasilakosldquoCharacterizing the role of vehicular cloud computing in roadtrafficmanagementrdquo International Journal of Distributed SensorNetworks vol 13 no 5 2017

[4] B Płaczek ldquoA self-organizing system for urban traffic controlbased on predictive interval microscopic modelrdquo EngineeringApplications of Artificial Intelligence vol 34 pp 75ndash84 2014

[5] M Karpinski A Senart and V Cahill ldquoSensor networks forsmart roadsrdquo in Proceedings of the 4th Annual IEEE Interna-tional Conference on Pervasive Computing and CommunicationsWorkshops (PerCom rsquo06) pp 310ndash314 IEEE Pisa Italy March2006

[6] G Chatzimilioudis A Konstantinidis C Laoudias and DZeinalipour-Yazti ldquoCrowdsourcing with smartphonesrdquo IEEEInternet Computing vol 16 no 5 pp 36ndash44 2012

[7] R Prabha and M G Kabadi ldquoKNODET A Framework toMine GPS Data for Intelligent Transportation Systems at TrafficSignalsrdquo in Proceedings of the 2017 International Conference onRecent Advances in Electronics and Communication Technology(ICRAECT) pp 85ndash89 Bangalore India March 2017

[8] Y Ma L Zhou Z Gu Y Song and B Wang ldquoChannel Accessand Power Control for Mobile Crowdsourcing in Device-to-DeviceUnderlaidCellularNetworksrdquoWireless Communicationsand Mobile Computing vol 2018 Article ID 7192840 13 pages2018

[9] X Zhang Z Yang W Sun et al ldquoIncentives for mobile crowdsensing A surveyrdquo IEEE Communications Surveys amp Tutorialsvol 18 no 1 pp 54ndash67 2016

[10] N D Lane E Miluzzo H Lu D Peebles T Choudhury andA T Campbell ldquoA survey of mobile phone sensingrdquo IEEECommunications Magazine vol 48 no 9 pp 140ndash150 2010

[11] W Z Khan Y Xiang M Y Aalsalem and Q Arshad ldquoMobilephone sensing systems a surveyrdquo IEEE Communications Sur-veys amp Tutorials vol 15 no 1 pp 402ndash427 2013

[12] R K Ganti F Ye and H Lei ldquoMobile crowdsensing currentstate and future challengesrdquo IEEE Communications Magazinevol 49 no 11 pp 32ndash39 2011

[13] A T Campbell S B Eisenman N D Lane et al ldquoThe rise ofpeople-centric sensingrdquo IEEE Internet Computing vol 12 no 4pp 12ndash21 2008

[14] N Maisonneuve M Stevens M E Niessen and L SteelsldquoNoiseTube Measuring and mapping noise pollution withmobile phonesrdquo Information Technologies in EnvironmentalEngineering pp 215ndash228 2009

[15] C Costa C Laoudias D Zeinalipour-Yazti and D GunopulosldquoSmartTrace Finding similar trajectories in smartphone net-works without disclosing the tracesrdquo in Proceedings of the 2011IEEE 27th International Conference on Data Engineering ICDE2011 pp 1288ndash1291 April 2011

[16] J Gomez J C Torrado and G Montoro ldquoUsing Smartphonesto Assist People withDown Syndrome inTheir Labour Trainingand Integration A Case Studyrdquo Wireless Communications andMobile Computing vol 2017 Article ID 5062371 15 pages 2017

[17] CWu Z Yang and Y Liu ldquoSmartphones based crowdsourcingfor indoor localizationrdquo IEEE Transactions on Mobile Comput-ing vol 14 no 2 pp 444ndash457 2015

[18] S Matyas C Matyas C Schlieder P Kiefer H Mitarai andM Kamata ldquoDesigning location-based mobile games witha purpose Collecting geospatial data with cityexplorerrdquo inProceedings of the 2008 International Conference on Advancesin Computer Entertainment Technology ACE 2008 pp 244ndash247December 2008

[19] H Aly A Basalamah and M Youssef ldquoRobust and ubiquitoussmartphone-based lane detectionrdquo Pervasive and Mobile Com-puting vol 26 pp 35ndash56 2016

[20] E Koukoumidis L-S Peh and M R Martonosi ldquoSignalGuruleveraging mobile phones for collaborative traffic signal sched-ule advisoryrdquo in Proceedings of the 9th International Conference

12 Wireless Communications and Mobile Computing

on Mobile Systems Applications and Services pp 127ndash140 July2011

[21] A Thiagarajan L Ravindranath K LaCurts et al ldquoVTrackaccurate energy-aware road traffic delay estimation usingmobile phonesrdquo in Proceedings of the 7th ACM Conference onEmbedded Networked Sensor Systems (SenSys rsquo09) pp 85ndash98November 2009

[22] MWon S Zhang and SH Son ldquoWiTraffic Low-cost and non-intrusive traffic monitoring system using WiFirdquo in Proceedingsof the 26th International Conference on Computer Communica-tions and Networks ICCCN 2017 pp 1ndash9 IEEE August 2017

[23] MHaferkampMAl-Askary DDorn et al ldquoRadio-based Traf-fic Flow Detection and Vehicle Classification for Future SmartCitiesrdquo in 2017 IEEE 85thVehicular TechnologyConference (VTCSpring) pp 1ndash5 Sydney NSW Australia 2017

[24] G Horvat D Sostaric and D Zagar ldquoUsing radio irregularityfor vehicle detection in adaptive roadway lightingrdquo in Proceed-ings of the 35th International Convention on Information andCommunication Technology Electronics and MicroelectronicsMIPRO 2012 pp 748ndash753 IEEE May 2012

[25] S Roy R Sen S Kulkarni P Kulkarni B Raman and L KSingh ldquoWireless across road RF based road traffic congestiondetectionrdquo in Proceedings of the 2011 Third International Con-ference on Communication Systems and Networks (COMSNETS2011) pp 1ndash6 IEEE January 2011

[26] N Kassem A E Kosba and M Youssef ldquoRF-based vehicledetection and speed estimationrdquo in 2012 IEEE 75th VehicularTechnology Conference (VTC Spring) pp 1ndash5 IEEE

[27] X Li and J Wu ldquoA new method and verification of vehiclesdetection based on RSSI variationrdquo in 2016 10th InternationalConference on Sensing Technology (ICST) pp 1ndash6 IEEE

[28] P Mestre R Guedes P Couto J Matias J C Fernandes andC Serodio ldquoVehicle Detection for Outdoor Car Parks usingIEEE802154rdquo Lecture Notes in Engineering and ComputerScience Newswood Limited ndash IAENG 2013

[29] Apple Inc Getting Started with iBeacon Tech Rep 10 June2014

[30] A Lindemann B Schnor J Sohre and P Vogel ldquoIndoorpositioning A comparison of WiFi and Bluetooth Low Energyfor region monitoringrdquo in Proceedings of the International JointConference on Biomedical Engineering Systems and TechnologiesVolume 5 HEALTHINF pp 314ndash321 Rome Italy February2016

[31] VMartsenyuk KWarwas K Augustynek et al ldquoOnmultivari-ate method of qualitative analysis of Hodgkin-Huxley modelwith decision tree inductionrdquo in Proceedings of the 2016 16thInternational Conference on Control Automation and Systems(ICCAS) pp 489ndash494 Gyeongju South Korea October 2016

[32] M Bernas B Płaczek and W Korski ldquoWireless Networkwith Bluetooth Low Energy Beacons for Vehicle Detectionand Classificationrdquo in CN 2018 Computer Networks P GajM Sawicki G Suchacka and A Kwiecien Eds vol 860 ofCommunications inComputer and Information Science pp 429ndash444 Springer 2018

[33] MWozniak M Grana and E Corchado ldquoA survey of multipleclassifier systems as hybrid systemsrdquo Information Fusion vol 16no 1 pp 3ndash17 2014

[34] G Marcialis and F Roli ldquoFusion of face recognition algo-rithms for video-based surveillance systemsrdquo in MultisensorSurveillance Systems The Fusion Perspective G L Foresti CRegazzoni and P Varshney Eds pp 235ndash250 2003

[35] R Polikar ldquoEnsemble learningrdquo Scholarpedia vol 3 no 12article 2776 2008

[36] G Brown J Wyatt R Harris and X Yao ldquoDiversity creationmethods a survey and categorisationrdquo Information Fusion vol6 no 1 pp 5ndash20 2005

[37] M Bernas and B Płaczek ldquoFully connected neural networksensemble with signal strength clustering for indoor localizationinwireless sensor networksrdquo International Journal ofDistributedSensor Networks vol 2015 Article ID 403242 2015

[38] M Lewandowski T Orczyk and B Płaczek ldquoHuman activitydetection based on the iBeacon technologyrdquo Journal of MedicalInformatics Technologies vol 25 2016

[39] H-G Beyer and H-P Schwefel ldquoEvolution strategiesndashA com-prehensive introductionrdquo Natural Computing vol 1 no 1 pp3ndash52 2002

[40] M R Berthold N Cebron F Dill et al ldquoKNIMETheKonstanzInformation Minerrdquo in Data Analysis Machine Learning andApplications Studies inClassificationDataAnalysis andKnowl-edge Organization C Preisach H Burkhardt L Schmidt-Thieme and R Decker Eds Springer Berlin Germany

[41] B Scholkopf A J Smola R C Williamson and P L BartlettldquoNew support vector algorithmsrdquo Neural Computation vol 12no 5 pp 1207ndash1245 2000

[42] L Breiman ldquoRandom forestsrdquoMachine Learning vol 45 no 1pp 5ndash32 2001

[43] D F Specht ldquoProbabilistic neural networksrdquo Neural Networksvol 3 no 1 pp 109ndash118 1990

[44] D W Aha D Kibler and M K Albert ldquoInstance-BasedLearning Algorithmsrdquo Machine Learning vol 6 no 1 pp 37ndash66 1991

[45] N C Smeeton ldquoEarly History of the Kappa Statisticrdquo Biomet-rics vol 41 no 3 article 795 1985

International Journal of

AerospaceEngineeringHindawiwwwhindawicom Volume 2018

RoboticsJournal of

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Active and Passive Electronic Components

VLSI Design

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Shock and Vibration

Hindawiwwwhindawicom Volume 2018

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawiwwwhindawicom

Volume 2018

Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom

The Scientific World Journal

Volume 2018

Control Scienceand Engineering

Journal of

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom

Journal ofEngineeringVolume 2018

SensorsJournal of

Hindawiwwwhindawicom Volume 2018

International Journal of

RotatingMachinery

Hindawiwwwhindawicom Volume 2018

Modelling ampSimulationin EngineeringHindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Navigation and Observation

International Journal of

Hindawi

wwwhindawicom Volume 2018

Advances in

Multimedia

Submit your manuscripts atwwwhindawicom

Page 7: Road Traffic Monitoring System Based on Mobile …downloads.hindawi.com/journals/wcmc/2018/3251598.pdfIt should be noted that the intro-duced system structure, which includes BLE beacons

Wireless Communications and Mobile Computing 7

minus95

minus90

minus85

minus80

minus75

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

RSSI

[dBm

]

Time [s]

C D D T

C - carD - semi truckT - truck

(a)

minus95

minus90

minus85

minus80

minus75

RSSI

[dBm

]

Time [s]1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

C D D T

C - carD - semi truckT - truck

(b)

Figure 4 Example of collected data (a) reference position 1 and (b) reference position 4

and truck) All themobile deviceswere synchronized viaNTPprotocol

Examples of collected records for two different referencepositions are presented in Figure 4 The vertical red linesin Figure 4 show the time instances when passing vehicleswere registered by the observers The labels below verticallines denote class of the vehicles These results show thatthe vehicles cause visible changes of RSSI for both locationsMoreover the signal noise increases with distance betweenbeacons and mobile device (Figure 4(a))

For the experimental purposes the collected data weredivided into training and test datasets The experiments wereconducted to evaluate the accuracy of automatic vehicleclassification based on the collected data with use of differentmachine learning algorithms ie support vector machines(SVM) random forest (RF) probabilistic neural network(PNN) and k-nearest neighborsrsquo algorithm (KNN)

The SVM algorithm [41] performs classification tasks byusing hyperplanes defined in a multidimensional space Thehyperplanes that separate training data points with differentclass labels are constructed at the training phase SVMemploys an iterative training procedure to find the optimalhyperplanes having the largest distance to the nearest trainingdata point of any class The larger distance results in lowergeneralization error of the classifier

In case of RF classifier [42] the training procedure createsa set of decision trees from randomly selected subset of train-ing data Each tree performs the classification independentlyand ldquovotesrdquo for the selected class Finally the votes fromdifferent decision trees are aggregated to decide the class ofa test object At this step the RF algorithm chooses the classhaving the majority of votes from particular decision trees

PNN [43] includes three layers of neurons (input layerhidden layer and output layer) The neurons in hidden layerdetermine similarity between test input vector and the train-ing vectors To evaluate this similarity each hidden neuronuses a Gaussian function which is centered on a trainingvector The hidden neurons are collected into groups onegroup for each of the classes There is also one neuron in theoutput layer for each classThe output neuron calculates classprobability on the basis of values received from all hiddenneurons in a given group As a result the posterior probabilityis evaluated for all considered classesThe final decision of theclassifier is the class with maximum probability

KNN algorithm [44] computes distances between thetest data point and all training data points in feature space

072073074075076077078079080081

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20k

Vehicle classification accuracy

Figure 5 Impact of parameter k (number of the nearest neighbors)on accuracy of KNN algorithm

Afterwards k training data points with the lowest distancesare selected as the nearest neighbors The test data point isassigned to the class which is most common among the k-nearest neighbors

During experiments the classification accuracy was com-pared for several RSSI-based traffic monitoring approachesincluding the proposed solution and the state-of-the-artmethods from the literature This comparison takes intoaccount the method with one receiver [25] solutions withmultiple spatially distributed receivers and single classifierwhich detects the vehicles based on a complete RSSI dataset[22 23] and the new introduced algorithmwith the ensembleof classifiers

Initial experiments were conducted to calibrate parame-ters of the algorithms In these experiments vehicle classifi-cation was performed with use of 8 aggregates (minimummaximum difference between max and min mean stan-dard deviation median Pearson correlation coefficient andnumber of received frames) The aggregates were calculatedbased on the RSSI data collected in four reference positionsin accordance with Algorithm 3

Accuracy of the KNN algorithm was tested for parameterk (number of the nearest neighbors) in range between 1and 20 Results of the tests are presented in Figure 5 Basedon these results the value k = 7 which gave the highestclassification accuracy was selected for further experiments

Figure 6 shows the classification accuracy that wasachieved by using the RF algorithm with different number

8 Wireless Communications and Mobile Computing

070

075

080

085

090

095

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20number of decision trees

Vehicle classification accuracy

Figure 6 Accuracy of random forest algorithm for different numberof decision trees

045

055

065

075

085

095

1 2 3 4 5 6Window size [s]

Vehicle classification accuracy

Random ForestKNN

Figure 7 Impact of window size parameter on accuracy of RF andKNN algorithms

of decision trees It can be observed in these results that theaccuracy does not change significantly for the number ofdecision trees above 5 However the accuracy achieved forthe tree number between 6 and 9 was slightly lower than forthe RF with 10 trees A little decrease of the accuracy wasalso observed for the tree number above 10Therefore duringexperiments described later in this section the number ofdecision trees was set to 10 It should be also noted that thecomplexity of the algorithm increases when using a larger setof the decision trees

The impact of the window size on vehicle classificationaccuracy was also examined during the preliminary exper-iments The window size was changed from 1 to 6 secondswith steps of 1 second As shown in Figure 7 for RF andKNN algorithms the best results were obtained when usingthe window size of 3 seconds In case of larger windows theclassification accuracy decreases because the data registeredfor multiple vehicles are aggregated in one window Similarresults were also observed for SVM and PNN algorithmsThus the 3-second window was used in further experiments

088

089

090

091

092

093

Noattributeremoved

Minimum Maximum Average Standarddeviation

Median Framecount

Difference Pearsonscorrelationcoefficient

Removed attribute

Vehicle classification accuracy

Figure 8 Impact of attribute selection on accuracy of RF algorithm

At the next step the most effective set of attributeswas selected with use of the backward elimination methodResults of the elimination for the RF algorithm are presentedin Figure 8 At the beginning the classification accuracy wastested using full dataset with 8 aggregates The result of thistest is shown by the leftmost bar in Figure 8 Next tests wereperformed for the 8 datasets that were created by removingparticular aggregates (attributes) As shown in Figure 8an improvement of the vehicle classification accuracy wasachieved after deletion of the ldquodifferencerdquo attribute (ie thedifference between maximum and minimum) Thus thereduced dataset includes 7 aggregates minimum maximummean standard deviation median Pearson correlation coef-ficient and number of received frames Further eliminationdid not improve the results It was verified that the deletionof the ldquodifferencerdquo attribute is beneficial for all consideredclassification algorithms

Table 1 shows the vehicle detection and classificationaccuracy obtained for the basic approach which takes intoaccount the signal strength measured by a single device[25] (in one reference position) These results were obtainedafter the above-discussed initial search of the best algorithmparameters As it was already mentioned in previous sectionin case of the vehicle classification task four classes ofevents are considered empty road presence of personal carsemitruck and truck For the vehicle detection problem twoclasses are taken into account empty road and presenceof a vehicle The accuracy (ACC) was calculated as overallaccuracy using the following formula

ACC =sum

ni=1 CiD

(1)

where n is number of classes Ci is number of items (events)in the test dataset that are correctly assigned to ith class (eventtype) and D is number of items in test dataset

It should be also noted that the results in Table 1 arepresented for the two classification algorithms that providethe best accuracy These results firmly show that the most

Wireless Communications and Mobile Computing 9

Table 1 Accuracy of vehicle detection and classification based on data collected in one reference position

Reference position Vehicle classification accuracy Vehicle detection accuracyKNN RF KNN RF

1 0788 0817 08486 08642 0702 0699 07311 08013 0725 0804 07807 08594 0822 0861 08982 0932

Table 2 Accuracy of vehicle classification based on data collected in four reference positions

Window size [s]Classification algorithm

RF KNN PNN SVMACC CK ACC CK ACC CK ACC CK

2 0885 0801 0619 0287 0533 0099 0525 00003 0922 0865 0809 0658 0684 0403 0561 00894 0914 0853 0773 0582 0802 0639 0734 05335 0843 0729 0794 0630 0629 0286 0538 00366 0799 0651 0747 0549 0728 0512 0559 0088

accurate vehicle classification and detection was possiblewhen the mobile device is placed opposite the beacons loca-tion (in reference position 4)The results confirmobservationthat noise in RSSI readings increases with the distance frombeacons to mobile device It should be also noted that thenumber of RSSI samples that are collected when a vehicleis present between beacons and mobile device decreaseswith the speed of the vehicle As a result lower accuracyis observed for higher speed of vehicles In the consideredtest site the vehicles were slowing down when passingthe reference position 1 since this position was close to acrossroadThus the accuracy obtained for reference position1 is higher than for reference positions 2 and 3

In further tests the other approachwas considered whichis based on application of multiple receivers and one classifier[22 23] According to this approach the vehicles wererecognized by single classifier using the dataset collectedin four reference positions Results of these experimentsare shown in Table 2 The classification accuracy (ACC)and Cohenrsquos kappa [45] (CK) is compared in Table 2 forall considered classification algorithms and various sizes ofthe sliding window When comparing the results in Table 2with those in Table 1 it can be observed that the RSSIdata collected by multiple devices in several locations alongthe road enable more accurate vehicle classification Similarexperiments were also conducted for the vehicle detectiontask and the accuracy of 0935 was achieved

The results in Table 2 firmly show that size of the slidingwindow has a significant impact on the accuracy of vehicledetection and classification Passing vehicles cause a dropin RSSI level This drop is longer for trucks and shorter forpersonal cars In order to correctly recognize the vehicle thesliding window has to cover the time when RSSI values arereduced If the sliding window is to narrow the lower RSSIvaluesmay be registered in entirewindow for different vehicleclasses and thus the classes cannot be correctly recognizedIf single classifier is used a wider window is also helpful

because the drop of RSSI is shifted in time for differentreference locations However in case of an excessive windowsize two successive vehicles can be captured in one windowwhich results in decreased accuracy of the detection andclassification The best result results were obtained by usingthe random forest classifier with window size of 3 seconds

The next step of the research was aimed at increasingthe accuracy of vehicle detection by using the proposedclassifier ensemble in combination with majority voting asdescribed in Section 3 It should be noted that the proposedmethod was used with time step of 1 second and d max =1 meter During the tests of the ensemble different rangesof individual member classifiers were taken into account(see Table 3) The input data of individual classifiers wereobtained not only from particular reference positions (egClassifier 1 in Ensemble no 1) but also from a connection ofthe neighboring positions (eg Classifier 1 in Ensemble no3) When analyzing the results presented in Table 3 it canbe observed that the highest accuracy was achieved for theensembles of the random forest classifiersThe best ensemble(no 5) combines the classifiers that are fed with data fromtwo neighboring reference positions (Classifiers 1-3) with theclassifier created for reference position 4 (Classifier 4) andthe classifier which utilizes the entire dataset (Classifier 5)Classifier 4 with range [4 4] was included in the ensembleas it provides the best accuracy when using data from singlereference position The high accuracy was also obtained forEnsembles no 2 and 6 Results of these ensembles are onlyslightly worse than those for Ensemble no 5 This fact showsthat the proposed approach achieves high vehicle classifica-tion and detection accuracy by combining local classifiers(that utilize data from two neighboring reference positionsor single reference position) with the global classifier (whichmakes decisions based on data collected in all referencepositions)

It was noted that the random forest algorithm wasabout 85 more effective than KNN The proposed method

10 Wireless Communications and Mobile Computing

Table 3 Accuracy of vehicle detection and classification with use of the proposed classifier ensemble

Ensemble no Classifier range Vehicle classification accuracy Vehicle detection accuracyClas 1 Clas 2 Clas 3 Clas 4 Clas 5 KNN RF KNN RF

1 [1 1] [2 2] [3 3] [4 4] - 0862 0890 0906 09562 [1 1] [2 2] [3 3] [4 4] [1 4] 0862 0935 0898 09613 [1 2] [2 3] [3 4] - - 0799 0922 0854 09634 [1 2] [2 3] [3 4] [4 4] - 0833 0922 0898 09695 [1 2] [2 3] [3 4] [4 4] [1 4] 0846 0943 0898 09776 [1 2] [2 3] [3 4] - [1 4] 0825 0940 0854 09697 [1 3] [2 4] - - - 0781 0911 0752 09378 [1 3] [2 4] [4 4] 0836 0922 0898 09589 [1 3] [2 4] [4 4] [1 4] 0846 0932 0898 096610 [4 4] [1 4] 0846 0924 0828 0935

070

075

080

085

090

095

100

RFensemble

no 2

RFensemble

no5

RFensemble

no6

RFsingle

classifier

KNNensemble

no 2

KNNensemble

no 5

KNNensemble

no 6

KNNsingle

classifier

Vehicle detection accuracy

Figure 9 Comparison of vehicle detection accuracy for classifierensembles and for single classifiers

achieves the accuracy above 97 for vehicle detection taskand above 94 in case of the vehicle classification taskIt means that the introduced classifier ensemble providesbetter results than the state-of-the-art methods that utilizeindividual classifiers (see Tables 1 and 2)

Results obtained for the best classifier ensembles and forthe individual (single) classifiers are compared in Figures9 and 10 The box plots show minimum first quartilemedian third quartile and maximum of the accuracy valuesfor 30 tests For each test different training and testingdatasets were selected from the measurement data In theseresults significant differences of the accuracy are visible whencomparing the single classifiers with their ensemble counter-parts Similarly the accuracy differences are significant whencomparing the RF classifiers with KNN classifiers It shouldbe also noted that the accuracies achieved by the best RFensembles do not differ significantly Thus selection amongthese ensembles should be considered as a tuning of theproposed method

The higher accuracy of RF ensemble can be explainedby the fact that the RF algorithm has several features whichenable effective training of the classifier According to thisalgorithm all decision trees in the forest are created by

070

075

080

085

090

095

100

RFensemble

no 2

RFensemble

no5

RFensemble

no6

RFsingle

classifier

KNNensemble

no 2

KNNensemble

no 5

KNNensemble

no 6

KNNsingle

classifier

Vehicle classification accuracy

Figure 10 Comparison of vehicle classification accuracy for classi-fier ensembles and for single classifiers

using randomly selected subsets of the training dataset Therandom selection applies to both the events (rows) and theaggregates (columns) Each decision tree further divides thetraining data into smaller subsets until the subsets are smallor all events in these subsets belong to one class In contrast toRF the other compared algorithms (includingKNN) performthe training procedures with use of the complete trainingdataset

5 Conclusions

The proposed vehicle detection and classification approachuses mobile devices (smartphones) and Bluetooth beaconsfor road traffic monitoring It allows detecting three classesof vehicles by analyzing strength of radio signal received fromBLE beacons that are installed at different heights by the roadThis approach is suitable for crowd sourcing applicationsaimed at reducing travel time congestion and emissionsAdvantages of the introduced method were demonstratedduring experimental evaluation in real-traffic conditionsExtensive experiments were conducted to test different clas-sification approaches and data aggregation methods In com-parison with state-of-the-art RSSI-based vehicle detection

Wireless Communications and Mobile Computing 11

methods higher accuracy was achieved by introducing adedicated ensemble of random forest classifiers withmajorityvoting

The presented solution can be extended to several bea-cons installed along the road to obtain information concern-ing vehicle velocity and direction Another interesting topicis related to data preprocessing on mobile devices in order toreduce the communication effort Finally additional studieswill be necessary to introduce methods that can be usedto activate the Bluetooth modules and beacons when it isnecessary and reduce the energy consumption

Data Availability

The data used to support the findings of this study areincluded within the supplementary information file

Conflicts of Interest

The authors declare that there are no conflicts of interestregarding the publication of this paper

Acknowledgments

The research was supported by the National Centre forResearch and Development (NCBR) [Grant no LIDER180064L-715NCBR2016]

Supplementary Materials

The supplementary material file (csv) includes a raw RSSIdataset where ldquoidrdquo denotes number of measurement ldquoNoderdquois an identifier of mobile device (receiver) ldquoiBeaconrdquo is anidentifier of beacon (transmitter) ldquoRSSIrdquo is the measuredRSSI value ldquoClassrdquo describes type of observed event (Eempty road C personal car D semitruck and T truck) andldquoFlagrdquo indicates the measurements for which the events wererecorded (symbol ldquo+rdquo) (Supplementary Materials)

References

[1] H Chang Y Wang and P A Ioannou ldquoThe use of micro-scopic traffic simulation model for traffic control systemsrdquo inProceedings of the 2007 International Symposium on InformationTechnology Convergence ISITC 2007 pp 120ndash124 November2007

[2] M Bernas B Płaczek P Porwik and T Pamuła ldquoSegmentationof vehicle detector data for improved k-nearest neighbours-based traffic flow predictionrdquo IET Intelligent Transport Systemsvol 9 no 3 pp 264ndash274 2014

[3] I Ahmad R M Noor I Ali M Imran and A VasilakosldquoCharacterizing the role of vehicular cloud computing in roadtrafficmanagementrdquo International Journal of Distributed SensorNetworks vol 13 no 5 2017

[4] B Płaczek ldquoA self-organizing system for urban traffic controlbased on predictive interval microscopic modelrdquo EngineeringApplications of Artificial Intelligence vol 34 pp 75ndash84 2014

[5] M Karpinski A Senart and V Cahill ldquoSensor networks forsmart roadsrdquo in Proceedings of the 4th Annual IEEE Interna-tional Conference on Pervasive Computing and CommunicationsWorkshops (PerCom rsquo06) pp 310ndash314 IEEE Pisa Italy March2006

[6] G Chatzimilioudis A Konstantinidis C Laoudias and DZeinalipour-Yazti ldquoCrowdsourcing with smartphonesrdquo IEEEInternet Computing vol 16 no 5 pp 36ndash44 2012

[7] R Prabha and M G Kabadi ldquoKNODET A Framework toMine GPS Data for Intelligent Transportation Systems at TrafficSignalsrdquo in Proceedings of the 2017 International Conference onRecent Advances in Electronics and Communication Technology(ICRAECT) pp 85ndash89 Bangalore India March 2017

[8] Y Ma L Zhou Z Gu Y Song and B Wang ldquoChannel Accessand Power Control for Mobile Crowdsourcing in Device-to-DeviceUnderlaidCellularNetworksrdquoWireless Communicationsand Mobile Computing vol 2018 Article ID 7192840 13 pages2018

[9] X Zhang Z Yang W Sun et al ldquoIncentives for mobile crowdsensing A surveyrdquo IEEE Communications Surveys amp Tutorialsvol 18 no 1 pp 54ndash67 2016

[10] N D Lane E Miluzzo H Lu D Peebles T Choudhury andA T Campbell ldquoA survey of mobile phone sensingrdquo IEEECommunications Magazine vol 48 no 9 pp 140ndash150 2010

[11] W Z Khan Y Xiang M Y Aalsalem and Q Arshad ldquoMobilephone sensing systems a surveyrdquo IEEE Communications Sur-veys amp Tutorials vol 15 no 1 pp 402ndash427 2013

[12] R K Ganti F Ye and H Lei ldquoMobile crowdsensing currentstate and future challengesrdquo IEEE Communications Magazinevol 49 no 11 pp 32ndash39 2011

[13] A T Campbell S B Eisenman N D Lane et al ldquoThe rise ofpeople-centric sensingrdquo IEEE Internet Computing vol 12 no 4pp 12ndash21 2008

[14] N Maisonneuve M Stevens M E Niessen and L SteelsldquoNoiseTube Measuring and mapping noise pollution withmobile phonesrdquo Information Technologies in EnvironmentalEngineering pp 215ndash228 2009

[15] C Costa C Laoudias D Zeinalipour-Yazti and D GunopulosldquoSmartTrace Finding similar trajectories in smartphone net-works without disclosing the tracesrdquo in Proceedings of the 2011IEEE 27th International Conference on Data Engineering ICDE2011 pp 1288ndash1291 April 2011

[16] J Gomez J C Torrado and G Montoro ldquoUsing Smartphonesto Assist People withDown Syndrome inTheir Labour Trainingand Integration A Case Studyrdquo Wireless Communications andMobile Computing vol 2017 Article ID 5062371 15 pages 2017

[17] CWu Z Yang and Y Liu ldquoSmartphones based crowdsourcingfor indoor localizationrdquo IEEE Transactions on Mobile Comput-ing vol 14 no 2 pp 444ndash457 2015

[18] S Matyas C Matyas C Schlieder P Kiefer H Mitarai andM Kamata ldquoDesigning location-based mobile games witha purpose Collecting geospatial data with cityexplorerrdquo inProceedings of the 2008 International Conference on Advancesin Computer Entertainment Technology ACE 2008 pp 244ndash247December 2008

[19] H Aly A Basalamah and M Youssef ldquoRobust and ubiquitoussmartphone-based lane detectionrdquo Pervasive and Mobile Com-puting vol 26 pp 35ndash56 2016

[20] E Koukoumidis L-S Peh and M R Martonosi ldquoSignalGuruleveraging mobile phones for collaborative traffic signal sched-ule advisoryrdquo in Proceedings of the 9th International Conference

12 Wireless Communications and Mobile Computing

on Mobile Systems Applications and Services pp 127ndash140 July2011

[21] A Thiagarajan L Ravindranath K LaCurts et al ldquoVTrackaccurate energy-aware road traffic delay estimation usingmobile phonesrdquo in Proceedings of the 7th ACM Conference onEmbedded Networked Sensor Systems (SenSys rsquo09) pp 85ndash98November 2009

[22] MWon S Zhang and SH Son ldquoWiTraffic Low-cost and non-intrusive traffic monitoring system using WiFirdquo in Proceedingsof the 26th International Conference on Computer Communica-tions and Networks ICCCN 2017 pp 1ndash9 IEEE August 2017

[23] MHaferkampMAl-Askary DDorn et al ldquoRadio-based Traf-fic Flow Detection and Vehicle Classification for Future SmartCitiesrdquo in 2017 IEEE 85thVehicular TechnologyConference (VTCSpring) pp 1ndash5 Sydney NSW Australia 2017

[24] G Horvat D Sostaric and D Zagar ldquoUsing radio irregularityfor vehicle detection in adaptive roadway lightingrdquo in Proceed-ings of the 35th International Convention on Information andCommunication Technology Electronics and MicroelectronicsMIPRO 2012 pp 748ndash753 IEEE May 2012

[25] S Roy R Sen S Kulkarni P Kulkarni B Raman and L KSingh ldquoWireless across road RF based road traffic congestiondetectionrdquo in Proceedings of the 2011 Third International Con-ference on Communication Systems and Networks (COMSNETS2011) pp 1ndash6 IEEE January 2011

[26] N Kassem A E Kosba and M Youssef ldquoRF-based vehicledetection and speed estimationrdquo in 2012 IEEE 75th VehicularTechnology Conference (VTC Spring) pp 1ndash5 IEEE

[27] X Li and J Wu ldquoA new method and verification of vehiclesdetection based on RSSI variationrdquo in 2016 10th InternationalConference on Sensing Technology (ICST) pp 1ndash6 IEEE

[28] P Mestre R Guedes P Couto J Matias J C Fernandes andC Serodio ldquoVehicle Detection for Outdoor Car Parks usingIEEE802154rdquo Lecture Notes in Engineering and ComputerScience Newswood Limited ndash IAENG 2013

[29] Apple Inc Getting Started with iBeacon Tech Rep 10 June2014

[30] A Lindemann B Schnor J Sohre and P Vogel ldquoIndoorpositioning A comparison of WiFi and Bluetooth Low Energyfor region monitoringrdquo in Proceedings of the International JointConference on Biomedical Engineering Systems and TechnologiesVolume 5 HEALTHINF pp 314ndash321 Rome Italy February2016

[31] VMartsenyuk KWarwas K Augustynek et al ldquoOnmultivari-ate method of qualitative analysis of Hodgkin-Huxley modelwith decision tree inductionrdquo in Proceedings of the 2016 16thInternational Conference on Control Automation and Systems(ICCAS) pp 489ndash494 Gyeongju South Korea October 2016

[32] M Bernas B Płaczek and W Korski ldquoWireless Networkwith Bluetooth Low Energy Beacons for Vehicle Detectionand Classificationrdquo in CN 2018 Computer Networks P GajM Sawicki G Suchacka and A Kwiecien Eds vol 860 ofCommunications inComputer and Information Science pp 429ndash444 Springer 2018

[33] MWozniak M Grana and E Corchado ldquoA survey of multipleclassifier systems as hybrid systemsrdquo Information Fusion vol 16no 1 pp 3ndash17 2014

[34] G Marcialis and F Roli ldquoFusion of face recognition algo-rithms for video-based surveillance systemsrdquo in MultisensorSurveillance Systems The Fusion Perspective G L Foresti CRegazzoni and P Varshney Eds pp 235ndash250 2003

[35] R Polikar ldquoEnsemble learningrdquo Scholarpedia vol 3 no 12article 2776 2008

[36] G Brown J Wyatt R Harris and X Yao ldquoDiversity creationmethods a survey and categorisationrdquo Information Fusion vol6 no 1 pp 5ndash20 2005

[37] M Bernas and B Płaczek ldquoFully connected neural networksensemble with signal strength clustering for indoor localizationinwireless sensor networksrdquo International Journal ofDistributedSensor Networks vol 2015 Article ID 403242 2015

[38] M Lewandowski T Orczyk and B Płaczek ldquoHuman activitydetection based on the iBeacon technologyrdquo Journal of MedicalInformatics Technologies vol 25 2016

[39] H-G Beyer and H-P Schwefel ldquoEvolution strategiesndashA com-prehensive introductionrdquo Natural Computing vol 1 no 1 pp3ndash52 2002

[40] M R Berthold N Cebron F Dill et al ldquoKNIMETheKonstanzInformation Minerrdquo in Data Analysis Machine Learning andApplications Studies inClassificationDataAnalysis andKnowl-edge Organization C Preisach H Burkhardt L Schmidt-Thieme and R Decker Eds Springer Berlin Germany

[41] B Scholkopf A J Smola R C Williamson and P L BartlettldquoNew support vector algorithmsrdquo Neural Computation vol 12no 5 pp 1207ndash1245 2000

[42] L Breiman ldquoRandom forestsrdquoMachine Learning vol 45 no 1pp 5ndash32 2001

[43] D F Specht ldquoProbabilistic neural networksrdquo Neural Networksvol 3 no 1 pp 109ndash118 1990

[44] D W Aha D Kibler and M K Albert ldquoInstance-BasedLearning Algorithmsrdquo Machine Learning vol 6 no 1 pp 37ndash66 1991

[45] N C Smeeton ldquoEarly History of the Kappa Statisticrdquo Biomet-rics vol 41 no 3 article 795 1985

International Journal of

AerospaceEngineeringHindawiwwwhindawicom Volume 2018

RoboticsJournal of

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Active and Passive Electronic Components

VLSI Design

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Shock and Vibration

Hindawiwwwhindawicom Volume 2018

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawiwwwhindawicom

Volume 2018

Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom

The Scientific World Journal

Volume 2018

Control Scienceand Engineering

Journal of

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom

Journal ofEngineeringVolume 2018

SensorsJournal of

Hindawiwwwhindawicom Volume 2018

International Journal of

RotatingMachinery

Hindawiwwwhindawicom Volume 2018

Modelling ampSimulationin EngineeringHindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Navigation and Observation

International Journal of

Hindawi

wwwhindawicom Volume 2018

Advances in

Multimedia

Submit your manuscripts atwwwhindawicom

Page 8: Road Traffic Monitoring System Based on Mobile …downloads.hindawi.com/journals/wcmc/2018/3251598.pdfIt should be noted that the intro-duced system structure, which includes BLE beacons

8 Wireless Communications and Mobile Computing

070

075

080

085

090

095

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20number of decision trees

Vehicle classification accuracy

Figure 6 Accuracy of random forest algorithm for different numberof decision trees

045

055

065

075

085

095

1 2 3 4 5 6Window size [s]

Vehicle classification accuracy

Random ForestKNN

Figure 7 Impact of window size parameter on accuracy of RF andKNN algorithms

of decision trees It can be observed in these results that theaccuracy does not change significantly for the number ofdecision trees above 5 However the accuracy achieved forthe tree number between 6 and 9 was slightly lower than forthe RF with 10 trees A little decrease of the accuracy wasalso observed for the tree number above 10Therefore duringexperiments described later in this section the number ofdecision trees was set to 10 It should be also noted that thecomplexity of the algorithm increases when using a larger setof the decision trees

The impact of the window size on vehicle classificationaccuracy was also examined during the preliminary exper-iments The window size was changed from 1 to 6 secondswith steps of 1 second As shown in Figure 7 for RF andKNN algorithms the best results were obtained when usingthe window size of 3 seconds In case of larger windows theclassification accuracy decreases because the data registeredfor multiple vehicles are aggregated in one window Similarresults were also observed for SVM and PNN algorithmsThus the 3-second window was used in further experiments

088

089

090

091

092

093

Noattributeremoved

Minimum Maximum Average Standarddeviation

Median Framecount

Difference Pearsonscorrelationcoefficient

Removed attribute

Vehicle classification accuracy

Figure 8 Impact of attribute selection on accuracy of RF algorithm

At the next step the most effective set of attributeswas selected with use of the backward elimination methodResults of the elimination for the RF algorithm are presentedin Figure 8 At the beginning the classification accuracy wastested using full dataset with 8 aggregates The result of thistest is shown by the leftmost bar in Figure 8 Next tests wereperformed for the 8 datasets that were created by removingparticular aggregates (attributes) As shown in Figure 8an improvement of the vehicle classification accuracy wasachieved after deletion of the ldquodifferencerdquo attribute (ie thedifference between maximum and minimum) Thus thereduced dataset includes 7 aggregates minimum maximummean standard deviation median Pearson correlation coef-ficient and number of received frames Further eliminationdid not improve the results It was verified that the deletionof the ldquodifferencerdquo attribute is beneficial for all consideredclassification algorithms

Table 1 shows the vehicle detection and classificationaccuracy obtained for the basic approach which takes intoaccount the signal strength measured by a single device[25] (in one reference position) These results were obtainedafter the above-discussed initial search of the best algorithmparameters As it was already mentioned in previous sectionin case of the vehicle classification task four classes ofevents are considered empty road presence of personal carsemitruck and truck For the vehicle detection problem twoclasses are taken into account empty road and presenceof a vehicle The accuracy (ACC) was calculated as overallaccuracy using the following formula

ACC =sum

ni=1 CiD

(1)

where n is number of classes Ci is number of items (events)in the test dataset that are correctly assigned to ith class (eventtype) and D is number of items in test dataset

It should be also noted that the results in Table 1 arepresented for the two classification algorithms that providethe best accuracy These results firmly show that the most

Wireless Communications and Mobile Computing 9

Table 1 Accuracy of vehicle detection and classification based on data collected in one reference position

Reference position Vehicle classification accuracy Vehicle detection accuracyKNN RF KNN RF

1 0788 0817 08486 08642 0702 0699 07311 08013 0725 0804 07807 08594 0822 0861 08982 0932

Table 2 Accuracy of vehicle classification based on data collected in four reference positions

Window size [s]Classification algorithm

RF KNN PNN SVMACC CK ACC CK ACC CK ACC CK

2 0885 0801 0619 0287 0533 0099 0525 00003 0922 0865 0809 0658 0684 0403 0561 00894 0914 0853 0773 0582 0802 0639 0734 05335 0843 0729 0794 0630 0629 0286 0538 00366 0799 0651 0747 0549 0728 0512 0559 0088

accurate vehicle classification and detection was possiblewhen the mobile device is placed opposite the beacons loca-tion (in reference position 4)The results confirmobservationthat noise in RSSI readings increases with the distance frombeacons to mobile device It should be also noted that thenumber of RSSI samples that are collected when a vehicleis present between beacons and mobile device decreaseswith the speed of the vehicle As a result lower accuracyis observed for higher speed of vehicles In the consideredtest site the vehicles were slowing down when passingthe reference position 1 since this position was close to acrossroadThus the accuracy obtained for reference position1 is higher than for reference positions 2 and 3

In further tests the other approachwas considered whichis based on application of multiple receivers and one classifier[22 23] According to this approach the vehicles wererecognized by single classifier using the dataset collectedin four reference positions Results of these experimentsare shown in Table 2 The classification accuracy (ACC)and Cohenrsquos kappa [45] (CK) is compared in Table 2 forall considered classification algorithms and various sizes ofthe sliding window When comparing the results in Table 2with those in Table 1 it can be observed that the RSSIdata collected by multiple devices in several locations alongthe road enable more accurate vehicle classification Similarexperiments were also conducted for the vehicle detectiontask and the accuracy of 0935 was achieved

The results in Table 2 firmly show that size of the slidingwindow has a significant impact on the accuracy of vehicledetection and classification Passing vehicles cause a dropin RSSI level This drop is longer for trucks and shorter forpersonal cars In order to correctly recognize the vehicle thesliding window has to cover the time when RSSI values arereduced If the sliding window is to narrow the lower RSSIvaluesmay be registered in entirewindow for different vehicleclasses and thus the classes cannot be correctly recognizedIf single classifier is used a wider window is also helpful

because the drop of RSSI is shifted in time for differentreference locations However in case of an excessive windowsize two successive vehicles can be captured in one windowwhich results in decreased accuracy of the detection andclassification The best result results were obtained by usingthe random forest classifier with window size of 3 seconds

The next step of the research was aimed at increasingthe accuracy of vehicle detection by using the proposedclassifier ensemble in combination with majority voting asdescribed in Section 3 It should be noted that the proposedmethod was used with time step of 1 second and d max =1 meter During the tests of the ensemble different rangesof individual member classifiers were taken into account(see Table 3) The input data of individual classifiers wereobtained not only from particular reference positions (egClassifier 1 in Ensemble no 1) but also from a connection ofthe neighboring positions (eg Classifier 1 in Ensemble no3) When analyzing the results presented in Table 3 it canbe observed that the highest accuracy was achieved for theensembles of the random forest classifiersThe best ensemble(no 5) combines the classifiers that are fed with data fromtwo neighboring reference positions (Classifiers 1-3) with theclassifier created for reference position 4 (Classifier 4) andthe classifier which utilizes the entire dataset (Classifier 5)Classifier 4 with range [4 4] was included in the ensembleas it provides the best accuracy when using data from singlereference position The high accuracy was also obtained forEnsembles no 2 and 6 Results of these ensembles are onlyslightly worse than those for Ensemble no 5 This fact showsthat the proposed approach achieves high vehicle classifica-tion and detection accuracy by combining local classifiers(that utilize data from two neighboring reference positionsor single reference position) with the global classifier (whichmakes decisions based on data collected in all referencepositions)

It was noted that the random forest algorithm wasabout 85 more effective than KNN The proposed method

10 Wireless Communications and Mobile Computing

Table 3 Accuracy of vehicle detection and classification with use of the proposed classifier ensemble

Ensemble no Classifier range Vehicle classification accuracy Vehicle detection accuracyClas 1 Clas 2 Clas 3 Clas 4 Clas 5 KNN RF KNN RF

1 [1 1] [2 2] [3 3] [4 4] - 0862 0890 0906 09562 [1 1] [2 2] [3 3] [4 4] [1 4] 0862 0935 0898 09613 [1 2] [2 3] [3 4] - - 0799 0922 0854 09634 [1 2] [2 3] [3 4] [4 4] - 0833 0922 0898 09695 [1 2] [2 3] [3 4] [4 4] [1 4] 0846 0943 0898 09776 [1 2] [2 3] [3 4] - [1 4] 0825 0940 0854 09697 [1 3] [2 4] - - - 0781 0911 0752 09378 [1 3] [2 4] [4 4] 0836 0922 0898 09589 [1 3] [2 4] [4 4] [1 4] 0846 0932 0898 096610 [4 4] [1 4] 0846 0924 0828 0935

070

075

080

085

090

095

100

RFensemble

no 2

RFensemble

no5

RFensemble

no6

RFsingle

classifier

KNNensemble

no 2

KNNensemble

no 5

KNNensemble

no 6

KNNsingle

classifier

Vehicle detection accuracy

Figure 9 Comparison of vehicle detection accuracy for classifierensembles and for single classifiers

achieves the accuracy above 97 for vehicle detection taskand above 94 in case of the vehicle classification taskIt means that the introduced classifier ensemble providesbetter results than the state-of-the-art methods that utilizeindividual classifiers (see Tables 1 and 2)

Results obtained for the best classifier ensembles and forthe individual (single) classifiers are compared in Figures9 and 10 The box plots show minimum first quartilemedian third quartile and maximum of the accuracy valuesfor 30 tests For each test different training and testingdatasets were selected from the measurement data In theseresults significant differences of the accuracy are visible whencomparing the single classifiers with their ensemble counter-parts Similarly the accuracy differences are significant whencomparing the RF classifiers with KNN classifiers It shouldbe also noted that the accuracies achieved by the best RFensembles do not differ significantly Thus selection amongthese ensembles should be considered as a tuning of theproposed method

The higher accuracy of RF ensemble can be explainedby the fact that the RF algorithm has several features whichenable effective training of the classifier According to thisalgorithm all decision trees in the forest are created by

070

075

080

085

090

095

100

RFensemble

no 2

RFensemble

no5

RFensemble

no6

RFsingle

classifier

KNNensemble

no 2

KNNensemble

no 5

KNNensemble

no 6

KNNsingle

classifier

Vehicle classification accuracy

Figure 10 Comparison of vehicle classification accuracy for classi-fier ensembles and for single classifiers

using randomly selected subsets of the training dataset Therandom selection applies to both the events (rows) and theaggregates (columns) Each decision tree further divides thetraining data into smaller subsets until the subsets are smallor all events in these subsets belong to one class In contrast toRF the other compared algorithms (includingKNN) performthe training procedures with use of the complete trainingdataset

5 Conclusions

The proposed vehicle detection and classification approachuses mobile devices (smartphones) and Bluetooth beaconsfor road traffic monitoring It allows detecting three classesof vehicles by analyzing strength of radio signal received fromBLE beacons that are installed at different heights by the roadThis approach is suitable for crowd sourcing applicationsaimed at reducing travel time congestion and emissionsAdvantages of the introduced method were demonstratedduring experimental evaluation in real-traffic conditionsExtensive experiments were conducted to test different clas-sification approaches and data aggregation methods In com-parison with state-of-the-art RSSI-based vehicle detection

Wireless Communications and Mobile Computing 11

methods higher accuracy was achieved by introducing adedicated ensemble of random forest classifiers withmajorityvoting

The presented solution can be extended to several bea-cons installed along the road to obtain information concern-ing vehicle velocity and direction Another interesting topicis related to data preprocessing on mobile devices in order toreduce the communication effort Finally additional studieswill be necessary to introduce methods that can be usedto activate the Bluetooth modules and beacons when it isnecessary and reduce the energy consumption

Data Availability

The data used to support the findings of this study areincluded within the supplementary information file

Conflicts of Interest

The authors declare that there are no conflicts of interestregarding the publication of this paper

Acknowledgments

The research was supported by the National Centre forResearch and Development (NCBR) [Grant no LIDER180064L-715NCBR2016]

Supplementary Materials

The supplementary material file (csv) includes a raw RSSIdataset where ldquoidrdquo denotes number of measurement ldquoNoderdquois an identifier of mobile device (receiver) ldquoiBeaconrdquo is anidentifier of beacon (transmitter) ldquoRSSIrdquo is the measuredRSSI value ldquoClassrdquo describes type of observed event (Eempty road C personal car D semitruck and T truck) andldquoFlagrdquo indicates the measurements for which the events wererecorded (symbol ldquo+rdquo) (Supplementary Materials)

References

[1] H Chang Y Wang and P A Ioannou ldquoThe use of micro-scopic traffic simulation model for traffic control systemsrdquo inProceedings of the 2007 International Symposium on InformationTechnology Convergence ISITC 2007 pp 120ndash124 November2007

[2] M Bernas B Płaczek P Porwik and T Pamuła ldquoSegmentationof vehicle detector data for improved k-nearest neighbours-based traffic flow predictionrdquo IET Intelligent Transport Systemsvol 9 no 3 pp 264ndash274 2014

[3] I Ahmad R M Noor I Ali M Imran and A VasilakosldquoCharacterizing the role of vehicular cloud computing in roadtrafficmanagementrdquo International Journal of Distributed SensorNetworks vol 13 no 5 2017

[4] B Płaczek ldquoA self-organizing system for urban traffic controlbased on predictive interval microscopic modelrdquo EngineeringApplications of Artificial Intelligence vol 34 pp 75ndash84 2014

[5] M Karpinski A Senart and V Cahill ldquoSensor networks forsmart roadsrdquo in Proceedings of the 4th Annual IEEE Interna-tional Conference on Pervasive Computing and CommunicationsWorkshops (PerCom rsquo06) pp 310ndash314 IEEE Pisa Italy March2006

[6] G Chatzimilioudis A Konstantinidis C Laoudias and DZeinalipour-Yazti ldquoCrowdsourcing with smartphonesrdquo IEEEInternet Computing vol 16 no 5 pp 36ndash44 2012

[7] R Prabha and M G Kabadi ldquoKNODET A Framework toMine GPS Data for Intelligent Transportation Systems at TrafficSignalsrdquo in Proceedings of the 2017 International Conference onRecent Advances in Electronics and Communication Technology(ICRAECT) pp 85ndash89 Bangalore India March 2017

[8] Y Ma L Zhou Z Gu Y Song and B Wang ldquoChannel Accessand Power Control for Mobile Crowdsourcing in Device-to-DeviceUnderlaidCellularNetworksrdquoWireless Communicationsand Mobile Computing vol 2018 Article ID 7192840 13 pages2018

[9] X Zhang Z Yang W Sun et al ldquoIncentives for mobile crowdsensing A surveyrdquo IEEE Communications Surveys amp Tutorialsvol 18 no 1 pp 54ndash67 2016

[10] N D Lane E Miluzzo H Lu D Peebles T Choudhury andA T Campbell ldquoA survey of mobile phone sensingrdquo IEEECommunications Magazine vol 48 no 9 pp 140ndash150 2010

[11] W Z Khan Y Xiang M Y Aalsalem and Q Arshad ldquoMobilephone sensing systems a surveyrdquo IEEE Communications Sur-veys amp Tutorials vol 15 no 1 pp 402ndash427 2013

[12] R K Ganti F Ye and H Lei ldquoMobile crowdsensing currentstate and future challengesrdquo IEEE Communications Magazinevol 49 no 11 pp 32ndash39 2011

[13] A T Campbell S B Eisenman N D Lane et al ldquoThe rise ofpeople-centric sensingrdquo IEEE Internet Computing vol 12 no 4pp 12ndash21 2008

[14] N Maisonneuve M Stevens M E Niessen and L SteelsldquoNoiseTube Measuring and mapping noise pollution withmobile phonesrdquo Information Technologies in EnvironmentalEngineering pp 215ndash228 2009

[15] C Costa C Laoudias D Zeinalipour-Yazti and D GunopulosldquoSmartTrace Finding similar trajectories in smartphone net-works without disclosing the tracesrdquo in Proceedings of the 2011IEEE 27th International Conference on Data Engineering ICDE2011 pp 1288ndash1291 April 2011

[16] J Gomez J C Torrado and G Montoro ldquoUsing Smartphonesto Assist People withDown Syndrome inTheir Labour Trainingand Integration A Case Studyrdquo Wireless Communications andMobile Computing vol 2017 Article ID 5062371 15 pages 2017

[17] CWu Z Yang and Y Liu ldquoSmartphones based crowdsourcingfor indoor localizationrdquo IEEE Transactions on Mobile Comput-ing vol 14 no 2 pp 444ndash457 2015

[18] S Matyas C Matyas C Schlieder P Kiefer H Mitarai andM Kamata ldquoDesigning location-based mobile games witha purpose Collecting geospatial data with cityexplorerrdquo inProceedings of the 2008 International Conference on Advancesin Computer Entertainment Technology ACE 2008 pp 244ndash247December 2008

[19] H Aly A Basalamah and M Youssef ldquoRobust and ubiquitoussmartphone-based lane detectionrdquo Pervasive and Mobile Com-puting vol 26 pp 35ndash56 2016

[20] E Koukoumidis L-S Peh and M R Martonosi ldquoSignalGuruleveraging mobile phones for collaborative traffic signal sched-ule advisoryrdquo in Proceedings of the 9th International Conference

12 Wireless Communications and Mobile Computing

on Mobile Systems Applications and Services pp 127ndash140 July2011

[21] A Thiagarajan L Ravindranath K LaCurts et al ldquoVTrackaccurate energy-aware road traffic delay estimation usingmobile phonesrdquo in Proceedings of the 7th ACM Conference onEmbedded Networked Sensor Systems (SenSys rsquo09) pp 85ndash98November 2009

[22] MWon S Zhang and SH Son ldquoWiTraffic Low-cost and non-intrusive traffic monitoring system using WiFirdquo in Proceedingsof the 26th International Conference on Computer Communica-tions and Networks ICCCN 2017 pp 1ndash9 IEEE August 2017

[23] MHaferkampMAl-Askary DDorn et al ldquoRadio-based Traf-fic Flow Detection and Vehicle Classification for Future SmartCitiesrdquo in 2017 IEEE 85thVehicular TechnologyConference (VTCSpring) pp 1ndash5 Sydney NSW Australia 2017

[24] G Horvat D Sostaric and D Zagar ldquoUsing radio irregularityfor vehicle detection in adaptive roadway lightingrdquo in Proceed-ings of the 35th International Convention on Information andCommunication Technology Electronics and MicroelectronicsMIPRO 2012 pp 748ndash753 IEEE May 2012

[25] S Roy R Sen S Kulkarni P Kulkarni B Raman and L KSingh ldquoWireless across road RF based road traffic congestiondetectionrdquo in Proceedings of the 2011 Third International Con-ference on Communication Systems and Networks (COMSNETS2011) pp 1ndash6 IEEE January 2011

[26] N Kassem A E Kosba and M Youssef ldquoRF-based vehicledetection and speed estimationrdquo in 2012 IEEE 75th VehicularTechnology Conference (VTC Spring) pp 1ndash5 IEEE

[27] X Li and J Wu ldquoA new method and verification of vehiclesdetection based on RSSI variationrdquo in 2016 10th InternationalConference on Sensing Technology (ICST) pp 1ndash6 IEEE

[28] P Mestre R Guedes P Couto J Matias J C Fernandes andC Serodio ldquoVehicle Detection for Outdoor Car Parks usingIEEE802154rdquo Lecture Notes in Engineering and ComputerScience Newswood Limited ndash IAENG 2013

[29] Apple Inc Getting Started with iBeacon Tech Rep 10 June2014

[30] A Lindemann B Schnor J Sohre and P Vogel ldquoIndoorpositioning A comparison of WiFi and Bluetooth Low Energyfor region monitoringrdquo in Proceedings of the International JointConference on Biomedical Engineering Systems and TechnologiesVolume 5 HEALTHINF pp 314ndash321 Rome Italy February2016

[31] VMartsenyuk KWarwas K Augustynek et al ldquoOnmultivari-ate method of qualitative analysis of Hodgkin-Huxley modelwith decision tree inductionrdquo in Proceedings of the 2016 16thInternational Conference on Control Automation and Systems(ICCAS) pp 489ndash494 Gyeongju South Korea October 2016

[32] M Bernas B Płaczek and W Korski ldquoWireless Networkwith Bluetooth Low Energy Beacons for Vehicle Detectionand Classificationrdquo in CN 2018 Computer Networks P GajM Sawicki G Suchacka and A Kwiecien Eds vol 860 ofCommunications inComputer and Information Science pp 429ndash444 Springer 2018

[33] MWozniak M Grana and E Corchado ldquoA survey of multipleclassifier systems as hybrid systemsrdquo Information Fusion vol 16no 1 pp 3ndash17 2014

[34] G Marcialis and F Roli ldquoFusion of face recognition algo-rithms for video-based surveillance systemsrdquo in MultisensorSurveillance Systems The Fusion Perspective G L Foresti CRegazzoni and P Varshney Eds pp 235ndash250 2003

[35] R Polikar ldquoEnsemble learningrdquo Scholarpedia vol 3 no 12article 2776 2008

[36] G Brown J Wyatt R Harris and X Yao ldquoDiversity creationmethods a survey and categorisationrdquo Information Fusion vol6 no 1 pp 5ndash20 2005

[37] M Bernas and B Płaczek ldquoFully connected neural networksensemble with signal strength clustering for indoor localizationinwireless sensor networksrdquo International Journal ofDistributedSensor Networks vol 2015 Article ID 403242 2015

[38] M Lewandowski T Orczyk and B Płaczek ldquoHuman activitydetection based on the iBeacon technologyrdquo Journal of MedicalInformatics Technologies vol 25 2016

[39] H-G Beyer and H-P Schwefel ldquoEvolution strategiesndashA com-prehensive introductionrdquo Natural Computing vol 1 no 1 pp3ndash52 2002

[40] M R Berthold N Cebron F Dill et al ldquoKNIMETheKonstanzInformation Minerrdquo in Data Analysis Machine Learning andApplications Studies inClassificationDataAnalysis andKnowl-edge Organization C Preisach H Burkhardt L Schmidt-Thieme and R Decker Eds Springer Berlin Germany

[41] B Scholkopf A J Smola R C Williamson and P L BartlettldquoNew support vector algorithmsrdquo Neural Computation vol 12no 5 pp 1207ndash1245 2000

[42] L Breiman ldquoRandom forestsrdquoMachine Learning vol 45 no 1pp 5ndash32 2001

[43] D F Specht ldquoProbabilistic neural networksrdquo Neural Networksvol 3 no 1 pp 109ndash118 1990

[44] D W Aha D Kibler and M K Albert ldquoInstance-BasedLearning Algorithmsrdquo Machine Learning vol 6 no 1 pp 37ndash66 1991

[45] N C Smeeton ldquoEarly History of the Kappa Statisticrdquo Biomet-rics vol 41 no 3 article 795 1985

International Journal of

AerospaceEngineeringHindawiwwwhindawicom Volume 2018

RoboticsJournal of

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Active and Passive Electronic Components

VLSI Design

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Shock and Vibration

Hindawiwwwhindawicom Volume 2018

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawiwwwhindawicom

Volume 2018

Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom

The Scientific World Journal

Volume 2018

Control Scienceand Engineering

Journal of

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom

Journal ofEngineeringVolume 2018

SensorsJournal of

Hindawiwwwhindawicom Volume 2018

International Journal of

RotatingMachinery

Hindawiwwwhindawicom Volume 2018

Modelling ampSimulationin EngineeringHindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Navigation and Observation

International Journal of

Hindawi

wwwhindawicom Volume 2018

Advances in

Multimedia

Submit your manuscripts atwwwhindawicom

Page 9: Road Traffic Monitoring System Based on Mobile …downloads.hindawi.com/journals/wcmc/2018/3251598.pdfIt should be noted that the intro-duced system structure, which includes BLE beacons

Wireless Communications and Mobile Computing 9

Table 1 Accuracy of vehicle detection and classification based on data collected in one reference position

Reference position Vehicle classification accuracy Vehicle detection accuracyKNN RF KNN RF

1 0788 0817 08486 08642 0702 0699 07311 08013 0725 0804 07807 08594 0822 0861 08982 0932

Table 2 Accuracy of vehicle classification based on data collected in four reference positions

Window size [s]Classification algorithm

RF KNN PNN SVMACC CK ACC CK ACC CK ACC CK

2 0885 0801 0619 0287 0533 0099 0525 00003 0922 0865 0809 0658 0684 0403 0561 00894 0914 0853 0773 0582 0802 0639 0734 05335 0843 0729 0794 0630 0629 0286 0538 00366 0799 0651 0747 0549 0728 0512 0559 0088

accurate vehicle classification and detection was possiblewhen the mobile device is placed opposite the beacons loca-tion (in reference position 4)The results confirmobservationthat noise in RSSI readings increases with the distance frombeacons to mobile device It should be also noted that thenumber of RSSI samples that are collected when a vehicleis present between beacons and mobile device decreaseswith the speed of the vehicle As a result lower accuracyis observed for higher speed of vehicles In the consideredtest site the vehicles were slowing down when passingthe reference position 1 since this position was close to acrossroadThus the accuracy obtained for reference position1 is higher than for reference positions 2 and 3

In further tests the other approachwas considered whichis based on application of multiple receivers and one classifier[22 23] According to this approach the vehicles wererecognized by single classifier using the dataset collectedin four reference positions Results of these experimentsare shown in Table 2 The classification accuracy (ACC)and Cohenrsquos kappa [45] (CK) is compared in Table 2 forall considered classification algorithms and various sizes ofthe sliding window When comparing the results in Table 2with those in Table 1 it can be observed that the RSSIdata collected by multiple devices in several locations alongthe road enable more accurate vehicle classification Similarexperiments were also conducted for the vehicle detectiontask and the accuracy of 0935 was achieved

The results in Table 2 firmly show that size of the slidingwindow has a significant impact on the accuracy of vehicledetection and classification Passing vehicles cause a dropin RSSI level This drop is longer for trucks and shorter forpersonal cars In order to correctly recognize the vehicle thesliding window has to cover the time when RSSI values arereduced If the sliding window is to narrow the lower RSSIvaluesmay be registered in entirewindow for different vehicleclasses and thus the classes cannot be correctly recognizedIf single classifier is used a wider window is also helpful

because the drop of RSSI is shifted in time for differentreference locations However in case of an excessive windowsize two successive vehicles can be captured in one windowwhich results in decreased accuracy of the detection andclassification The best result results were obtained by usingthe random forest classifier with window size of 3 seconds

The next step of the research was aimed at increasingthe accuracy of vehicle detection by using the proposedclassifier ensemble in combination with majority voting asdescribed in Section 3 It should be noted that the proposedmethod was used with time step of 1 second and d max =1 meter During the tests of the ensemble different rangesof individual member classifiers were taken into account(see Table 3) The input data of individual classifiers wereobtained not only from particular reference positions (egClassifier 1 in Ensemble no 1) but also from a connection ofthe neighboring positions (eg Classifier 1 in Ensemble no3) When analyzing the results presented in Table 3 it canbe observed that the highest accuracy was achieved for theensembles of the random forest classifiersThe best ensemble(no 5) combines the classifiers that are fed with data fromtwo neighboring reference positions (Classifiers 1-3) with theclassifier created for reference position 4 (Classifier 4) andthe classifier which utilizes the entire dataset (Classifier 5)Classifier 4 with range [4 4] was included in the ensembleas it provides the best accuracy when using data from singlereference position The high accuracy was also obtained forEnsembles no 2 and 6 Results of these ensembles are onlyslightly worse than those for Ensemble no 5 This fact showsthat the proposed approach achieves high vehicle classifica-tion and detection accuracy by combining local classifiers(that utilize data from two neighboring reference positionsor single reference position) with the global classifier (whichmakes decisions based on data collected in all referencepositions)

It was noted that the random forest algorithm wasabout 85 more effective than KNN The proposed method

10 Wireless Communications and Mobile Computing

Table 3 Accuracy of vehicle detection and classification with use of the proposed classifier ensemble

Ensemble no Classifier range Vehicle classification accuracy Vehicle detection accuracyClas 1 Clas 2 Clas 3 Clas 4 Clas 5 KNN RF KNN RF

1 [1 1] [2 2] [3 3] [4 4] - 0862 0890 0906 09562 [1 1] [2 2] [3 3] [4 4] [1 4] 0862 0935 0898 09613 [1 2] [2 3] [3 4] - - 0799 0922 0854 09634 [1 2] [2 3] [3 4] [4 4] - 0833 0922 0898 09695 [1 2] [2 3] [3 4] [4 4] [1 4] 0846 0943 0898 09776 [1 2] [2 3] [3 4] - [1 4] 0825 0940 0854 09697 [1 3] [2 4] - - - 0781 0911 0752 09378 [1 3] [2 4] [4 4] 0836 0922 0898 09589 [1 3] [2 4] [4 4] [1 4] 0846 0932 0898 096610 [4 4] [1 4] 0846 0924 0828 0935

070

075

080

085

090

095

100

RFensemble

no 2

RFensemble

no5

RFensemble

no6

RFsingle

classifier

KNNensemble

no 2

KNNensemble

no 5

KNNensemble

no 6

KNNsingle

classifier

Vehicle detection accuracy

Figure 9 Comparison of vehicle detection accuracy for classifierensembles and for single classifiers

achieves the accuracy above 97 for vehicle detection taskand above 94 in case of the vehicle classification taskIt means that the introduced classifier ensemble providesbetter results than the state-of-the-art methods that utilizeindividual classifiers (see Tables 1 and 2)

Results obtained for the best classifier ensembles and forthe individual (single) classifiers are compared in Figures9 and 10 The box plots show minimum first quartilemedian third quartile and maximum of the accuracy valuesfor 30 tests For each test different training and testingdatasets were selected from the measurement data In theseresults significant differences of the accuracy are visible whencomparing the single classifiers with their ensemble counter-parts Similarly the accuracy differences are significant whencomparing the RF classifiers with KNN classifiers It shouldbe also noted that the accuracies achieved by the best RFensembles do not differ significantly Thus selection amongthese ensembles should be considered as a tuning of theproposed method

The higher accuracy of RF ensemble can be explainedby the fact that the RF algorithm has several features whichenable effective training of the classifier According to thisalgorithm all decision trees in the forest are created by

070

075

080

085

090

095

100

RFensemble

no 2

RFensemble

no5

RFensemble

no6

RFsingle

classifier

KNNensemble

no 2

KNNensemble

no 5

KNNensemble

no 6

KNNsingle

classifier

Vehicle classification accuracy

Figure 10 Comparison of vehicle classification accuracy for classi-fier ensembles and for single classifiers

using randomly selected subsets of the training dataset Therandom selection applies to both the events (rows) and theaggregates (columns) Each decision tree further divides thetraining data into smaller subsets until the subsets are smallor all events in these subsets belong to one class In contrast toRF the other compared algorithms (includingKNN) performthe training procedures with use of the complete trainingdataset

5 Conclusions

The proposed vehicle detection and classification approachuses mobile devices (smartphones) and Bluetooth beaconsfor road traffic monitoring It allows detecting three classesof vehicles by analyzing strength of radio signal received fromBLE beacons that are installed at different heights by the roadThis approach is suitable for crowd sourcing applicationsaimed at reducing travel time congestion and emissionsAdvantages of the introduced method were demonstratedduring experimental evaluation in real-traffic conditionsExtensive experiments were conducted to test different clas-sification approaches and data aggregation methods In com-parison with state-of-the-art RSSI-based vehicle detection

Wireless Communications and Mobile Computing 11

methods higher accuracy was achieved by introducing adedicated ensemble of random forest classifiers withmajorityvoting

The presented solution can be extended to several bea-cons installed along the road to obtain information concern-ing vehicle velocity and direction Another interesting topicis related to data preprocessing on mobile devices in order toreduce the communication effort Finally additional studieswill be necessary to introduce methods that can be usedto activate the Bluetooth modules and beacons when it isnecessary and reduce the energy consumption

Data Availability

The data used to support the findings of this study areincluded within the supplementary information file

Conflicts of Interest

The authors declare that there are no conflicts of interestregarding the publication of this paper

Acknowledgments

The research was supported by the National Centre forResearch and Development (NCBR) [Grant no LIDER180064L-715NCBR2016]

Supplementary Materials

The supplementary material file (csv) includes a raw RSSIdataset where ldquoidrdquo denotes number of measurement ldquoNoderdquois an identifier of mobile device (receiver) ldquoiBeaconrdquo is anidentifier of beacon (transmitter) ldquoRSSIrdquo is the measuredRSSI value ldquoClassrdquo describes type of observed event (Eempty road C personal car D semitruck and T truck) andldquoFlagrdquo indicates the measurements for which the events wererecorded (symbol ldquo+rdquo) (Supplementary Materials)

References

[1] H Chang Y Wang and P A Ioannou ldquoThe use of micro-scopic traffic simulation model for traffic control systemsrdquo inProceedings of the 2007 International Symposium on InformationTechnology Convergence ISITC 2007 pp 120ndash124 November2007

[2] M Bernas B Płaczek P Porwik and T Pamuła ldquoSegmentationof vehicle detector data for improved k-nearest neighbours-based traffic flow predictionrdquo IET Intelligent Transport Systemsvol 9 no 3 pp 264ndash274 2014

[3] I Ahmad R M Noor I Ali M Imran and A VasilakosldquoCharacterizing the role of vehicular cloud computing in roadtrafficmanagementrdquo International Journal of Distributed SensorNetworks vol 13 no 5 2017

[4] B Płaczek ldquoA self-organizing system for urban traffic controlbased on predictive interval microscopic modelrdquo EngineeringApplications of Artificial Intelligence vol 34 pp 75ndash84 2014

[5] M Karpinski A Senart and V Cahill ldquoSensor networks forsmart roadsrdquo in Proceedings of the 4th Annual IEEE Interna-tional Conference on Pervasive Computing and CommunicationsWorkshops (PerCom rsquo06) pp 310ndash314 IEEE Pisa Italy March2006

[6] G Chatzimilioudis A Konstantinidis C Laoudias and DZeinalipour-Yazti ldquoCrowdsourcing with smartphonesrdquo IEEEInternet Computing vol 16 no 5 pp 36ndash44 2012

[7] R Prabha and M G Kabadi ldquoKNODET A Framework toMine GPS Data for Intelligent Transportation Systems at TrafficSignalsrdquo in Proceedings of the 2017 International Conference onRecent Advances in Electronics and Communication Technology(ICRAECT) pp 85ndash89 Bangalore India March 2017

[8] Y Ma L Zhou Z Gu Y Song and B Wang ldquoChannel Accessand Power Control for Mobile Crowdsourcing in Device-to-DeviceUnderlaidCellularNetworksrdquoWireless Communicationsand Mobile Computing vol 2018 Article ID 7192840 13 pages2018

[9] X Zhang Z Yang W Sun et al ldquoIncentives for mobile crowdsensing A surveyrdquo IEEE Communications Surveys amp Tutorialsvol 18 no 1 pp 54ndash67 2016

[10] N D Lane E Miluzzo H Lu D Peebles T Choudhury andA T Campbell ldquoA survey of mobile phone sensingrdquo IEEECommunications Magazine vol 48 no 9 pp 140ndash150 2010

[11] W Z Khan Y Xiang M Y Aalsalem and Q Arshad ldquoMobilephone sensing systems a surveyrdquo IEEE Communications Sur-veys amp Tutorials vol 15 no 1 pp 402ndash427 2013

[12] R K Ganti F Ye and H Lei ldquoMobile crowdsensing currentstate and future challengesrdquo IEEE Communications Magazinevol 49 no 11 pp 32ndash39 2011

[13] A T Campbell S B Eisenman N D Lane et al ldquoThe rise ofpeople-centric sensingrdquo IEEE Internet Computing vol 12 no 4pp 12ndash21 2008

[14] N Maisonneuve M Stevens M E Niessen and L SteelsldquoNoiseTube Measuring and mapping noise pollution withmobile phonesrdquo Information Technologies in EnvironmentalEngineering pp 215ndash228 2009

[15] C Costa C Laoudias D Zeinalipour-Yazti and D GunopulosldquoSmartTrace Finding similar trajectories in smartphone net-works without disclosing the tracesrdquo in Proceedings of the 2011IEEE 27th International Conference on Data Engineering ICDE2011 pp 1288ndash1291 April 2011

[16] J Gomez J C Torrado and G Montoro ldquoUsing Smartphonesto Assist People withDown Syndrome inTheir Labour Trainingand Integration A Case Studyrdquo Wireless Communications andMobile Computing vol 2017 Article ID 5062371 15 pages 2017

[17] CWu Z Yang and Y Liu ldquoSmartphones based crowdsourcingfor indoor localizationrdquo IEEE Transactions on Mobile Comput-ing vol 14 no 2 pp 444ndash457 2015

[18] S Matyas C Matyas C Schlieder P Kiefer H Mitarai andM Kamata ldquoDesigning location-based mobile games witha purpose Collecting geospatial data with cityexplorerrdquo inProceedings of the 2008 International Conference on Advancesin Computer Entertainment Technology ACE 2008 pp 244ndash247December 2008

[19] H Aly A Basalamah and M Youssef ldquoRobust and ubiquitoussmartphone-based lane detectionrdquo Pervasive and Mobile Com-puting vol 26 pp 35ndash56 2016

[20] E Koukoumidis L-S Peh and M R Martonosi ldquoSignalGuruleveraging mobile phones for collaborative traffic signal sched-ule advisoryrdquo in Proceedings of the 9th International Conference

12 Wireless Communications and Mobile Computing

on Mobile Systems Applications and Services pp 127ndash140 July2011

[21] A Thiagarajan L Ravindranath K LaCurts et al ldquoVTrackaccurate energy-aware road traffic delay estimation usingmobile phonesrdquo in Proceedings of the 7th ACM Conference onEmbedded Networked Sensor Systems (SenSys rsquo09) pp 85ndash98November 2009

[22] MWon S Zhang and SH Son ldquoWiTraffic Low-cost and non-intrusive traffic monitoring system using WiFirdquo in Proceedingsof the 26th International Conference on Computer Communica-tions and Networks ICCCN 2017 pp 1ndash9 IEEE August 2017

[23] MHaferkampMAl-Askary DDorn et al ldquoRadio-based Traf-fic Flow Detection and Vehicle Classification for Future SmartCitiesrdquo in 2017 IEEE 85thVehicular TechnologyConference (VTCSpring) pp 1ndash5 Sydney NSW Australia 2017

[24] G Horvat D Sostaric and D Zagar ldquoUsing radio irregularityfor vehicle detection in adaptive roadway lightingrdquo in Proceed-ings of the 35th International Convention on Information andCommunication Technology Electronics and MicroelectronicsMIPRO 2012 pp 748ndash753 IEEE May 2012

[25] S Roy R Sen S Kulkarni P Kulkarni B Raman and L KSingh ldquoWireless across road RF based road traffic congestiondetectionrdquo in Proceedings of the 2011 Third International Con-ference on Communication Systems and Networks (COMSNETS2011) pp 1ndash6 IEEE January 2011

[26] N Kassem A E Kosba and M Youssef ldquoRF-based vehicledetection and speed estimationrdquo in 2012 IEEE 75th VehicularTechnology Conference (VTC Spring) pp 1ndash5 IEEE

[27] X Li and J Wu ldquoA new method and verification of vehiclesdetection based on RSSI variationrdquo in 2016 10th InternationalConference on Sensing Technology (ICST) pp 1ndash6 IEEE

[28] P Mestre R Guedes P Couto J Matias J C Fernandes andC Serodio ldquoVehicle Detection for Outdoor Car Parks usingIEEE802154rdquo Lecture Notes in Engineering and ComputerScience Newswood Limited ndash IAENG 2013

[29] Apple Inc Getting Started with iBeacon Tech Rep 10 June2014

[30] A Lindemann B Schnor J Sohre and P Vogel ldquoIndoorpositioning A comparison of WiFi and Bluetooth Low Energyfor region monitoringrdquo in Proceedings of the International JointConference on Biomedical Engineering Systems and TechnologiesVolume 5 HEALTHINF pp 314ndash321 Rome Italy February2016

[31] VMartsenyuk KWarwas K Augustynek et al ldquoOnmultivari-ate method of qualitative analysis of Hodgkin-Huxley modelwith decision tree inductionrdquo in Proceedings of the 2016 16thInternational Conference on Control Automation and Systems(ICCAS) pp 489ndash494 Gyeongju South Korea October 2016

[32] M Bernas B Płaczek and W Korski ldquoWireless Networkwith Bluetooth Low Energy Beacons for Vehicle Detectionand Classificationrdquo in CN 2018 Computer Networks P GajM Sawicki G Suchacka and A Kwiecien Eds vol 860 ofCommunications inComputer and Information Science pp 429ndash444 Springer 2018

[33] MWozniak M Grana and E Corchado ldquoA survey of multipleclassifier systems as hybrid systemsrdquo Information Fusion vol 16no 1 pp 3ndash17 2014

[34] G Marcialis and F Roli ldquoFusion of face recognition algo-rithms for video-based surveillance systemsrdquo in MultisensorSurveillance Systems The Fusion Perspective G L Foresti CRegazzoni and P Varshney Eds pp 235ndash250 2003

[35] R Polikar ldquoEnsemble learningrdquo Scholarpedia vol 3 no 12article 2776 2008

[36] G Brown J Wyatt R Harris and X Yao ldquoDiversity creationmethods a survey and categorisationrdquo Information Fusion vol6 no 1 pp 5ndash20 2005

[37] M Bernas and B Płaczek ldquoFully connected neural networksensemble with signal strength clustering for indoor localizationinwireless sensor networksrdquo International Journal ofDistributedSensor Networks vol 2015 Article ID 403242 2015

[38] M Lewandowski T Orczyk and B Płaczek ldquoHuman activitydetection based on the iBeacon technologyrdquo Journal of MedicalInformatics Technologies vol 25 2016

[39] H-G Beyer and H-P Schwefel ldquoEvolution strategiesndashA com-prehensive introductionrdquo Natural Computing vol 1 no 1 pp3ndash52 2002

[40] M R Berthold N Cebron F Dill et al ldquoKNIMETheKonstanzInformation Minerrdquo in Data Analysis Machine Learning andApplications Studies inClassificationDataAnalysis andKnowl-edge Organization C Preisach H Burkhardt L Schmidt-Thieme and R Decker Eds Springer Berlin Germany

[41] B Scholkopf A J Smola R C Williamson and P L BartlettldquoNew support vector algorithmsrdquo Neural Computation vol 12no 5 pp 1207ndash1245 2000

[42] L Breiman ldquoRandom forestsrdquoMachine Learning vol 45 no 1pp 5ndash32 2001

[43] D F Specht ldquoProbabilistic neural networksrdquo Neural Networksvol 3 no 1 pp 109ndash118 1990

[44] D W Aha D Kibler and M K Albert ldquoInstance-BasedLearning Algorithmsrdquo Machine Learning vol 6 no 1 pp 37ndash66 1991

[45] N C Smeeton ldquoEarly History of the Kappa Statisticrdquo Biomet-rics vol 41 no 3 article 795 1985

International Journal of

AerospaceEngineeringHindawiwwwhindawicom Volume 2018

RoboticsJournal of

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Active and Passive Electronic Components

VLSI Design

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Shock and Vibration

Hindawiwwwhindawicom Volume 2018

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawiwwwhindawicom

Volume 2018

Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom

The Scientific World Journal

Volume 2018

Control Scienceand Engineering

Journal of

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom

Journal ofEngineeringVolume 2018

SensorsJournal of

Hindawiwwwhindawicom Volume 2018

International Journal of

RotatingMachinery

Hindawiwwwhindawicom Volume 2018

Modelling ampSimulationin EngineeringHindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Navigation and Observation

International Journal of

Hindawi

wwwhindawicom Volume 2018

Advances in

Multimedia

Submit your manuscripts atwwwhindawicom

Page 10: Road Traffic Monitoring System Based on Mobile …downloads.hindawi.com/journals/wcmc/2018/3251598.pdfIt should be noted that the intro-duced system structure, which includes BLE beacons

10 Wireless Communications and Mobile Computing

Table 3 Accuracy of vehicle detection and classification with use of the proposed classifier ensemble

Ensemble no Classifier range Vehicle classification accuracy Vehicle detection accuracyClas 1 Clas 2 Clas 3 Clas 4 Clas 5 KNN RF KNN RF

1 [1 1] [2 2] [3 3] [4 4] - 0862 0890 0906 09562 [1 1] [2 2] [3 3] [4 4] [1 4] 0862 0935 0898 09613 [1 2] [2 3] [3 4] - - 0799 0922 0854 09634 [1 2] [2 3] [3 4] [4 4] - 0833 0922 0898 09695 [1 2] [2 3] [3 4] [4 4] [1 4] 0846 0943 0898 09776 [1 2] [2 3] [3 4] - [1 4] 0825 0940 0854 09697 [1 3] [2 4] - - - 0781 0911 0752 09378 [1 3] [2 4] [4 4] 0836 0922 0898 09589 [1 3] [2 4] [4 4] [1 4] 0846 0932 0898 096610 [4 4] [1 4] 0846 0924 0828 0935

070

075

080

085

090

095

100

RFensemble

no 2

RFensemble

no5

RFensemble

no6

RFsingle

classifier

KNNensemble

no 2

KNNensemble

no 5

KNNensemble

no 6

KNNsingle

classifier

Vehicle detection accuracy

Figure 9 Comparison of vehicle detection accuracy for classifierensembles and for single classifiers

achieves the accuracy above 97 for vehicle detection taskand above 94 in case of the vehicle classification taskIt means that the introduced classifier ensemble providesbetter results than the state-of-the-art methods that utilizeindividual classifiers (see Tables 1 and 2)

Results obtained for the best classifier ensembles and forthe individual (single) classifiers are compared in Figures9 and 10 The box plots show minimum first quartilemedian third quartile and maximum of the accuracy valuesfor 30 tests For each test different training and testingdatasets were selected from the measurement data In theseresults significant differences of the accuracy are visible whencomparing the single classifiers with their ensemble counter-parts Similarly the accuracy differences are significant whencomparing the RF classifiers with KNN classifiers It shouldbe also noted that the accuracies achieved by the best RFensembles do not differ significantly Thus selection amongthese ensembles should be considered as a tuning of theproposed method

The higher accuracy of RF ensemble can be explainedby the fact that the RF algorithm has several features whichenable effective training of the classifier According to thisalgorithm all decision trees in the forest are created by

070

075

080

085

090

095

100

RFensemble

no 2

RFensemble

no5

RFensemble

no6

RFsingle

classifier

KNNensemble

no 2

KNNensemble

no 5

KNNensemble

no 6

KNNsingle

classifier

Vehicle classification accuracy

Figure 10 Comparison of vehicle classification accuracy for classi-fier ensembles and for single classifiers

using randomly selected subsets of the training dataset Therandom selection applies to both the events (rows) and theaggregates (columns) Each decision tree further divides thetraining data into smaller subsets until the subsets are smallor all events in these subsets belong to one class In contrast toRF the other compared algorithms (includingKNN) performthe training procedures with use of the complete trainingdataset

5 Conclusions

The proposed vehicle detection and classification approachuses mobile devices (smartphones) and Bluetooth beaconsfor road traffic monitoring It allows detecting three classesof vehicles by analyzing strength of radio signal received fromBLE beacons that are installed at different heights by the roadThis approach is suitable for crowd sourcing applicationsaimed at reducing travel time congestion and emissionsAdvantages of the introduced method were demonstratedduring experimental evaluation in real-traffic conditionsExtensive experiments were conducted to test different clas-sification approaches and data aggregation methods In com-parison with state-of-the-art RSSI-based vehicle detection

Wireless Communications and Mobile Computing 11

methods higher accuracy was achieved by introducing adedicated ensemble of random forest classifiers withmajorityvoting

The presented solution can be extended to several bea-cons installed along the road to obtain information concern-ing vehicle velocity and direction Another interesting topicis related to data preprocessing on mobile devices in order toreduce the communication effort Finally additional studieswill be necessary to introduce methods that can be usedto activate the Bluetooth modules and beacons when it isnecessary and reduce the energy consumption

Data Availability

The data used to support the findings of this study areincluded within the supplementary information file

Conflicts of Interest

The authors declare that there are no conflicts of interestregarding the publication of this paper

Acknowledgments

The research was supported by the National Centre forResearch and Development (NCBR) [Grant no LIDER180064L-715NCBR2016]

Supplementary Materials

The supplementary material file (csv) includes a raw RSSIdataset where ldquoidrdquo denotes number of measurement ldquoNoderdquois an identifier of mobile device (receiver) ldquoiBeaconrdquo is anidentifier of beacon (transmitter) ldquoRSSIrdquo is the measuredRSSI value ldquoClassrdquo describes type of observed event (Eempty road C personal car D semitruck and T truck) andldquoFlagrdquo indicates the measurements for which the events wererecorded (symbol ldquo+rdquo) (Supplementary Materials)

References

[1] H Chang Y Wang and P A Ioannou ldquoThe use of micro-scopic traffic simulation model for traffic control systemsrdquo inProceedings of the 2007 International Symposium on InformationTechnology Convergence ISITC 2007 pp 120ndash124 November2007

[2] M Bernas B Płaczek P Porwik and T Pamuła ldquoSegmentationof vehicle detector data for improved k-nearest neighbours-based traffic flow predictionrdquo IET Intelligent Transport Systemsvol 9 no 3 pp 264ndash274 2014

[3] I Ahmad R M Noor I Ali M Imran and A VasilakosldquoCharacterizing the role of vehicular cloud computing in roadtrafficmanagementrdquo International Journal of Distributed SensorNetworks vol 13 no 5 2017

[4] B Płaczek ldquoA self-organizing system for urban traffic controlbased on predictive interval microscopic modelrdquo EngineeringApplications of Artificial Intelligence vol 34 pp 75ndash84 2014

[5] M Karpinski A Senart and V Cahill ldquoSensor networks forsmart roadsrdquo in Proceedings of the 4th Annual IEEE Interna-tional Conference on Pervasive Computing and CommunicationsWorkshops (PerCom rsquo06) pp 310ndash314 IEEE Pisa Italy March2006

[6] G Chatzimilioudis A Konstantinidis C Laoudias and DZeinalipour-Yazti ldquoCrowdsourcing with smartphonesrdquo IEEEInternet Computing vol 16 no 5 pp 36ndash44 2012

[7] R Prabha and M G Kabadi ldquoKNODET A Framework toMine GPS Data for Intelligent Transportation Systems at TrafficSignalsrdquo in Proceedings of the 2017 International Conference onRecent Advances in Electronics and Communication Technology(ICRAECT) pp 85ndash89 Bangalore India March 2017

[8] Y Ma L Zhou Z Gu Y Song and B Wang ldquoChannel Accessand Power Control for Mobile Crowdsourcing in Device-to-DeviceUnderlaidCellularNetworksrdquoWireless Communicationsand Mobile Computing vol 2018 Article ID 7192840 13 pages2018

[9] X Zhang Z Yang W Sun et al ldquoIncentives for mobile crowdsensing A surveyrdquo IEEE Communications Surveys amp Tutorialsvol 18 no 1 pp 54ndash67 2016

[10] N D Lane E Miluzzo H Lu D Peebles T Choudhury andA T Campbell ldquoA survey of mobile phone sensingrdquo IEEECommunications Magazine vol 48 no 9 pp 140ndash150 2010

[11] W Z Khan Y Xiang M Y Aalsalem and Q Arshad ldquoMobilephone sensing systems a surveyrdquo IEEE Communications Sur-veys amp Tutorials vol 15 no 1 pp 402ndash427 2013

[12] R K Ganti F Ye and H Lei ldquoMobile crowdsensing currentstate and future challengesrdquo IEEE Communications Magazinevol 49 no 11 pp 32ndash39 2011

[13] A T Campbell S B Eisenman N D Lane et al ldquoThe rise ofpeople-centric sensingrdquo IEEE Internet Computing vol 12 no 4pp 12ndash21 2008

[14] N Maisonneuve M Stevens M E Niessen and L SteelsldquoNoiseTube Measuring and mapping noise pollution withmobile phonesrdquo Information Technologies in EnvironmentalEngineering pp 215ndash228 2009

[15] C Costa C Laoudias D Zeinalipour-Yazti and D GunopulosldquoSmartTrace Finding similar trajectories in smartphone net-works without disclosing the tracesrdquo in Proceedings of the 2011IEEE 27th International Conference on Data Engineering ICDE2011 pp 1288ndash1291 April 2011

[16] J Gomez J C Torrado and G Montoro ldquoUsing Smartphonesto Assist People withDown Syndrome inTheir Labour Trainingand Integration A Case Studyrdquo Wireless Communications andMobile Computing vol 2017 Article ID 5062371 15 pages 2017

[17] CWu Z Yang and Y Liu ldquoSmartphones based crowdsourcingfor indoor localizationrdquo IEEE Transactions on Mobile Comput-ing vol 14 no 2 pp 444ndash457 2015

[18] S Matyas C Matyas C Schlieder P Kiefer H Mitarai andM Kamata ldquoDesigning location-based mobile games witha purpose Collecting geospatial data with cityexplorerrdquo inProceedings of the 2008 International Conference on Advancesin Computer Entertainment Technology ACE 2008 pp 244ndash247December 2008

[19] H Aly A Basalamah and M Youssef ldquoRobust and ubiquitoussmartphone-based lane detectionrdquo Pervasive and Mobile Com-puting vol 26 pp 35ndash56 2016

[20] E Koukoumidis L-S Peh and M R Martonosi ldquoSignalGuruleveraging mobile phones for collaborative traffic signal sched-ule advisoryrdquo in Proceedings of the 9th International Conference

12 Wireless Communications and Mobile Computing

on Mobile Systems Applications and Services pp 127ndash140 July2011

[21] A Thiagarajan L Ravindranath K LaCurts et al ldquoVTrackaccurate energy-aware road traffic delay estimation usingmobile phonesrdquo in Proceedings of the 7th ACM Conference onEmbedded Networked Sensor Systems (SenSys rsquo09) pp 85ndash98November 2009

[22] MWon S Zhang and SH Son ldquoWiTraffic Low-cost and non-intrusive traffic monitoring system using WiFirdquo in Proceedingsof the 26th International Conference on Computer Communica-tions and Networks ICCCN 2017 pp 1ndash9 IEEE August 2017

[23] MHaferkampMAl-Askary DDorn et al ldquoRadio-based Traf-fic Flow Detection and Vehicle Classification for Future SmartCitiesrdquo in 2017 IEEE 85thVehicular TechnologyConference (VTCSpring) pp 1ndash5 Sydney NSW Australia 2017

[24] G Horvat D Sostaric and D Zagar ldquoUsing radio irregularityfor vehicle detection in adaptive roadway lightingrdquo in Proceed-ings of the 35th International Convention on Information andCommunication Technology Electronics and MicroelectronicsMIPRO 2012 pp 748ndash753 IEEE May 2012

[25] S Roy R Sen S Kulkarni P Kulkarni B Raman and L KSingh ldquoWireless across road RF based road traffic congestiondetectionrdquo in Proceedings of the 2011 Third International Con-ference on Communication Systems and Networks (COMSNETS2011) pp 1ndash6 IEEE January 2011

[26] N Kassem A E Kosba and M Youssef ldquoRF-based vehicledetection and speed estimationrdquo in 2012 IEEE 75th VehicularTechnology Conference (VTC Spring) pp 1ndash5 IEEE

[27] X Li and J Wu ldquoA new method and verification of vehiclesdetection based on RSSI variationrdquo in 2016 10th InternationalConference on Sensing Technology (ICST) pp 1ndash6 IEEE

[28] P Mestre R Guedes P Couto J Matias J C Fernandes andC Serodio ldquoVehicle Detection for Outdoor Car Parks usingIEEE802154rdquo Lecture Notes in Engineering and ComputerScience Newswood Limited ndash IAENG 2013

[29] Apple Inc Getting Started with iBeacon Tech Rep 10 June2014

[30] A Lindemann B Schnor J Sohre and P Vogel ldquoIndoorpositioning A comparison of WiFi and Bluetooth Low Energyfor region monitoringrdquo in Proceedings of the International JointConference on Biomedical Engineering Systems and TechnologiesVolume 5 HEALTHINF pp 314ndash321 Rome Italy February2016

[31] VMartsenyuk KWarwas K Augustynek et al ldquoOnmultivari-ate method of qualitative analysis of Hodgkin-Huxley modelwith decision tree inductionrdquo in Proceedings of the 2016 16thInternational Conference on Control Automation and Systems(ICCAS) pp 489ndash494 Gyeongju South Korea October 2016

[32] M Bernas B Płaczek and W Korski ldquoWireless Networkwith Bluetooth Low Energy Beacons for Vehicle Detectionand Classificationrdquo in CN 2018 Computer Networks P GajM Sawicki G Suchacka and A Kwiecien Eds vol 860 ofCommunications inComputer and Information Science pp 429ndash444 Springer 2018

[33] MWozniak M Grana and E Corchado ldquoA survey of multipleclassifier systems as hybrid systemsrdquo Information Fusion vol 16no 1 pp 3ndash17 2014

[34] G Marcialis and F Roli ldquoFusion of face recognition algo-rithms for video-based surveillance systemsrdquo in MultisensorSurveillance Systems The Fusion Perspective G L Foresti CRegazzoni and P Varshney Eds pp 235ndash250 2003

[35] R Polikar ldquoEnsemble learningrdquo Scholarpedia vol 3 no 12article 2776 2008

[36] G Brown J Wyatt R Harris and X Yao ldquoDiversity creationmethods a survey and categorisationrdquo Information Fusion vol6 no 1 pp 5ndash20 2005

[37] M Bernas and B Płaczek ldquoFully connected neural networksensemble with signal strength clustering for indoor localizationinwireless sensor networksrdquo International Journal ofDistributedSensor Networks vol 2015 Article ID 403242 2015

[38] M Lewandowski T Orczyk and B Płaczek ldquoHuman activitydetection based on the iBeacon technologyrdquo Journal of MedicalInformatics Technologies vol 25 2016

[39] H-G Beyer and H-P Schwefel ldquoEvolution strategiesndashA com-prehensive introductionrdquo Natural Computing vol 1 no 1 pp3ndash52 2002

[40] M R Berthold N Cebron F Dill et al ldquoKNIMETheKonstanzInformation Minerrdquo in Data Analysis Machine Learning andApplications Studies inClassificationDataAnalysis andKnowl-edge Organization C Preisach H Burkhardt L Schmidt-Thieme and R Decker Eds Springer Berlin Germany

[41] B Scholkopf A J Smola R C Williamson and P L BartlettldquoNew support vector algorithmsrdquo Neural Computation vol 12no 5 pp 1207ndash1245 2000

[42] L Breiman ldquoRandom forestsrdquoMachine Learning vol 45 no 1pp 5ndash32 2001

[43] D F Specht ldquoProbabilistic neural networksrdquo Neural Networksvol 3 no 1 pp 109ndash118 1990

[44] D W Aha D Kibler and M K Albert ldquoInstance-BasedLearning Algorithmsrdquo Machine Learning vol 6 no 1 pp 37ndash66 1991

[45] N C Smeeton ldquoEarly History of the Kappa Statisticrdquo Biomet-rics vol 41 no 3 article 795 1985

International Journal of

AerospaceEngineeringHindawiwwwhindawicom Volume 2018

RoboticsJournal of

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Active and Passive Electronic Components

VLSI Design

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Shock and Vibration

Hindawiwwwhindawicom Volume 2018

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawiwwwhindawicom

Volume 2018

Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom

The Scientific World Journal

Volume 2018

Control Scienceand Engineering

Journal of

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom

Journal ofEngineeringVolume 2018

SensorsJournal of

Hindawiwwwhindawicom Volume 2018

International Journal of

RotatingMachinery

Hindawiwwwhindawicom Volume 2018

Modelling ampSimulationin EngineeringHindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Navigation and Observation

International Journal of

Hindawi

wwwhindawicom Volume 2018

Advances in

Multimedia

Submit your manuscripts atwwwhindawicom

Page 11: Road Traffic Monitoring System Based on Mobile …downloads.hindawi.com/journals/wcmc/2018/3251598.pdfIt should be noted that the intro-duced system structure, which includes BLE beacons

Wireless Communications and Mobile Computing 11

methods higher accuracy was achieved by introducing adedicated ensemble of random forest classifiers withmajorityvoting

The presented solution can be extended to several bea-cons installed along the road to obtain information concern-ing vehicle velocity and direction Another interesting topicis related to data preprocessing on mobile devices in order toreduce the communication effort Finally additional studieswill be necessary to introduce methods that can be usedto activate the Bluetooth modules and beacons when it isnecessary and reduce the energy consumption

Data Availability

The data used to support the findings of this study areincluded within the supplementary information file

Conflicts of Interest

The authors declare that there are no conflicts of interestregarding the publication of this paper

Acknowledgments

The research was supported by the National Centre forResearch and Development (NCBR) [Grant no LIDER180064L-715NCBR2016]

Supplementary Materials

The supplementary material file (csv) includes a raw RSSIdataset where ldquoidrdquo denotes number of measurement ldquoNoderdquois an identifier of mobile device (receiver) ldquoiBeaconrdquo is anidentifier of beacon (transmitter) ldquoRSSIrdquo is the measuredRSSI value ldquoClassrdquo describes type of observed event (Eempty road C personal car D semitruck and T truck) andldquoFlagrdquo indicates the measurements for which the events wererecorded (symbol ldquo+rdquo) (Supplementary Materials)

References

[1] H Chang Y Wang and P A Ioannou ldquoThe use of micro-scopic traffic simulation model for traffic control systemsrdquo inProceedings of the 2007 International Symposium on InformationTechnology Convergence ISITC 2007 pp 120ndash124 November2007

[2] M Bernas B Płaczek P Porwik and T Pamuła ldquoSegmentationof vehicle detector data for improved k-nearest neighbours-based traffic flow predictionrdquo IET Intelligent Transport Systemsvol 9 no 3 pp 264ndash274 2014

[3] I Ahmad R M Noor I Ali M Imran and A VasilakosldquoCharacterizing the role of vehicular cloud computing in roadtrafficmanagementrdquo International Journal of Distributed SensorNetworks vol 13 no 5 2017

[4] B Płaczek ldquoA self-organizing system for urban traffic controlbased on predictive interval microscopic modelrdquo EngineeringApplications of Artificial Intelligence vol 34 pp 75ndash84 2014

[5] M Karpinski A Senart and V Cahill ldquoSensor networks forsmart roadsrdquo in Proceedings of the 4th Annual IEEE Interna-tional Conference on Pervasive Computing and CommunicationsWorkshops (PerCom rsquo06) pp 310ndash314 IEEE Pisa Italy March2006

[6] G Chatzimilioudis A Konstantinidis C Laoudias and DZeinalipour-Yazti ldquoCrowdsourcing with smartphonesrdquo IEEEInternet Computing vol 16 no 5 pp 36ndash44 2012

[7] R Prabha and M G Kabadi ldquoKNODET A Framework toMine GPS Data for Intelligent Transportation Systems at TrafficSignalsrdquo in Proceedings of the 2017 International Conference onRecent Advances in Electronics and Communication Technology(ICRAECT) pp 85ndash89 Bangalore India March 2017

[8] Y Ma L Zhou Z Gu Y Song and B Wang ldquoChannel Accessand Power Control for Mobile Crowdsourcing in Device-to-DeviceUnderlaidCellularNetworksrdquoWireless Communicationsand Mobile Computing vol 2018 Article ID 7192840 13 pages2018

[9] X Zhang Z Yang W Sun et al ldquoIncentives for mobile crowdsensing A surveyrdquo IEEE Communications Surveys amp Tutorialsvol 18 no 1 pp 54ndash67 2016

[10] N D Lane E Miluzzo H Lu D Peebles T Choudhury andA T Campbell ldquoA survey of mobile phone sensingrdquo IEEECommunications Magazine vol 48 no 9 pp 140ndash150 2010

[11] W Z Khan Y Xiang M Y Aalsalem and Q Arshad ldquoMobilephone sensing systems a surveyrdquo IEEE Communications Sur-veys amp Tutorials vol 15 no 1 pp 402ndash427 2013

[12] R K Ganti F Ye and H Lei ldquoMobile crowdsensing currentstate and future challengesrdquo IEEE Communications Magazinevol 49 no 11 pp 32ndash39 2011

[13] A T Campbell S B Eisenman N D Lane et al ldquoThe rise ofpeople-centric sensingrdquo IEEE Internet Computing vol 12 no 4pp 12ndash21 2008

[14] N Maisonneuve M Stevens M E Niessen and L SteelsldquoNoiseTube Measuring and mapping noise pollution withmobile phonesrdquo Information Technologies in EnvironmentalEngineering pp 215ndash228 2009

[15] C Costa C Laoudias D Zeinalipour-Yazti and D GunopulosldquoSmartTrace Finding similar trajectories in smartphone net-works without disclosing the tracesrdquo in Proceedings of the 2011IEEE 27th International Conference on Data Engineering ICDE2011 pp 1288ndash1291 April 2011

[16] J Gomez J C Torrado and G Montoro ldquoUsing Smartphonesto Assist People withDown Syndrome inTheir Labour Trainingand Integration A Case Studyrdquo Wireless Communications andMobile Computing vol 2017 Article ID 5062371 15 pages 2017

[17] CWu Z Yang and Y Liu ldquoSmartphones based crowdsourcingfor indoor localizationrdquo IEEE Transactions on Mobile Comput-ing vol 14 no 2 pp 444ndash457 2015

[18] S Matyas C Matyas C Schlieder P Kiefer H Mitarai andM Kamata ldquoDesigning location-based mobile games witha purpose Collecting geospatial data with cityexplorerrdquo inProceedings of the 2008 International Conference on Advancesin Computer Entertainment Technology ACE 2008 pp 244ndash247December 2008

[19] H Aly A Basalamah and M Youssef ldquoRobust and ubiquitoussmartphone-based lane detectionrdquo Pervasive and Mobile Com-puting vol 26 pp 35ndash56 2016

[20] E Koukoumidis L-S Peh and M R Martonosi ldquoSignalGuruleveraging mobile phones for collaborative traffic signal sched-ule advisoryrdquo in Proceedings of the 9th International Conference

12 Wireless Communications and Mobile Computing

on Mobile Systems Applications and Services pp 127ndash140 July2011

[21] A Thiagarajan L Ravindranath K LaCurts et al ldquoVTrackaccurate energy-aware road traffic delay estimation usingmobile phonesrdquo in Proceedings of the 7th ACM Conference onEmbedded Networked Sensor Systems (SenSys rsquo09) pp 85ndash98November 2009

[22] MWon S Zhang and SH Son ldquoWiTraffic Low-cost and non-intrusive traffic monitoring system using WiFirdquo in Proceedingsof the 26th International Conference on Computer Communica-tions and Networks ICCCN 2017 pp 1ndash9 IEEE August 2017

[23] MHaferkampMAl-Askary DDorn et al ldquoRadio-based Traf-fic Flow Detection and Vehicle Classification for Future SmartCitiesrdquo in 2017 IEEE 85thVehicular TechnologyConference (VTCSpring) pp 1ndash5 Sydney NSW Australia 2017

[24] G Horvat D Sostaric and D Zagar ldquoUsing radio irregularityfor vehicle detection in adaptive roadway lightingrdquo in Proceed-ings of the 35th International Convention on Information andCommunication Technology Electronics and MicroelectronicsMIPRO 2012 pp 748ndash753 IEEE May 2012

[25] S Roy R Sen S Kulkarni P Kulkarni B Raman and L KSingh ldquoWireless across road RF based road traffic congestiondetectionrdquo in Proceedings of the 2011 Third International Con-ference on Communication Systems and Networks (COMSNETS2011) pp 1ndash6 IEEE January 2011

[26] N Kassem A E Kosba and M Youssef ldquoRF-based vehicledetection and speed estimationrdquo in 2012 IEEE 75th VehicularTechnology Conference (VTC Spring) pp 1ndash5 IEEE

[27] X Li and J Wu ldquoA new method and verification of vehiclesdetection based on RSSI variationrdquo in 2016 10th InternationalConference on Sensing Technology (ICST) pp 1ndash6 IEEE

[28] P Mestre R Guedes P Couto J Matias J C Fernandes andC Serodio ldquoVehicle Detection for Outdoor Car Parks usingIEEE802154rdquo Lecture Notes in Engineering and ComputerScience Newswood Limited ndash IAENG 2013

[29] Apple Inc Getting Started with iBeacon Tech Rep 10 June2014

[30] A Lindemann B Schnor J Sohre and P Vogel ldquoIndoorpositioning A comparison of WiFi and Bluetooth Low Energyfor region monitoringrdquo in Proceedings of the International JointConference on Biomedical Engineering Systems and TechnologiesVolume 5 HEALTHINF pp 314ndash321 Rome Italy February2016

[31] VMartsenyuk KWarwas K Augustynek et al ldquoOnmultivari-ate method of qualitative analysis of Hodgkin-Huxley modelwith decision tree inductionrdquo in Proceedings of the 2016 16thInternational Conference on Control Automation and Systems(ICCAS) pp 489ndash494 Gyeongju South Korea October 2016

[32] M Bernas B Płaczek and W Korski ldquoWireless Networkwith Bluetooth Low Energy Beacons for Vehicle Detectionand Classificationrdquo in CN 2018 Computer Networks P GajM Sawicki G Suchacka and A Kwiecien Eds vol 860 ofCommunications inComputer and Information Science pp 429ndash444 Springer 2018

[33] MWozniak M Grana and E Corchado ldquoA survey of multipleclassifier systems as hybrid systemsrdquo Information Fusion vol 16no 1 pp 3ndash17 2014

[34] G Marcialis and F Roli ldquoFusion of face recognition algo-rithms for video-based surveillance systemsrdquo in MultisensorSurveillance Systems The Fusion Perspective G L Foresti CRegazzoni and P Varshney Eds pp 235ndash250 2003

[35] R Polikar ldquoEnsemble learningrdquo Scholarpedia vol 3 no 12article 2776 2008

[36] G Brown J Wyatt R Harris and X Yao ldquoDiversity creationmethods a survey and categorisationrdquo Information Fusion vol6 no 1 pp 5ndash20 2005

[37] M Bernas and B Płaczek ldquoFully connected neural networksensemble with signal strength clustering for indoor localizationinwireless sensor networksrdquo International Journal ofDistributedSensor Networks vol 2015 Article ID 403242 2015

[38] M Lewandowski T Orczyk and B Płaczek ldquoHuman activitydetection based on the iBeacon technologyrdquo Journal of MedicalInformatics Technologies vol 25 2016

[39] H-G Beyer and H-P Schwefel ldquoEvolution strategiesndashA com-prehensive introductionrdquo Natural Computing vol 1 no 1 pp3ndash52 2002

[40] M R Berthold N Cebron F Dill et al ldquoKNIMETheKonstanzInformation Minerrdquo in Data Analysis Machine Learning andApplications Studies inClassificationDataAnalysis andKnowl-edge Organization C Preisach H Burkhardt L Schmidt-Thieme and R Decker Eds Springer Berlin Germany

[41] B Scholkopf A J Smola R C Williamson and P L BartlettldquoNew support vector algorithmsrdquo Neural Computation vol 12no 5 pp 1207ndash1245 2000

[42] L Breiman ldquoRandom forestsrdquoMachine Learning vol 45 no 1pp 5ndash32 2001

[43] D F Specht ldquoProbabilistic neural networksrdquo Neural Networksvol 3 no 1 pp 109ndash118 1990

[44] D W Aha D Kibler and M K Albert ldquoInstance-BasedLearning Algorithmsrdquo Machine Learning vol 6 no 1 pp 37ndash66 1991

[45] N C Smeeton ldquoEarly History of the Kappa Statisticrdquo Biomet-rics vol 41 no 3 article 795 1985

International Journal of

AerospaceEngineeringHindawiwwwhindawicom Volume 2018

RoboticsJournal of

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Active and Passive Electronic Components

VLSI Design

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Shock and Vibration

Hindawiwwwhindawicom Volume 2018

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawiwwwhindawicom

Volume 2018

Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom

The Scientific World Journal

Volume 2018

Control Scienceand Engineering

Journal of

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom

Journal ofEngineeringVolume 2018

SensorsJournal of

Hindawiwwwhindawicom Volume 2018

International Journal of

RotatingMachinery

Hindawiwwwhindawicom Volume 2018

Modelling ampSimulationin EngineeringHindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Navigation and Observation

International Journal of

Hindawi

wwwhindawicom Volume 2018

Advances in

Multimedia

Submit your manuscripts atwwwhindawicom

Page 12: Road Traffic Monitoring System Based on Mobile …downloads.hindawi.com/journals/wcmc/2018/3251598.pdfIt should be noted that the intro-duced system structure, which includes BLE beacons

12 Wireless Communications and Mobile Computing

on Mobile Systems Applications and Services pp 127ndash140 July2011

[21] A Thiagarajan L Ravindranath K LaCurts et al ldquoVTrackaccurate energy-aware road traffic delay estimation usingmobile phonesrdquo in Proceedings of the 7th ACM Conference onEmbedded Networked Sensor Systems (SenSys rsquo09) pp 85ndash98November 2009

[22] MWon S Zhang and SH Son ldquoWiTraffic Low-cost and non-intrusive traffic monitoring system using WiFirdquo in Proceedingsof the 26th International Conference on Computer Communica-tions and Networks ICCCN 2017 pp 1ndash9 IEEE August 2017

[23] MHaferkampMAl-Askary DDorn et al ldquoRadio-based Traf-fic Flow Detection and Vehicle Classification for Future SmartCitiesrdquo in 2017 IEEE 85thVehicular TechnologyConference (VTCSpring) pp 1ndash5 Sydney NSW Australia 2017

[24] G Horvat D Sostaric and D Zagar ldquoUsing radio irregularityfor vehicle detection in adaptive roadway lightingrdquo in Proceed-ings of the 35th International Convention on Information andCommunication Technology Electronics and MicroelectronicsMIPRO 2012 pp 748ndash753 IEEE May 2012

[25] S Roy R Sen S Kulkarni P Kulkarni B Raman and L KSingh ldquoWireless across road RF based road traffic congestiondetectionrdquo in Proceedings of the 2011 Third International Con-ference on Communication Systems and Networks (COMSNETS2011) pp 1ndash6 IEEE January 2011

[26] N Kassem A E Kosba and M Youssef ldquoRF-based vehicledetection and speed estimationrdquo in 2012 IEEE 75th VehicularTechnology Conference (VTC Spring) pp 1ndash5 IEEE

[27] X Li and J Wu ldquoA new method and verification of vehiclesdetection based on RSSI variationrdquo in 2016 10th InternationalConference on Sensing Technology (ICST) pp 1ndash6 IEEE

[28] P Mestre R Guedes P Couto J Matias J C Fernandes andC Serodio ldquoVehicle Detection for Outdoor Car Parks usingIEEE802154rdquo Lecture Notes in Engineering and ComputerScience Newswood Limited ndash IAENG 2013

[29] Apple Inc Getting Started with iBeacon Tech Rep 10 June2014

[30] A Lindemann B Schnor J Sohre and P Vogel ldquoIndoorpositioning A comparison of WiFi and Bluetooth Low Energyfor region monitoringrdquo in Proceedings of the International JointConference on Biomedical Engineering Systems and TechnologiesVolume 5 HEALTHINF pp 314ndash321 Rome Italy February2016

[31] VMartsenyuk KWarwas K Augustynek et al ldquoOnmultivari-ate method of qualitative analysis of Hodgkin-Huxley modelwith decision tree inductionrdquo in Proceedings of the 2016 16thInternational Conference on Control Automation and Systems(ICCAS) pp 489ndash494 Gyeongju South Korea October 2016

[32] M Bernas B Płaczek and W Korski ldquoWireless Networkwith Bluetooth Low Energy Beacons for Vehicle Detectionand Classificationrdquo in CN 2018 Computer Networks P GajM Sawicki G Suchacka and A Kwiecien Eds vol 860 ofCommunications inComputer and Information Science pp 429ndash444 Springer 2018

[33] MWozniak M Grana and E Corchado ldquoA survey of multipleclassifier systems as hybrid systemsrdquo Information Fusion vol 16no 1 pp 3ndash17 2014

[34] G Marcialis and F Roli ldquoFusion of face recognition algo-rithms for video-based surveillance systemsrdquo in MultisensorSurveillance Systems The Fusion Perspective G L Foresti CRegazzoni and P Varshney Eds pp 235ndash250 2003

[35] R Polikar ldquoEnsemble learningrdquo Scholarpedia vol 3 no 12article 2776 2008

[36] G Brown J Wyatt R Harris and X Yao ldquoDiversity creationmethods a survey and categorisationrdquo Information Fusion vol6 no 1 pp 5ndash20 2005

[37] M Bernas and B Płaczek ldquoFully connected neural networksensemble with signal strength clustering for indoor localizationinwireless sensor networksrdquo International Journal ofDistributedSensor Networks vol 2015 Article ID 403242 2015

[38] M Lewandowski T Orczyk and B Płaczek ldquoHuman activitydetection based on the iBeacon technologyrdquo Journal of MedicalInformatics Technologies vol 25 2016

[39] H-G Beyer and H-P Schwefel ldquoEvolution strategiesndashA com-prehensive introductionrdquo Natural Computing vol 1 no 1 pp3ndash52 2002

[40] M R Berthold N Cebron F Dill et al ldquoKNIMETheKonstanzInformation Minerrdquo in Data Analysis Machine Learning andApplications Studies inClassificationDataAnalysis andKnowl-edge Organization C Preisach H Burkhardt L Schmidt-Thieme and R Decker Eds Springer Berlin Germany

[41] B Scholkopf A J Smola R C Williamson and P L BartlettldquoNew support vector algorithmsrdquo Neural Computation vol 12no 5 pp 1207ndash1245 2000

[42] L Breiman ldquoRandom forestsrdquoMachine Learning vol 45 no 1pp 5ndash32 2001

[43] D F Specht ldquoProbabilistic neural networksrdquo Neural Networksvol 3 no 1 pp 109ndash118 1990

[44] D W Aha D Kibler and M K Albert ldquoInstance-BasedLearning Algorithmsrdquo Machine Learning vol 6 no 1 pp 37ndash66 1991

[45] N C Smeeton ldquoEarly History of the Kappa Statisticrdquo Biomet-rics vol 41 no 3 article 795 1985

International Journal of

AerospaceEngineeringHindawiwwwhindawicom Volume 2018

RoboticsJournal of

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Active and Passive Electronic Components

VLSI Design

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Shock and Vibration

Hindawiwwwhindawicom Volume 2018

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawiwwwhindawicom

Volume 2018

Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom

The Scientific World Journal

Volume 2018

Control Scienceand Engineering

Journal of

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom

Journal ofEngineeringVolume 2018

SensorsJournal of

Hindawiwwwhindawicom Volume 2018

International Journal of

RotatingMachinery

Hindawiwwwhindawicom Volume 2018

Modelling ampSimulationin EngineeringHindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Navigation and Observation

International Journal of

Hindawi

wwwhindawicom Volume 2018

Advances in

Multimedia

Submit your manuscripts atwwwhindawicom

Page 13: Road Traffic Monitoring System Based on Mobile …downloads.hindawi.com/journals/wcmc/2018/3251598.pdfIt should be noted that the intro-duced system structure, which includes BLE beacons

International Journal of

AerospaceEngineeringHindawiwwwhindawicom Volume 2018

RoboticsJournal of

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Active and Passive Electronic Components

VLSI Design

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Shock and Vibration

Hindawiwwwhindawicom Volume 2018

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawiwwwhindawicom

Volume 2018

Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom

The Scientific World Journal

Volume 2018

Control Scienceand Engineering

Journal of

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom

Journal ofEngineeringVolume 2018

SensorsJournal of

Hindawiwwwhindawicom Volume 2018

International Journal of

RotatingMachinery

Hindawiwwwhindawicom Volume 2018

Modelling ampSimulationin EngineeringHindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawiwwwhindawicom Volume 2018

Hindawiwwwhindawicom Volume 2018

Navigation and Observation

International Journal of

Hindawi

wwwhindawicom Volume 2018

Advances in

Multimedia

Submit your manuscripts atwwwhindawicom