Road Damaged Analysis (RODA) using Built-in Accelerometer Sensor in Smartphone

Road damage produces serious problems for the driver such as travel efficiency, vehicle value, and even driver safety. In some cases, road damage causes accidents and ends in death. Currently, road damage detection research extends to grow and present various approaches such as the implementation of an accelerometer sensor. However, the implementations face lacks of accuracy since unable to work in real-time and poor implementation. In the end, the system inadequate to identify damaged roads effectively. Therefore, a comprehensive study was proposed. Firstly, data collection is conducted by applying a low-pass filter to obtain accurate data. The next step is estimating the range value of the accelerometer graph. In the final step, the classification is performed to identify road conditions into smooth, medium and poor. Based on some experiments that have been done, the proposed method accurately recognizes road conditions by 86.67%. Keyword: Road, accelerometer, smartphone


Introduction
Damaged roads and potholes cause serious problems that impact the road efficiency, the value of the vehicle, even the safety of the driver along the trip [1], [2]. In some cases, drivers not only suffer material losses but also threaten life and even end in death [3], [4]. Those problems are experienced by most peoples of developing countries to developed countries [5], [6]. Therefore, road damage is required serious attention, especially early detection to identify which paths are damaged to reduce victims.
Nowadays, many studies conducted to identify damage to the road. Commonly, some of the research applied an image processing approach to identify damaged roads and potholes [6]- [8]. Despite giving accurate results, the implementation of the image processing method encountered dilemmas when employed in the rainy weather because the road becomes wet and dirty. Besides, this has an influence on the accuracy of the method during the analysis process.
There are several studies combine image processing approaches with machine learning methods to gain maximum results [8], [9]. Although it provides precise results, the employment of machine learning demands large resources since it requires complex computing that effects in slowing down the analysis process.
Another alternative is to use sensing technology such as an accelerometer to gain information on the road surface. An accelerometer has 3-axis like x, y, and z that has a value describes the vibration rate. Based on observations of those values, the method adequate to recognize road conditions well [10], [11]. Data obtained from the accelerometer are investigated using machine learning methods to gain accurate results. On the other hand, those studies only distinguish the road into smooth and non-smooth which indicates potholes. Therefore, a new approach is proposed to enhance the analysis process to obtain accurate results. The proposed method utilizes the accelerometer sensor in the smartphone since it is equipped with sensing technologies which are proven in several studies. A low-pass filter is performed to obtain data precisely. Afterward, the data are investigated using range value estimation which provides a mechanism to reveal accelerometer values that range from low to high. The final step is a classification phase to identify the road conditions into smooth, medium, and poor.
The contribution of this research is to present a comprehensive road condition information that can be utilized by Google Maps, Google Street View or Waze to precisely visualize the length of the damaged road. Additionally, it improves alertness and warns the driver during driving, especially at night. Moreover, the proposed method is efficiency to assist the government to arrange an optimal allocation for road infrastructure development and maintenance.

