Monitoring Roadway Lights and Pavement Defects for Nighttime Street Safety Assessment by Sensor Data Analysis and Visualization

Street maintenance and improvement are significant missions in ensuring transportation safety, especially at nighttime because the severity of injuries doubles at night. Driving visibility and road surface conditions are key factors behind nighttime traffic accidents, and they must be solved as a major priority. Having an exclusive report representing this issue becomes useful documentation for preparing an effective plan for repairing and upgrading a street at appropriate locations. However, road observations are mostly performed by humans, so reports are imprecise owing to the limitation of human cognition and documentation during observation at night. For this reason, the aim of this work is to create a visualization report for monitoring the risk on a street at nighttime. To achieve this goal, a light sensor for measuring brightness on the road, a gyro sensor and an accelerometer for detecting pavement defects, and a location sensor for marking the current latitude and longitude are placed in a car, and the data obtained are transferred to a cloud database while driving on the road. After that, all data are analyzed by machine learning techniques to identify some critical failures and report on map visualization. The result demonstrates that this approach can visualize the right defect at the correct location, and it will become an important contribution to transport safety.


Introduction
The frequencies of road traffic accidents between daytime and nighttime are similar; however, the severity of injuries doubles at night. (1)There are several factors affecting road accidents such as visibility, geometry, lane markings, surface condition, and street lighting. (2,3)his paper focuses on two factors, street lighting and pavement conditions, because they potentially influence the drivers during nighttime driving, and these issues can be fixed without changing the whole structure of a road.Pavement failure is found everyday because of daily usage.In addition, the number of car accidents caused by low street lighting is increasing. (4)ith very low road lighting as encountered in the countryside or on secondary roads, drivers must rely on the light from the headlamps of their car, which, however, is not bright enough to enable drivers to estimate the road conditions precisely as shown in Fig. 1.Some dangerous potholes, most of them cause severe accidents, may not be clearly seen by drivers.7) In order to improve road safety, government agencies responsible for transportation must watch over and maintain the quality of street surfaces.In this case, a useful report about road surface quality can aid government agencies in organizing an inclusive and precise street maintenance plan.Although there is a suitable technology called a laser surface profilometer, which is a laser-based road surface scanner for measuring road surface roughness, (8) it is not yet widely used owing to its high cost.With this background, many government agencies, especially in local governments in Thailand, still observe the street lighting and the pavement failure manually or on the basis of feedback from citizens.This method is viable but human cognition is limited and imprecise, so overlooked defects may lead to critical accidents.
To reduce human labor and human errors, electronic sensors are used for detecting street lighting and pavement failure.There is much research on road safety, (9)(10)(11)(12) and it usually focuses on pavement quality with less attention on the aspect of lighting.For this reason, in this study, the creation of an approach to monitoring unsafety points on street at nighttime is attempted.Failures such as potholes, ruts, and bumps on the road are emphasized because they are commonly found in Thailand, and most of them can cause severe accidents during the hours of darkness.In addition, the roughness of a street surface has most often been detected using Z-axis acceleration, which is derived from the up-down movement of a sensor.The result indicates that all obstacles on streets are classified as pavement failures.In practice, speed bumps or breakers must not be classified as failures, because they are traffic-calming devices, so the classification model must consider this issue as well.In our work, we invent the cyberphysical system for collecting data of a road and sending them to a server for data analysis and map visualization.To achieve this aim, this research is conducted to accomplish the following objectives: • measure street lighting at night and pavement failure using sensors, • analyze the sensor data and create a model for identifying risky locations on the street that have the potential to cause traffic accident at nighttime, and • visualize the quality of the street at nighttime on a map.The results of this study show that a photoresistor sensor and a gyro sensor can be used to measure the brightness on a street and an abnormal street surface, respectively.The analysis of gyro sensor data by a classification method (13) helps us to separate pavement failures from speed bumps, and calculations using accelerometer data can yield estimates of the degree of pavement failure.Locations obtained using a global positioning system (GPS) sensor together with analysis results are used to present the quality of a street on a map.The overall results support the contribution of road safety as well.
The rest of the paper is organized into the following sections: Section 2 shows the materials and methods used in this work.Section 3 gives the results of our experiments.Section 4 is a discussion of our contribution.Lastly, Sect. 5 presents the conclusions and future work.