Related Works
Today, most research on-road damage and potholes detection on smartphones implements Accelerometer and Gyroscope sensors. Accelerometer and Gyroscope is a type of motion sensor that is embedded in a smartphone to observe device motion or movements such as tilt, shake, rotation, and swing. Motion sensors are used to reflect the physical environment where the smartphone is located. For instance, it carried when running and biking or even placed on the dashboard inside the car [12].
Some of the studies have confirmed the superiority of both sensors and show satisfactory results such as control mobile application, energy estimation, and sleepiness detection [13]- [15]. It is more effective than applying a method based on image processing because it lacks of the computational process and found obstacles when implemented in rainy weather.
Allouch et al. [16] utilize accelerometer and gyroscope sensors to recognize highway conditions. The first step is collecting data from both sensors and perform a low-pass filter from 3-axis. Afterward, Allouch et al. perform feature extraction to obtain accurate results. In the selection process, the Correlation-based Feature Selection (CFS) method is adopted to reduce irrelevant information. Allouch et al. choose one of three methods (Decision Tree C4.5, and Support Vector Machine (SVM), and Naive Bayes) to classify road conditions based on the best result of conducted experiments. Despite showing accurate results, some weaknesses were found in this study. In the feature selection process, the research involves the CFS method which is tested on the WEKA application and conducted separately from the smartphone. Meanwhile, the classification method is very complicated and requires a high computing process. Besides, this research is only able to divide roads into 2 categories which are smooth and poor conditions. Accelerometer and Gyroscope have different functions. Gyroscope is used to identify the position, rotation, and orientation of smartphones as implemented in most gaming applications. Meanwhile, the Accelerometer is commonly used to estimate acceleration, vibration, and impact of the smartphone. Therefore, in this study, the accelerometer sensor is preferred instead of the gyroscope because it is more suitable for identifying vibrations inside the car caused by poor road conditions. Gueta et al. [17] used an accelerometer sensor to detect gaps and potholes on the highway. The proposed method implements temporal and spectral feature analysis. Temporal analysis is taking 150 sample data for 3 seconds with a maximum amplitude of 12.92 m/s2. This method serves to calculate the magnitude, variance, and speed of the accelerometer sensor. Meanwhile, Spectral Feature Analysis is the process of analyzing the amplitude of vibrations generated using the Morlet Wavelet method. At the classification stage, Gueta et al. apply the Vector Machine Classifier based on the results of the temporal and spectral features. Based on some experiments, Gueta et al. obtained an accuracy of 86.15%. There are several weaknesses in this study. The proposed method is only be applied to highways which have few patches, gaps, and potholes. Besides, Gueta et al. didn't use the preprocessing stage on the accelerometer sensor to reduce noise. Additionally, during the testing process, the method only accurately discovers anomalies when driving at high speed because it requires vibrations with high amplitude.

Proposed Method
This research is organized into 3 stages: Data Collection, Range Value Estimation, and Road Damage Classification as shown in Figure 2. All stages of this study are obtained on smartphones unlike previous studies conducted in separate devices. It aims to address the road damage analysis process work real-time and flexible. Besides, the smartphone is currently equipped with different sensors that have been tested in various fields.

Data Collection
This stage has an important role in road damaged analysis. First, activate sensors and select the accelerometer sensor specifically in a smartphone. Afterward, generate three orthogonal contain x, y and z axes of an accelerometer sensor along with the value based on smartphone motion.
Next, perform a low-pass filter to reduce noise and isolate the gravitational force that is unnecessary but reveals during the process. Low pass filter is a filter that is commonly used in an electronic device which passes low-frequency signals and rejected high-frequency signal. In this research, each of triaxial accelerometer will be preprocessed with a low-pass filter.
Algorithm 1 Low-pass filter 1: procedure LOWPASSFILTER 2: loop: 3: 4: return y Algorithm 1. illustrates a low-pass filter stage. x[i] is an array value of x, y and z axes obtained in real-time. Meanwhile, y[i] consist of 3-axes and shows the final value of the filtration process. While is a low-pass weight that will be applied to the filtration process which is set at 0.8.
During the data collection process, sometimes cars pass through potholes. It has an impact on smartphone motion not only horizontally but also vertically. Horizontal movement is also known as acceleration represented by x and y axes, while vertical motion is represented by the z-axis. Therefore, magnitude calculation is performed to combine values from all 3-axis and to keep the measurement results accurate. It also anticipates the orientation of the smartphone that is unappropriated, for example switching from vertically or horizontally and vice versa.   The results of the data collection stage are displayed in a graph to easily analyzed, as shown in Figure 4. The next phase will investigate the range of values during vibrations that occur on the smartphone.