Materials and Methods
In this section, a review of materials for measuring street safety at nighttime, the sensors used, data analysis, and methods of this work is given.

Materials
Street safety, especially at nighttime, is a challenging issue for improving personal security.From several articles, (1) we have found that the numbers of accidents at daytime and nighttime are similar; however, the severity of accidents at nighttime is twice higher that at daytime.There are three main factors for traffic accident: geometric factors, that is, the shape, curve, and number of lanes of a road; drivers' behavioral factors, that is, driving speed and sensibility; environmental factors, that is, surface conditions, lighting conditions, and time of day.Traffic condition factors are traffic volume and the variety of vehicles. (2,3)To solve all issues, much more time and efforts are required, so this study is aimed at contributing to the improvement of the nighttime road environment.Thus, the street surface and lighting conditions are considered to be the materials of this study.

Street lighting
Because of the darkness at night, the ability of drivers to see the environment while driving is reduced.Although street lightings are installed along the edge of roads, they do not cover all areas.The issue of darkness in many local areas is shown in Fig. 1(a).An accident may easily occur if an abnormal situation arises, for example, falling into a large pothole, an animal running in front of the car, or collision with someone walking or riding a bicycle.
There are standards and guidelines for street lighting.The standard unit of measurement for illuminance is the lux (lx).In this study, we refer to the guidelines from the Bureau of Street Lighting, Los Angeles. (14)The standards and guidelines concern types of road, road and pedestrian conflict, and pavement classification.The minimum illuminance of a streetlight in the guidelines (14) is 3 lx.

Pavement failure
A pavement failure is a defect on the road surface resulting from the low quality of the street, a change in the road environment, or material degradation.11)(12) These defects result in different severities of accidents, so the issue must be resolved in order to improve the safety of citizens.In this case, government agencies involved in this issue should know every defect in order to have a precise plan to repair it.One task is to monitor each failure, which is commonly done visually, as can be seen in the example report from the Department of Rural Roads of Thailand (15) in Fig. 2.
The pavement failure can be measured from the roughness of the road using the international roughness index (IRI), which is an index that shows the roughness of a road for measuring longitudinal road profiles. (16)It basically uses the quarter-car vehicle model for calculation considering a linear spring of stiffness and a linear damper with a damping rate. (17)(19) The linear correlation between car speed and Z-axis acceleration is described by where the subscript i refers to the road section i, IRI i is the IRI, aZ i is the value on the Z-axis of the accelerometer, v i is the speed of the car, and C 0 , C 1 , and C 2 are coefficients of the equation for a particular car.These coefficients are estimated by the linear technique by minimizing error against actual IRIs.In Thailand, IRIs are recorded in the Central Road Database of Thailand, (20) so they can be used for determining precise coefficients.

Sensors
To measure street lighting, a photoresistor is used, and to detect pavement failure, an accelerometer and a gyro sensor are used.

Photoresistor
A photoresistor, also known as a light-dependent resistor (LDR), can be varied by the illumination or light energy received, so the output voltage is a measure of the brightness of the surrounding environment.

Accelerometer
An accelerometer is used to quantify the change in the velocity of the host device. (21)The sensor can measure the acceleration along three axes, X, Y, and Z, in meters per second squared (m/s 2 ); in this paper, they are called aX, aY, and aZ, respectively.In a general experiment, this sensor is set up in a car, as demonstrated in Fig. 3(a).We ignore the gravity force, so all values are zero when the car stops or moves at a constant speed.

Gyro sensor
A gyro sensor is used to measure the rotation rate of X, Y, and Z dimensions. (21)In this paper, gX, gY, and gZ in degrees per second (°/s) are used.If there is no rotation change, all values are zero.When a car pitches, rolls, and yaws; the values change as depicted in Fig. 3(b).

Data analysis
One task in our work is to identify pavement failures and distinguish them from speed bumps.Sensor and location data are logged in the dataset.To differentiate normal surfaces, failures, and speed bumps, some supervised classification methods (13) are used.

Decision tree
A decision tree (13) is a flowchart-like mathematical model for predicting the classification of an object by evaluating the values of object attributes in a flow decision.Each branch presents the outcome of an attribute and each leaf node is a class label, as shown in Fig. 4(a).

Linear classification
A linear classification (13) uses a line to separate data into two classes, as depicted in Fig. 4(b).The model is n i=0 a i x i + c, where x i is a feature, and a i and c are adjustable constants that result in minimum error verified by the labels of the actual classification.

Artificial neural network (ANN)
An ANN (13) is a set of artificial neurons and their connections for processing input signals in order to produce a classification output.Each of the neurons and connections has an adjustable weight that can increase or decrease the strength of the signal from the input to the output, as shown in Fig. 4(c).

Support vector machine (SVM)
An SVM (13) separates two classes by a space, i.e., a clear gap, which is as wide as possible, as shown in Fig. 4(d).This behavior can improve the overfitting issue of the classifier as well.The shape of the gap can be configured as a user-specified kernel.

Method
In order to obtain a visualization report about the quality of a street at nighttime in terms of street lighting and locations of pavement failures, data must be collected along the street and analyzed, and a visualization must be drawn on a map.We firstly implement a cyber-physical system, as depicted in Fig. 5.A device is installed on the car console, as demonstrated in Fig. 5(e), to collect data on driving and send them to the server.The sensors installed are a photoresistor, a gyro sensor, and an accelerometer, as well as a GPS, as depicted in Fig. 5(d).This experiment uses an MPU-5060 (22,23) sensor that includes an accelerometer and a gyro sensor.Basically, a calibration and a low-pass filter configuration are implemented by referring to the references, (22,23) and a high-pass filter for a complementary sensor fusion is applied by the algorithmic implementation. (24)In addition, the GPS is used to collect pairs of a latitude and a longitude.Throughout driving, the device collects all sensor data with timestamps every 500 ms.We also manually record any time points of pavement defects found on the map with a timestamp.Thus, this is the supervised classification with label "0" for a regular street surface and label "1" for a found defect.
Secondly, data are combined and stored in a cloud database for analysis, as shown in Fig. 5(b).An example of our processed dataset is demonstrated in Fig. 6.There are timestamps, latitudes, longitudes, light intensities, accelerations (aX, aY, and aZ), rotations (gX, gY, and gZ), and the supervised classifications of pavement failures.The accelerations and rotations are  Next, in order to understand the data characteristics, a scatter matrix of every pair of acceleration and rotation data with labels of pavement failures is plotted, as shown in Fig. 7.As we have a closer look at the visualization, some pairs can be simply separated by a linear classifier and some other pairs may need to be classified by a nonlinear method.Thus, we use different classification methods, (13) namely, decision tree, linear classification, ANN, and SVM, to analyze the dataset.Parameters of these methods are configured to support either linear or nonlinear separable data as follows: • The linear classification is implemented to perform classification analysis and find some key attributes by considering their weights resulting from the classifier model.• The decision tree model is configured by using the Gini index (13) to measure the quality of a split.• The configuration of ANN for our experiment is that there is one hidden layer having 3 units with a sigmoid activation function, the number of maximum iterations is 5000, the tolerance for the stopping criterion is 0.0001, and the learning rate is 0.001.• For the SVM, according to the visualization in Fig. 7, there are overlapped class distributions, and a radial basis function (RBF) kernel becomes a proper kernel for our experiment.In addition, the configuration of this classifier is that the penalty parameter (c) of the error term is 1.0, the kernel coefficient (gamma) is 0.3, the number of maximum iterations is 5000, and the tolerance for the stopping criterion is 0.0001.To find the proper classification method, we train and test each model using cross-validation to obtain the minimum root mean-square error (RMSE) and calculating a correlation for measuring the relationship between input and output. (13)In addition, we fit the coefficient of the IRI equation against the data from RoadNet. (20)astly, we plot the analytical results onto a map.For street lighting, if the illuminance is greater than 3 lx, as recommended by the guidelines, (14) the road is colored green, otherwise a dark line is used.For pavement failure, the location of each defect is plotted with a dot whose size corresponds to its IRI.