Range Value Estimation
This section aims to find the range value between two points adjacent to each other as in Figure 4. The data is displayed in real-time so it takes a special algorithm to calculate precisely.
When the system starts, the first point will be marked as an array i to 0 or written as i[0] and the second point as i [1]. Then the distance between the two adjacent points will be calculated. For example, if i[0] is 8 m/s 2 and the second point is 6m/s 2 , then the range or difference is 2m/s 2 . When the system increments and array i has a value of 2 (i [2]), the value in i[1] will be assigned to array i[0] and the value in array i [2] is initiated into array i[1] so that the calculation only involves 0 and 1 arrays.  Absolute value is applied to maintain the value always in a positive number because sometimes the result is a negative amount. Algorithm 2. explains the calculation of the range value at this stage. The algorithm is constructed to keep estimations as easy as possible so that the system works efficiently. Figure 5. illustrates the steps of range value estimation in Algorithm 2. The range values are represented as a, b, c and d and will be calculated in the next section.

Road Damage Classification
The last stage is the classification of road conditions based on the sum of the difference in value within a certain period. The system is proficient to generate as many as 14-15 points and calculate 13-14 values between points in a second when the system is started. However, the length of time of observation for determining road conditions will be further investigated. In this study, road conditions are divided into smooth, medium and poor. Figure 6. shows the classification of road conditions based on the accelerometer sensor. Smooth states the stable road conditions that verified by the accelerometer graph shown in Figure 6(a). Medium states that the bumpy road conditions are caused by holes and cracks as seen in Figure 6 (b). It can be seen in the graph which starts to show a decrease and increase in value that is higher than the smooth conditions. Whereas poor states that road conditions are dominated by potholes and damaged as seen in Figure 6 (c). It can be seen from the accelerometer graph which is dominated by raising and degrading the value.