Results
Throughout the driving of a car (Honda Jazz model 2016) along a street in Suphanburi Province in Thailand, about 20000 entries of sensor data were collected, as displayed in Fig. 6.The experimental dataset includes street lighting at nighttime, regular street surfaces, pavement failures, and speed bumps.
Then, the data analysis is performed.The data from the accelerometer and gyro sensor are analyzed separately using the four key classification methods, and they are evaluated on the basis of the RMSE and correlation.Since RMSE indicates error, a near-zero value is described.In contrast, the correlation shows the relationship between the inputs and the output, so a nearone value is preferred.The result of our experiment is documented in Table 1.It is found that the analysis of the gyro sensor data provides a better result than that of the accelerometer data in terms of the RMSE and correlation.Moreover, the convergence test of each model is performed, as shown in Fig. 8.The linear classifier, ANN, and SVM converge into their stable RMSE, and as we observed, they are almost unchanged for iterations between 20 and 30, between 200 and 220, and between 5 and 15, respectively.However, we did not perform the convergence test for the decision tree, because each iteration of the decision tree is for splitting a node, but does not provide a complete classifier model as the former three models did.
In addition, the results from the four classification methods are not markedly different, so it can be considered that the classes of data are linear separable patterns.Upon a closer look at a simple method such as the linear classification, it shows that the equation 0.051 × |gX| + 0.063 × |gY| + 0.002 × |gZ| -0.133 > 0 describes the pattern when a pavement defect is found.This equation also implies that the pitch and roll rotations of a car are caused by pavement failure.Since the coefficients of gX and gY are similar, the equation can be simplified as where PF i is the pavement failure at location i.The positive PF i indicates that a pavement failure is found.Next, the proper coefficients of Eq. (1) for our car with a speed of 60-80 km/h are determined using the aZ values collected during driving on streets and adjusted by the official IRIs from RoadNet. (20)RoadNet can provide IRIs of a section of a road but not a particular location, so we use IRIs of road sections to tune appropriate coefficients by minimizing error.As a result, the IRI of our car (Honda Jazz model 2016) can be calculated using Eq.(3).It is noted that these coefficients are dependent on the elastic property of a car, and they must be recalculated when using a different car.
Finally, we can plot all data on street lighting and locations of pavement failures with their IRIs on a map as demonstrated in Fig. 9.We draw a route throughout our driving at night.A green road segment represents the area where the photoresistor on the windshield of our car receives a street light brightness of more than 3 lx.We also place a red dot at a location where PF is greater than 0, and its size corresponds to its IRI.Figures 1(b)-1(d) are example pavement failures that are classified as defects with high IRIs.

Discussion
Regarding the research outcome of monitoring the roadway lighting and pavement defects for nighttime street safety assessment using sensor data analysis and visualization, discussions are carried out in terms of materials and sensors, functionality, usability, and challenges.