Results and Analysis
Experiments were taken along rural roads by driving the car for 30-40 minutes and covered a distance about 20 kilometers at speeds of between 10-30 km/h. The data was acquired using an Isuzu Panther powered by 2500cc that manufactured in 2005. The smartphone is equipped with Octa-core CPU 2.0 GHz, 3GB RAM, and an Accelerometer Sensor. The device is placed on the dashboard inside the car using a phone car holder.
The first step is to analyze the optimal length of time to observe road conditions. The proposed method capable to generate 14-15 points in a second. The observation time is divided into 5, 10, 15 and 20 seconds. Each interval is capable to produce 72, 143, 216, and 289 points. The distance between points (range values) will be accumulated at the end of the calculation. It aims to accurately distinguish road conditions into smooth, medium and poor.
During the testing phase, the accelerometer graph does not always display significantly results. Sometimes there is a small increase in the graph even when the road conditions are relatively poor. While the system observes for 5 seconds, the analysis of road conditions is still less than optimal. That is because the number of points used still does not meet to distinguish road conditions precisely.
The most optimal result is when the system applies an observation time of 10 seconds. When the system applies observation times 15 and 20 seconds, the system is also able to detect damaged roads accurately. There are no specific studies to determine how long observations are, but Amirgaliyev et al. [10] applied time windows for 10 seconds. Besides, in some experiments, the interval of 15 and 20 seconds requires longer iterations, so it is not recommended to implement this period.
The next analysis aims to determine the accumulation of accelerometer range values to classify road conditions into smooth, medium, and poor. An observation is arranged for 10 seconds and generated 143 points. Table 1. shows the distribution of range values for each road condition. For each row, 15 experiments were performed and the results were analyzed using precision estimation.
Precision is performed to estimate the number of True Positives (TP) and False Positive (FP) to evaluate the performance of the proposed method. The description of the precision estimation variable is as follows:  True Positive (TP); determined when both of the actual value and the detection result worth "Yes".  False Positive (FP); determined when the actual value worth "No" and the detection result worth "Yes".
Some experiments sometimes show inaccurate results. For instance, in the first row, the smooth conditions showed accumulations ranging from 0-100 m/s 2 , the condition of the medium road was between 101-180 m/s 2 , and the poor condition was more than 180 m/s 2 . The proposed method capable to identify 7 True Positive and 8 False Positive of 15 attempts, so the precision can be estimated by performs Equation 2 and obtain as 46.67%. The system acquires the best result at fourth row when it applies an accumulation of 0 -160 m/s 2 under smooth, 161 -240 m/s 2 on the medium, and more than 240 m/s 2 under poor road conditions. The proposed method is adequate to identify 13 True Positive and 2 False Positive and gain the precision as 86.77%    The Performance of an application is also tested. It intended to figure out the efficiency of some resources regarding CPU, Memory, and Battery of execution of the proposed system. Some automation testing platform can be adapted to measure the performance. However, Android Profiler prefer to employ rather than perform other tools since capabilities for monitoring and providing real-time data of mobile resources. Android Profiler capable to reveal all information regarding user activity, input, and even screen rotation [18]. . shows CPU Usage for testing phase for 70 seconds. At 0-5 seconds after running, CPU usage has increased by up to 32%. Afterward, CPU usage has decreased slowly to stable by 20.4%. At idle or standby position, the CPU shows 12%. After the data collection phase operated in the 59th second, the CPU usage increases a maximum works by 34%. It can be concluded that the CPU usage to run an application is very light, which is between 12-34%. . shows Memory Usage in the testing phase of the proposed system for 70 seconds. Android Profiler capable to shows memory allocation in a timeline and separate into 7 categories. Java means memory allocated from Java code by 9.6 MB. Native means the capability of the system to handle various tasks such as image and other graphics by 23.4 MB. Meanwhile, Memory used for graphics buffer queues that display on the screen by 27.7 MB. In the end, all memory used during the testing phase of the proposed system as 88.4 MB. It indicates that memory usage is extremely low compared to the entire smartphone memory.
Meanwhile, Figure 10. illustrates Battery Usage labeled as Energy in the testing phase of the proposed method for 70 seconds. Android Profiler distinguishes battery level into 3 categories i.e. Light, Medium, and Heavy. At the moment system launched, the battery used slowly increases from Light to Medium. After 20 seconds of running, the battery level decreases slowly to stable at Light level and back to Medium when performing an input event but mostly Light. It is concluded that during the testing phase, the proposed system requires low energy and won't drain the battery consumption.
The proposed method has some improvements compared to the previous studies as seen in Table 2. The proposed method adequate to work in real-time compared to the previous studies since the computing processes is done within a smartphone. Road conditions effectively classified into three categories: smooth, medium, and poor while Amirgaliyev et al. [10] is only qualified to separate road conditions into smooth and non-smooth alone (also known as poor condition). Figure 11. Battery Usage Meanwhile, Carlos et al. [11] applied support vector machine (SVM) and thirdparty applications such as the Pothole Lab to analyze road conditions. Although it shows satisfying result in some experiment, the study has some weakness. First, this study didn't apply preprocessing phase so that the validity of final result can be questioned. Secondly, the research incapable to recognize road conditions in real-time since an implementation of machine learning that requires high computation process. The proposed method also capable to identify road conditions at low speeds while Harikrishnan et al. [19] require high speeds to obtain greater vibrations to make the system more accurate.

Conclusion
In this study, a new method is designed to recognize and classify road conditions utilizing an accelerometer sensor on a smartphone. The proposed method is effective to identify and classify road conditions into smooth, medium, and poor. The research also improved the lack of previous studies and provided new approaches to investigate road conditions in real-time. Based on some experiments that have been conducted, the proposed method efficiently identifies road conditions with an accuracy of 86.67%. In future works, some improvements will be applied especially at the quantification stage using new techniques such as signal preprocessing to analyze the accelerometer graph and recognize road conditions more quickly. Furthermore, the system will collaborate with other sensors and methods to identify the length of the damaged road precisely.