Materials and sensors
Related approaches (9)(10)(11)(12) usually focus on the detection of road surface anomalies through the evaluation of Z-axis acceleration data (aZ).In practice, this approach encounters difficulty in distinguishing between a pavement failure and a speed bump, because any defect results in updown movement detected by the accelerometer.Thus, the use of rotations becomes an effective technique, as can be seen from our experimental results.The reason for this is that generally one of the front wheels of the car hits a pavement failure first, so the car immediately rotates and gX and gY values are altered as shown in Figs.10(c) and 10(d).Although a large defect may cover a road surface, its edge is not always straight across the road so the two front wheels of the car will not hit it at the same time.Unlike a pavement failure, a street bump is installed across the road, so both front wheels of a car hit it at the same time, which cause a change in only gX, as depicted in Fig. 10(b).Thus, the experimental results and this observation support each other, and this work confirms the effectiveness of using a gyro sensor in pavement failure detection.In addition, a photoresistor is used to measure the luminance on the street, and it can reveal the actual lighting condition on the street.

Functionality
When using sensors for detecting street lighting and pavement failures, the sensor data are analyzed to determine the locations of possible traffic accidents at nighttime, and the quality of the roadway at nighttime is represented on a map.In this case, all objectives set out at the beginning of this paper are met.

Usability
The map can display the coverage of street lighting and the locations of pavement defects.This visualization report was discussed with car users; they agreed that low lighting and large pavement defects decrease the degree of road safety, and drivers have heightened awareness when driving on unfamiliar routes at nighttime.In addition, this visualization report can support staff members of local government offices in monitoring the quality of the nighttime roadway in order to devise an effective maintenance plan, and it becomes a key documentation when initiating a plan for improving the quality of a road.

Challenges
As we informed, the experiment was done using only the 2016 Honda Jazz.It is known that an electronic stability control is embedded in this model and many car models in this age.This results in the absorption of the acceleration and the rotation of a car, (25) so sensor data gathered from different cars may not be exactly the same.In order to enhance the flexibility of our approach for supporting all cars with different absorber technologies and configurations, many car models from various automobile manufacturers must be tested, and an aspect about the absorption can be involved.In this case, a ride road course with different types of pavement failure should be invented for conducting future research in a closed system.
In addition, to move this research out into the real world, the analysis of a large amount of data is required to monitor the nighttime roadway.In this case, an eye should be kept on the use of large data storage, crowdsourcing, and the analysis of a large amount of data.

Conclusions
We attempted to monitor the quality of a nighttime roadway by evaluating street lighting and pavement defects.Our work provides an approach for the usage of sensors in a car and the collection of their data while driving on streets.The analysis of the sensor data showed that the gyro sensor is suited to detect pavement failures, because the rotations of a car when hitting a defect become key features in discriminating between failures and speed bumps.We also used a photoresistor to measure street lighting and an accelerometer to obtain data for calculating the severity of the failures in terms of a standard roughness index.After that, a visualization report was developed by displaying the quality of luminance on a street at nighttime and the locations of pavement defects with their severity levels.The visualization report enables users to recognize potentially dangerous locations on a nighttime road and this report can also be used for devising a precise plan of street maintenance.
In the future, to have a fully functional system for monitoring the quality of nighttime roadways, some other aspects such as careless driving behaviors of drivers, dangerous road bends, and sudden braking of cars must be considered.In this case, the analysis of a large amount of data will be required as well.

Fig. 2 .
Fig. 2. (Color online) Part of a report on pavement failure inspected manually: (i) starting point (kilometer marker), (ii) end point (kilometer marker) of observation of the road, (iii) pothole' position marked by red lines, and (iv) number of failures.

Fig. 7 .
Fig. 7. (Color online) Scatter matrices of acceleration (aX, aY, and aZ) and rotations (gZ, gY, and gZ) with class labels.(Note: a blue cross symbol is a regular road surface and a red dot is the observed pavement failure.)

Fig. 9 .
Fig. 9. (Color online) Visualization report for monitoring roadway lighting and pavement defects at nighttime.

Table 1
Experimental result of the analysis of sensor data by different classification methods.