# Speed Distribution Prediction of Freight Vehicles on Mountainous Freeway Using Deep Learning Methods

Authors: Yuren Chen; Yu Chen; Bo Yu
Journal: Journal of Advanced Transportation
 (2020)

---

## Abstract

Driving speed is one of the most critical indicators in safety evaluation and network monitoring in freight transportation. Speed prediction model serves as the most efficient method to obtain the data of driving speed. Current speed prediction models mostly focus on operating speed, which is hard to reveal the overall condition of driving speed on the road section. Meanwhile, the models were mostly developed based on the regression method, which is inconsistent with natural driving process. Recurrent neural network (RNN) is a distinctive type of deep learning method to capture the temporary dependency in behavioral research. The aim of this paper is to apply the deep learning method to predict the general condition of driving speed in consideration of the road geometry and the temporal evolutions. 3D mobile mapping was applied to obtain road geometry information with high precision, and driving simulation experiment was then conducted with the help of the road geometry data. Driving speed was characterized by the bimodal Gauss mixture model. RNN and its variants including long short-term memory (LSTM) and RNN and gated recurrent units (GRUs) were utilized to predict speed distribution in a spatial-temporal dimension with KL divergence being the loss function. The result proved the applicability of the model in speed distribution prediction of freight vehicles, while LSTM holds the best performance with the length of input sequence being 400 m. The result can be related to the threshold of drivers’ information processing on mountainous freeway. Multiple linear regression models were constructed to be a contrast with the LSTM model, and the results showed that LSTM was superior to regression models in terms of the model accuracy and interpretability of the driving process and the formation of vehicle speed. This study may help to understand speed change behavior of freight vehicles on mountainous freeways, while providing the feasible method for safety evaluation or network efficiency analysis.


---

## Body

## 1. Introduction

In the driving process of freight vehicles, driving speed is one of the most important indicators in safety evaluation and efficiency analysis. Currently, the speed prediction model plays an important role in obtaining the driving speed of vehicles [1]. On mountainous freeways, the poor terrain conditions allowed relatively unfavorable road geometry design, and combined vertical and horizontal alignments are not uncommon in mountainous freeways, which directly produces many accident-prone road sections [2]. Meanwhile, freight vehicles are always the most critical elements in the cause of accidents. Therefore, it is essential to study the regularity of speed change behavior of freight vehicles.On the selection of the variables in the input of the speed prediction model, parameters are mostly related to environmental conditions (e.g., road geometry, roadside vegetation, guardrail, and delineator) [3, 4]. On mountainous freeways in China, the unfavorable terrain condition allowed road alignment design with relatively lower standard. Combined vertical and horizontal alignments are not uncommon. With a tradeoff with acceptable cost, such alignments may force drivers to handle high-speed gradients, which can produce higher crash frequency [5–7]. Typical road alignment features include horizontal and vertical curvature, curve length, guardrails, roadside vegetation, and road delineator [8]. The previous studies agree that road geometry plays a dominant role affecting operating speed under most circumstances.Considering the possible difference between two-dimensional road design method and three-dimensional road scenario, speed prediction on three-dimensional freeway alignment attracts the attention of some researchers in recent years [9, 10]. In order to fully characterize the feature of road geometry, objective characteristics of the road alignment and drivers’ subjective perception in a 3D real space should both be considered [11, 12]. Driving speed serves as the most representative variable due to a clear correlation between drivers’ perception of the road and behavior change [13–16]. Meanwhile, studies which adopted sight distance as the input of the speed prediction model found that the index is highly correlated to driver’s operating speed, as well as driving safety [17–19].On the selection of the output in the speed prediction models, operating speed or other representative value of speed was selected to be the predicted value of the model [20–23]. In practice, drivers choose their driving speed according to the road condition including road geometry, roadside vegetation, guardrails, and traffic condition in the environment. Design speed of the road does not necessarily mean the actual driving speed. Operating speed, on the other hand, is a statistical value of the speed dataset. The value can be representative under most circumstances, but the detailed information of the whole speed dataset remains unrevealed. Numerous studies have also supported the view that the driving speed is subject to normal distribution or even multimodal distributions, as regarding to road condition and sample drivers. Some of the researchers tried to fit the distribution of speed by multimodal Gaussian or Bayesian distribution and reach favorable fitting performance [24, 25].On the selection of speed prediction models, regression is the most frequently used method in driving behavior prediction [26–30]. Various regression models such as linear regression, log-linear regression, nonparametric multivariate adaptive regression splines, and parametric logistic regression have all shown their adaption in different practical problems [4–6]. However, the majority of existing studies on speed prediction modeling treat the input as static variables, instead of considering speed changing process in time series. Although a few studies took the geometric features of previous and oncoming elements into consideration [31–33], the models were not able to match the actual driving process when negotiating with the complexity of the road environment. Some researchers also conducted valuable comparative studies based on the classification of road geometric features and road scenarios [12, 13], commonly with a great fitting performance, but not able to mimic actual driving process. For instance, for a cloud model based on fuzzy neural logic system, the input time sequence data were regarded as isolated variables, so the problem of correlations between input sequences remains [15]. Currently, the study on speed prediction model targeting freight vehicles is still insufficient.Recently, powerful deep learning methods have been applied to the transportation studies. Recurrent neural networks (RNNs), such as long-short term memory (LSTM), were developed based on bionics to capture long-term temporary dependency [34, 35], which made them effective in transportation studies [36]. Connections were created among hidden layers to transmit information. The application of RNN and its variants in traffic flow prediction and trajectory prediction also proved its advantages in processing time series data in other fields [37, 38]. In driving behavior field, LSTM had been applied to the prediction of vehicle trajectory based on naturalistic driving data and reached an accuracy of 96.83% in a 10 s prediction horizon [39]. A study on vehicle speed estimation was conducted based on in-vehicle accelerometer and gyroscope data. The study compared the robustness of LSTM model with various layers and the absolute error reached 1.61 km/h [40]. There also exist relevant studies such as identifying behavioral change among drivers using LSTM [41, 42]. However, the complex structure of LSTM usually took longer training time. As a relatively new model which was first introduced in 2014, gated recurrent units (GRUs) are derived from LSTMs, with the appearance of a simpler structure and a faster training speed, and are more convenient to solve. So far, GRUs have not been employed for operation speed prediction. The empirical study comparing GRU and LSTM showed mixed results [43–46].On the study on freight transportation, travel time, break-taking behaviors, emission, etc., are the most popular topics [47–49]. Some studies have taken the freight transportation process as a consecutive sequence, and uncertainty factors in the transportation process were taken into consideration as well [50–52]. These current studies mainly focus on the macroscopic scale; there are few research studies on the microcosmic behavior of freight vehicles such as speeding, accelerating and decelerating, speed change, etc. Meanwhile, the microcosmic behavior is the ultimate cause of the macrofeatures of freight transportation. Driving speed is one of the most critical indicators in safety evaluation and network monitoring in freight transportation. It is essential to conduct relevant studies to explore the mechanism of the microcosmic features of speed change behavior of freight vehicles.In summary, the speed prediction model connects the complex road environment and driving speed. Road geometry is always the representative variable in road environment, which holds the dominant place in speed prediction. The output of the prediction model varies around driving speed, but the most appropriate way to characterize driving speed is in the way of statistical distribution. On the selection of prediction model, the continuity of driving process should be taken into consideration, which means that the model should allow the input variables to be sequence data, while holding the ability to handle consecutive information at the same time.Therefore, the objectives of this paper are summarized as follows:(1)
Road geometry information should be obtained with high precision to provide input variables for the speed distribution model(2)
Deep learning network should be applied to predict speed changes of freight vehicles in consideration of the spatial dependencies and temporal evolutions of road geometry(3)
Driving speed should be obtained and characterized in a way of statistical distributionThis paper is organized as follows. In Section2, 3D mobile mapping is introduced as a method to obtain road geometry information, driving simulation and the Gauss mixture model are introduced, and RNN and its variants are presented. In Section 3, an empirical study is presented including driving simulation experiment and model training and testing results. In Section 4, the results are presented and analyzed. The last part concludes remarks and scopes of future studies.


## 2. Methodology

### 2.1. 3D Mobile Mapping

In order to provide road geometry data as the input variables of speed prediction model, information including road alignment condition, terrain condition, and roadside vegetation are all needed with high precision. 3D mobile mapping then becomes an ideal solution.The proposed 3D mobile mapping system utilized in the study was model TOPCON IP-S2, which combines 3 SICK 511 laser scanners, 1 high-precision GNSS antenna, 1 IMU module, and a Ladybug panoramic camera. The laser scanners provide LiDAR point clouds and images of the road environment with its sampling frequency being 75 Hz. The resolution of GLONASS and GPS signal received by the GNSS antenna provides the spatial coordinates of the point cloud. The IMU module guarantees the continuity of the GNSS data. The panoramic camera provides consecutive panoramic picture of the road environment with its sampling interval being 5 m. Registration of panoramic pictures and point clouds was made by the mainframe, giving RGB information of the pixels to the points. The facility and a sample of true color point cloud are presented in Figure1.Figure 1
3D mobile mapping facility and true color point cloud.
(a)
(b)In order to obtain adequate information about road geometry, road alignment 3D available sight distance was selected as the main index. Road alignment information includes curvature and curve length on horizontal, vertical, and cross sections, respectively. Fitting of road alignment on horizontal and vertical section information requires a series of points or a multisegment line along the road for reference. Considering that laser scanners could provide the reflection intensity information of target points, landmarkings can be easily distinguished from the point cloud by its higher reflection intensity. Therefore, landmarkings are selected to be reference in the fitting of road alignment. Sampling step on the landmarking was selected to be 5 m to guarantee sample density, as shown in Figure2.Figure 2
Extraction of landmarkings from point cloud.
(a)
(b)The fitting of the horizontal and vertical alignment was conducted in Civil 3D, as shown in Figure3.Figure 3
Fitting of horizontal and vertical alignment.
(a)
(b)The fitting result shows that the average bias with the fitted alignment and the source multisegment line was no more than 0.052 m, which is acceptable in practice.The information of cross section includes cross section width and cross slope. It is then essential to extract the points on the road cross section in the massive point cloud. The point cloud consists of consecutive scanlines, which are parallel to road cross sections. Meanwhile, the points on the road are always the lowest points on altitude compared with the surroundings. Therefore, traverse of the scanlines for the consecutive lowest points on the road surface could provide the road alignment information on the cross section. The extraction work was completed in Civil 3D, as shown in Figure4, where blue points are the points on road surface, and the sampling interval was set to 5 m.Figure 4
Extraction of cross sections from point cloud.
(a)
(b)
(c)The width of the cross section could be measured easily by the length of the road surface in the scanline. But the calculation of cross slope needs the spatial attitude of the road surface. Considering the high density of point cloud, the points on a scanline are not strictly a line but a narrow surface. Therefore, plane fitting was conducted by the least square method, and the tangent vectorKT⇀=m,n,p and normal vector KN⇀=A,B,C of the plane could be calculated. The cross slope φ0<φ<π/2 could then be calculated by(1)sinφ=Am+Bn+CpA2+B2+C2m2+n2+p2.Available sight distance (ASD) refers to the longest distance drivers can see on their normal height in their normal driving process, which reflects the visual field supply of road geometry condition. But the measurement of ASD is always challenging since the value of ASD is affected by road alignment design, roadside vegetation, terrain condition, etc. In order to measure ASD accurately, observers and targets are needed to be set in the real space of point cloud model. According to Chinese Design Standard for Road Alignment, the height of target obstacle was set to 0.1 m. Considering the height of the target four-axis freight vehicles, height of observers was set to 2.0 m. Observers and obstacle targets are placed every 5 m along the road. Spatial sight lines are then constructed between observers and targets. The works were completed in the Spatial Factory software, as shown in Figure5.Figure 5
Measurement of 3D ASD in point cloud.The measurement of ASD was conducted based on the actual road alignment. In order to detect collision between sight lines and road infrastructure or roadside vegetation, “Rigidbody” command in Spatial Factory was used to transform the points in the point cloud to cubed rigid bodies with the side length of 0.1 mm so that collision can be detected. Traverse of the sight lines was then conducted till collision. The number of the sight line was then recorded in Spatial Factory. The measurement of ASD could then be conducted by the “Measurement” command in Spatial Factory as shown in Figure6.Figure 6
Measurement of 3D ASD in point cloud.An example of 3D ASD measurement result is shown in Figure7. The measuring method mentioned above was applied to a 900 m road segment in China, a horizontal curve on a mountainous freeway.Figure 7
Measurement result of 3D ASD on a horizontal curve.


### 2.2. Driving Simulation

Traditional methods in obtaining driving behavior data include naturalistic driving experiment, video surveillance, and driving simulation experiments. Naturalistic driving experiment provides the opportunity to observe actual driving process. But the result is affected by the unexpected traffic condition, while the cost of the experiment is higher than the other ones. Video surveillance provides large quantity of data, but the continuity of the data sequence is difficult to guarantee. Driving simulation experiment enables participants to drive in a simulated environment with the help of a driving simulator. Data of driving behavior are easy to collect, and the variables in the road environment are easy to control; the cost of the experiment is also relatively low. At the same time, the simulated environment will be with high fidelity with the help of 3D mobile mapping. Therefore, driving simulation experiment was utilized to obtain driving behavior data.Firstly, the logical layer of the road environment model is constructed in HintCAD with the road alignment information extracted from 3D mobile mapping, as shown in Figure8.Figure 8
Logical layer of road environment.Then, the model layer was built by 3ds Max and Google Sketchup, and road infrastructures were imported together into the driving simulation software OKTAL SCANER, as shown in Figure9.Figure 9
Model layer of road environment.Finally, scripting of data acquisition and model control was completed in SCANER software. The steering performance of the vehicle was calibrated by the participants of the experiments so as to ensure the driving experience to be consistent with the actual environment. In order to guarantee the driving behavior data to be as continuous as possible, the sampling frequency was set to 10 Hz. Traffic flow was adjusted to 0 in the script to guarantee the influence of road conditions on driving behavior to be observed without disturbance.


### 2.3. Speed Distribution Model

Numerous studies have found that the distribution of driving speed is approximately subject to normal distribution or lognormal distribution. But it will be difficult for a single normal distribution to describe the speed distribution with the existence of large speed difference on a road section, while the speed difference will be more significant in freight vehicles since the performance of the vehicles varies from type to type. The actual distribution of driving speed might be bimodal or even multimodal. The Gaussian mixture model applies multiple Gaussian probability density functions to quantify any distribution with precision. The probability density function of GMM is described in the following formula:(2)fx=∑k=1Kλk∗12πσke−x−μk2/2σk2,where K is the number of Gaussian distribution in GMM and λk, μk, σk are the weight, mean value, and standard deviation of the Kth distribution, respectively. Theoretically, when K approaches infinite, the Gaussian mixture model can perfectly describe any kind of statistical distribution. In order to describe the distribution of freight vehicle speed with precision, avoiding the possibility of underfitting by any isolate distribution form, the Gaussian mixture model (GMM) is utilized to characterize the speed distribution of freight vehicles.In practice, GMM with three or more normal distribution may include one or more distributions with very small weights, which may cause massive unnecessary calculation in the fitting process. Generally, a bimodal GMM can be qualified in the fitting of speed distribution with considerable accuracy and limited variables to be determined. The function of bimodal GMM can be written as(3)fx=λ1∗12πσ1e−x−μ12/2σ12+λ212πσ2∗e−x−μ22/2σ22.Considering that there are two distributions in bimodal GMM, it is difficult to determine the ascription of the sample points in the training dataset. Maximum likelihood estimation will be no longer suitable to estimate the parameters in the model. Therefore, EM (expectation-maximization) algorithm is applied to fit the bimodal GMM. The algorithm firstly estimates the ascription of sample points (E-step), and then iteration is conducted based on the maximum of likelihood function (M-step). The conduction of E-step is shown in formula (4), where k is set to 0 in the first step, μ1, μ2, σ1, σ2, and λ1 are initiated to be random values, λ2 is a dependent variable in which λ2=1−λ1, N is the number of samples in the dataset, and m is the number of distributions in GMM. In the fitting of bimodal GMM, the value of m was set to 2.(4)Pmxn,θk=λm/σmke−1/2xn−μmk/σmk2∑m=1Mλm/σmke−1/2xn−μmk/σmk2,n=1,2,…,N,m=1,2.Then, the conduction of M-step is shown in the following formulas:(5)λmk+1=1N∑n=1NPmxn,θk,(6)μmk+1=∑n=1NxnPmxn,θkNλmk+1,(7)σmk+1=∑n=1NPmxn,θkxn−μmk+12Nλmk+11/2.The iteration ends when the inequality in Formula (8) holds. In order to avoid local optimum solutions, the solution should also hold the inequality in formulas (8) and (9). ελ, εμ, εσ, and εp are allowable error ranges of weight, mean value, standard deviation, and maximum likelihood function, and kmax is the maximum iteration number. Generally, the error benchmark could be set to 1%, and reasonable value of kmax could be 100.(8)λmk+1−λmk≤ελμmk+1−μmk≤εμσmk+1−σmk≤εσork>kmax,(9)logPxθ=∑n=1Nlog∑m=1Mλm2πσme−1/2xn−μm/σm2≤εp.


### 2.4. Deep Learning Methods

With the discussion of the weakness of traditional regression model, RNN (recurrent neural network) and its variants are ideal candidates with their great capability in handling sequence input data. The basic structure of RNN is shown in Figure10. The output of the former time step is set to be the input of the latter one, and information is transmitted between hidden layers in time domain. Memory units were constructed based on the transmission functions as shown in in formulas (10) and (11).(10)ht=tanhWxhxt+Whhht−1+bh,(11)tanhx=ex−e−xex+e−x.Figure 10
Structure of RNN and the memory unit.However, with the increase of the data scale, gradient vanishing or explosion will become a common problem in RNN and information may get lost. As a special variant of RNN, long short-term memory (LSTM) improves RNN by joining “input gate,” “output gate,” and “forget gate” into the memory unit to promise the information transmission with accuracy among the hidden layers. The structure of the memory cell is shown in Figure11. The transmission functions among the gates are shown in formulas (12)–(18).(12)ft=sigmoidWxfxt+Whfht−1+Wcfct−1+bf,(13)it=sigmoidWxixt+Whiht−1+Wcict−1+bi,(14)c˜t=tanhWxixt+Whiht−1+bc,(15)ct=ft⊗ct−1+it⊗c˜t,(16)ot=sigmoidWxoxt+Whoht−1+Wcoct+bo,(17)ht=ot⊗tanhct,(18)sigmoidx=11+e−x,where it is the status of input gate, which controls the information to update from the former memory unit, ft is the status of forget gate, which controls the information to forget from the former memory unit, and ot is the status of output gate, which controls the information to transmit to the next status.Figure 11
Structure of the memory unit in LSTM.The delicate designed structure of LSTM could handle the problem of gradient vanishing or explosion. But the complex structure may also increase the burden of training. And it will be easier for LSTM to be overfitting.Another variant of RNN is GRU (gated recurrent unit). This kind of variant developed the structure of memory unit by coupling the input gate and forget gate in LSTM into an update gate. The reset gate served as the output gate to control the recurrent connections, as shown in Figure12. The transmission functions among the gates are shown in formulas (19)–(22).(19)rt=sigmoidWxrxt+Whrht−1+br,(20)zt=sigmoidWxzxt+Whzht−1+bz,(21)h˜t=tanhWxhxt+rt⊗Whhht−1+bh,(22)ht=zt⊗h˜t+1−zt⊗ht−1,where rt is the status of reset gate, which decides the information to update from the former memory unit, and zt is the status of update gate, which controls the information to transmit to the next status.Figure 12
Structure of the memory unit in GRU.


## 2.1. 3D Mobile Mapping

In order to provide road geometry data as the input variables of speed prediction model, information including road alignment condition, terrain condition, and roadside vegetation are all needed with high precision. 3D mobile mapping then becomes an ideal solution.The proposed 3D mobile mapping system utilized in the study was model TOPCON IP-S2, which combines 3 SICK 511 laser scanners, 1 high-precision GNSS antenna, 1 IMU module, and a Ladybug panoramic camera. The laser scanners provide LiDAR point clouds and images of the road environment with its sampling frequency being 75 Hz. The resolution of GLONASS and GPS signal received by the GNSS antenna provides the spatial coordinates of the point cloud. The IMU module guarantees the continuity of the GNSS data. The panoramic camera provides consecutive panoramic picture of the road environment with its sampling interval being 5 m. Registration of panoramic pictures and point clouds was made by the mainframe, giving RGB information of the pixels to the points. The facility and a sample of true color point cloud are presented in Figure1.Figure 1
3D mobile mapping facility and true color point cloud.
(a)
(b)In order to obtain adequate information about road geometry, road alignment 3D available sight distance was selected as the main index. Road alignment information includes curvature and curve length on horizontal, vertical, and cross sections, respectively. Fitting of road alignment on horizontal and vertical section information requires a series of points or a multisegment line along the road for reference. Considering that laser scanners could provide the reflection intensity information of target points, landmarkings can be easily distinguished from the point cloud by its higher reflection intensity. Therefore, landmarkings are selected to be reference in the fitting of road alignment. Sampling step on the landmarking was selected to be 5 m to guarantee sample density, as shown in Figure2.Figure 2
Extraction of landmarkings from point cloud.
(a)
(b)The fitting of the horizontal and vertical alignment was conducted in Civil 3D, as shown in Figure3.Figure 3
Fitting of horizontal and vertical alignment.
(a)
(b)The fitting result shows that the average bias with the fitted alignment and the source multisegment line was no more than 0.052 m, which is acceptable in practice.The information of cross section includes cross section width and cross slope. It is then essential to extract the points on the road cross section in the massive point cloud. The point cloud consists of consecutive scanlines, which are parallel to road cross sections. Meanwhile, the points on the road are always the lowest points on altitude compared with the surroundings. Therefore, traverse of the scanlines for the consecutive lowest points on the road surface could provide the road alignment information on the cross section. The extraction work was completed in Civil 3D, as shown in Figure4, where blue points are the points on road surface, and the sampling interval was set to 5 m.Figure 4
Extraction of cross sections from point cloud.
(a)
(b)
(c)The width of the cross section could be measured easily by the length of the road surface in the scanline. But the calculation of cross slope needs the spatial attitude of the road surface. Considering the high density of point cloud, the points on a scanline are not strictly a line but a narrow surface. Therefore, plane fitting was conducted by the least square method, and the tangent vectorKT⇀=m,n,p and normal vector KN⇀=A,B,C of the plane could be calculated. The cross slope φ0<φ<π/2 could then be calculated by(1)sinφ=Am+Bn+CpA2+B2+C2m2+n2+p2.Available sight distance (ASD) refers to the longest distance drivers can see on their normal height in their normal driving process, which reflects the visual field supply of road geometry condition. But the measurement of ASD is always challenging since the value of ASD is affected by road alignment design, roadside vegetation, terrain condition, etc. In order to measure ASD accurately, observers and targets are needed to be set in the real space of point cloud model. According to Chinese Design Standard for Road Alignment, the height of target obstacle was set to 0.1 m. Considering the height of the target four-axis freight vehicles, height of observers was set to 2.0 m. Observers and obstacle targets are placed every 5 m along the road. Spatial sight lines are then constructed between observers and targets. The works were completed in the Spatial Factory software, as shown in Figure5.Figure 5
Measurement of 3D ASD in point cloud.The measurement of ASD was conducted based on the actual road alignment. In order to detect collision between sight lines and road infrastructure or roadside vegetation, “Rigidbody” command in Spatial Factory was used to transform the points in the point cloud to cubed rigid bodies with the side length of 0.1 mm so that collision can be detected. Traverse of the sight lines was then conducted till collision. The number of the sight line was then recorded in Spatial Factory. The measurement of ASD could then be conducted by the “Measurement” command in Spatial Factory as shown in Figure6.Figure 6
Measurement of 3D ASD in point cloud.An example of 3D ASD measurement result is shown in Figure7. The measuring method mentioned above was applied to a 900 m road segment in China, a horizontal curve on a mountainous freeway.Figure 7
Measurement result of 3D ASD on a horizontal curve.


## 2.2. Driving Simulation

Traditional methods in obtaining driving behavior data include naturalistic driving experiment, video surveillance, and driving simulation experiments. Naturalistic driving experiment provides the opportunity to observe actual driving process. But the result is affected by the unexpected traffic condition, while the cost of the experiment is higher than the other ones. Video surveillance provides large quantity of data, but the continuity of the data sequence is difficult to guarantee. Driving simulation experiment enables participants to drive in a simulated environment with the help of a driving simulator. Data of driving behavior are easy to collect, and the variables in the road environment are easy to control; the cost of the experiment is also relatively low. At the same time, the simulated environment will be with high fidelity with the help of 3D mobile mapping. Therefore, driving simulation experiment was utilized to obtain driving behavior data.Firstly, the logical layer of the road environment model is constructed in HintCAD with the road alignment information extracted from 3D mobile mapping, as shown in Figure8.Figure 8
Logical layer of road environment.Then, the model layer was built by 3ds Max and Google Sketchup, and road infrastructures were imported together into the driving simulation software OKTAL SCANER, as shown in Figure9.Figure 9
Model layer of road environment.Finally, scripting of data acquisition and model control was completed in SCANER software. The steering performance of the vehicle was calibrated by the participants of the experiments so as to ensure the driving experience to be consistent with the actual environment. In order to guarantee the driving behavior data to be as continuous as possible, the sampling frequency was set to 10 Hz. Traffic flow was adjusted to 0 in the script to guarantee the influence of road conditions on driving behavior to be observed without disturbance.


## 2.3. Speed Distribution Model

Numerous studies have found that the distribution of driving speed is approximately subject to normal distribution or lognormal distribution. But it will be difficult for a single normal distribution to describe the speed distribution with the existence of large speed difference on a road section, while the speed difference will be more significant in freight vehicles since the performance of the vehicles varies from type to type. The actual distribution of driving speed might be bimodal or even multimodal. The Gaussian mixture model applies multiple Gaussian probability density functions to quantify any distribution with precision. The probability density function of GMM is described in the following formula:(2)fx=∑k=1Kλk∗12πσke−x−μk2/2σk2,where K is the number of Gaussian distribution in GMM and λk, μk, σk are the weight, mean value, and standard deviation of the Kth distribution, respectively. Theoretically, when K approaches infinite, the Gaussian mixture model can perfectly describe any kind of statistical distribution. In order to describe the distribution of freight vehicle speed with precision, avoiding the possibility of underfitting by any isolate distribution form, the Gaussian mixture model (GMM) is utilized to characterize the speed distribution of freight vehicles.In practice, GMM with three or more normal distribution may include one or more distributions with very small weights, which may cause massive unnecessary calculation in the fitting process. Generally, a bimodal GMM can be qualified in the fitting of speed distribution with considerable accuracy and limited variables to be determined. The function of bimodal GMM can be written as(3)fx=λ1∗12πσ1e−x−μ12/2σ12+λ212πσ2∗e−x−μ22/2σ22.Considering that there are two distributions in bimodal GMM, it is difficult to determine the ascription of the sample points in the training dataset. Maximum likelihood estimation will be no longer suitable to estimate the parameters in the model. Therefore, EM (expectation-maximization) algorithm is applied to fit the bimodal GMM. The algorithm firstly estimates the ascription of sample points (E-step), and then iteration is conducted based on the maximum of likelihood function (M-step). The conduction of E-step is shown in formula (4), where k is set to 0 in the first step, μ1, μ2, σ1, σ2, and λ1 are initiated to be random values, λ2 is a dependent variable in which λ2=1−λ1, N is the number of samples in the dataset, and m is the number of distributions in GMM. In the fitting of bimodal GMM, the value of m was set to 2.(4)Pmxn,θk=λm/σmke−1/2xn−μmk/σmk2∑m=1Mλm/σmke−1/2xn−μmk/σmk2,n=1,2,…,N,m=1,2.Then, the conduction of M-step is shown in the following formulas:(5)λmk+1=1N∑n=1NPmxn,θk,(6)μmk+1=∑n=1NxnPmxn,θkNλmk+1,(7)σmk+1=∑n=1NPmxn,θkxn−μmk+12Nλmk+11/2.The iteration ends when the inequality in Formula (8) holds. In order to avoid local optimum solutions, the solution should also hold the inequality in formulas (8) and (9). ελ, εμ, εσ, and εp are allowable error ranges of weight, mean value, standard deviation, and maximum likelihood function, and kmax is the maximum iteration number. Generally, the error benchmark could be set to 1%, and reasonable value of kmax could be 100.(8)λmk+1−λmk≤ελμmk+1−μmk≤εμσmk+1−σmk≤εσork>kmax,(9)logPxθ=∑n=1Nlog∑m=1Mλm2πσme−1/2xn−μm/σm2≤εp.


## 2.4. Deep Learning Methods

With the discussion of the weakness of traditional regression model, RNN (recurrent neural network) and its variants are ideal candidates with their great capability in handling sequence input data. The basic structure of RNN is shown in Figure10. The output of the former time step is set to be the input of the latter one, and information is transmitted between hidden layers in time domain. Memory units were constructed based on the transmission functions as shown in in formulas (10) and (11).(10)ht=tanhWxhxt+Whhht−1+bh,(11)tanhx=ex−e−xex+e−x.Figure 10
Structure of RNN and the memory unit.However, with the increase of the data scale, gradient vanishing or explosion will become a common problem in RNN and information may get lost. As a special variant of RNN, long short-term memory (LSTM) improves RNN by joining “input gate,” “output gate,” and “forget gate” into the memory unit to promise the information transmission with accuracy among the hidden layers. The structure of the memory cell is shown in Figure11. The transmission functions among the gates are shown in formulas (12)–(18).(12)ft=sigmoidWxfxt+Whfht−1+Wcfct−1+bf,(13)it=sigmoidWxixt+Whiht−1+Wcict−1+bi,(14)c˜t=tanhWxixt+Whiht−1+bc,(15)ct=ft⊗ct−1+it⊗c˜t,(16)ot=sigmoidWxoxt+Whoht−1+Wcoct+bo,(17)ht=ot⊗tanhct,(18)sigmoidx=11+e−x,where it is the status of input gate, which controls the information to update from the former memory unit, ft is the status of forget gate, which controls the information to forget from the former memory unit, and ot is the status of output gate, which controls the information to transmit to the next status.Figure 11
Structure of the memory unit in LSTM.The delicate designed structure of LSTM could handle the problem of gradient vanishing or explosion. But the complex structure may also increase the burden of training. And it will be easier for LSTM to be overfitting.Another variant of RNN is GRU (gated recurrent unit). This kind of variant developed the structure of memory unit by coupling the input gate and forget gate in LSTM into an update gate. The reset gate served as the output gate to control the recurrent connections, as shown in Figure12. The transmission functions among the gates are shown in formulas (19)–(22).(19)rt=sigmoidWxrxt+Whrht−1+br,(20)zt=sigmoidWxzxt+Whzht−1+bz,(21)h˜t=tanhWxhxt+rt⊗Whhht−1+bh,(22)ht=zt⊗h˜t+1−zt⊗ht−1,where rt is the status of reset gate, which decides the information to update from the former memory unit, and zt is the status of update gate, which controls the information to transmit to the next status.Figure 12
Structure of the memory unit in GRU.


## 3. Empirical Analysis

### 3.1. Experimental Settings

Experiment was conducted on a section of G15 freeway from Xinchang to Baihe in Zhejiang Province, China. The 30 km length test segment is 2-lane mountainous freeway with a speed limit of 100 km/h, as shown in Figure13.Figure 13
The test road section.Firstly, 3D mobile mapping was applied on the road section to obtain information of road geometry and 3D ASD.Secondly, independent repeated driving simulation experiments were designed to reflect the characteristic of the driver group. In order to obtain enough sufficient training data for the fitting of speed distribution on any road sections, totally 40 freight vehicle drivers were recruited to take the experiment. The information of the participants is shown in Table1. Considering that there exist a certain number of female drivers of freight vehicles in China, the sample group contained 7 female participants to represent the real condition of the driver group of freight vehicles. The road environment model was built in SCANER based on the point cloud model. The vehicle type was set to be four-axis freight vehicles.Table 1
Information of participants.
Gender
Age
Driving experience
Male: 33Female: 7
Mean value: 34.4
Mean value: 7.3
SD: 2.9
SD: 2.2
Range: 31–47
Range: 4–11Each participant was asked to drive through the road section once (total of 40 independent repeated experiments). The participants were required to drive at a safe, reasonable, and comfortable speed according to the road environment on the SILAB driving simulator of Tongji University. Totally, 3000 groups of data were collected with 40 sample points of driving speed in a group.Thirdly, bimodal GMM fitting was conducted in each group of data. An example of bimodal GMM fitting of speed distribution is shown in Figure14.Figure 14
Example of bimodal GMM fitting result.As shown in Figure14, the histogram represents the statistical quantity of the observed driving speed. The probability density curve in solid line represents the fitted bimodal GMM, while the two-dotted line represents the two component distributions in the GMM. The parameters of the fitted bimodal GMM are shown in Table 2.Table 2
Parameters in the bimodal GMM fitting example.
Distribution
λ
μ
σ
1
0.73
89.97
5.60
2
0.27
101.62
4.20


### 3.2. Construction and Training of Deep Learning Models

Considering the stochastic characteristic of neural networks, optimized structure does not necessarily mean better performance. Tests are needed to verify the applicability of the three mentioned models in the prediction of driving speed. The three models were constructed with the same structure in Python, and the performance was then compared with the same set of training dataset.For the basic structure of the model, full-connected model was selected to improve potential performance of the model while avoiding limitations of artificial intervention.For the input variables of the models, totally 7 variables are selected to form the input vector, including road alignment features and 3D ASD, as shown in Table3.Table 3
Classification and explanation of input variables.
Variables
Explanation
K
h
Horizontal curvature
S
h
Horizontal curve length
K
v
Vertical curvature
S
v
Vertical curve length
K
c
Cross slope
S
c
Cross-section width
ASD
3D available sight distanceFor the output variables of the model, considering that driving speed was described in term of bimodal GMM, the output variables are set to be the parameters in the GMM, as shown in Table4.Table 4
Classification and explanation of output variables.
Variables
Explanation
λ
1
Weight of the 1st Gauss distribution
μ
1
Mean value of the 1st Gauss distribution
μ
2
Mean value of the 2nd Gauss distribution
σ
1
Standard deviation of the 1st Gauss distribution
σ
2
Standard deviation of the2nd Gauss distributionSinceλ2=1−λ1, there is no need for λ2 to take an additional spot in the output vector.For the selection of numbers of nodes in the hidden layer, there has not been universal method in determining the certain number of nodes in NN. Generally, the number of samples in the training dataset should be 2–10 times more than the number of connection weights in the hidden layers. Considering the number of nodes in the input layer and output layers, it is appropriate to select the number of nodes in the hidden layer to be 25.For the selection of numbers of hidden layers, it has been proved that more hidden layers could improve the accuracy of the model, but the generalization ability would decrease at the same time. Generally, the profit from increasing number of nodes is larger than the profit from increasing number of hidden layers. Therefore, the number of hidden layers is set to 1 in this study.For the selection of loss function, mean relative error (MRE), mean square error (MSE), and mean absolute error (MAE) are the representative ones to measure the accuracy of NN models. However, the aim of the models applied in this study is to predict an accurate distribution of speed. Prediction accuracy of any isolated parameters in the GMM will be less significant to reveal the performance of the model. It will be more appropriate to measure the precision of the predicted distribution by measuring its divergence with the actual distribution. Therefore, Kullback–Leibler divergence (KL divergence) was selected to be the loss function considering its physical significance in distribution comparison. The loss function is shown in formulas (23) and (24). The value of the function represents the difference between distribution Px and Qx.(23)KLPQ=∫PxlogPxQx=EPxlogPxQx,(24)KLPQ=0,Px=Qx,KLPQ>0,Px≠Qx.SinceKLPQ≠KLQP, Px was set to be the actual speed distribution and Qx was the predicted speed distribution.For the selection of length of input sequence, freight vehicle drivers’ perception and memorization should be taken into consideration. A short length of input sequence may not be able to cover all the necessary information, while longer length of input sequence may cause redundancy. It has been proved that short time memory lasts for no longer than 20 s. Assuming the driving speed to be 90 km/h on mountainous freeway, drivers will remember the information of former 500 m road condition. In order to find out an appropriate length of the input sequence, five different lengths of input sequence including 100 m, 200 m, 300 m, 400 m, and 500 m will be tested, respectively.The bias vectors and weight matrixes are initiated randomly between (−1, 1), and the optimization of the weight matrixes is completed by backpropagation through time (BPTT).According to the convention of the training of neural networks, the proportions of the training set could be 60–90% considering the scale of the dataset [53]. Considering that there are totally 3000 groups of data in the dataset, 2700 groups of data were used for the training and establishment of the model, and the remaining 300 groups were used to test the performance and validate the model.


## 3.1. Experimental Settings

Experiment was conducted on a section of G15 freeway from Xinchang to Baihe in Zhejiang Province, China. The 30 km length test segment is 2-lane mountainous freeway with a speed limit of 100 km/h, as shown in Figure13.Figure 13
The test road section.Firstly, 3D mobile mapping was applied on the road section to obtain information of road geometry and 3D ASD.Secondly, independent repeated driving simulation experiments were designed to reflect the characteristic of the driver group. In order to obtain enough sufficient training data for the fitting of speed distribution on any road sections, totally 40 freight vehicle drivers were recruited to take the experiment. The information of the participants is shown in Table1. Considering that there exist a certain number of female drivers of freight vehicles in China, the sample group contained 7 female participants to represent the real condition of the driver group of freight vehicles. The road environment model was built in SCANER based on the point cloud model. The vehicle type was set to be four-axis freight vehicles.Table 1
Information of participants.
Gender
Age
Driving experience
Male: 33Female: 7
Mean value: 34.4
Mean value: 7.3
SD: 2.9
SD: 2.2
Range: 31–47
Range: 4–11Each participant was asked to drive through the road section once (total of 40 independent repeated experiments). The participants were required to drive at a safe, reasonable, and comfortable speed according to the road environment on the SILAB driving simulator of Tongji University. Totally, 3000 groups of data were collected with 40 sample points of driving speed in a group.Thirdly, bimodal GMM fitting was conducted in each group of data. An example of bimodal GMM fitting of speed distribution is shown in Figure14.Figure 14
Example of bimodal GMM fitting result.As shown in Figure14, the histogram represents the statistical quantity of the observed driving speed. The probability density curve in solid line represents the fitted bimodal GMM, while the two-dotted line represents the two component distributions in the GMM. The parameters of the fitted bimodal GMM are shown in Table 2.Table 2
Parameters in the bimodal GMM fitting example.
Distribution
λ
μ
σ
1
0.73
89.97
5.60
2
0.27
101.62
4.20


## 3.2. Construction and Training of Deep Learning Models

Considering the stochastic characteristic of neural networks, optimized structure does not necessarily mean better performance. Tests are needed to verify the applicability of the three mentioned models in the prediction of driving speed. The three models were constructed with the same structure in Python, and the performance was then compared with the same set of training dataset.For the basic structure of the model, full-connected model was selected to improve potential performance of the model while avoiding limitations of artificial intervention.For the input variables of the models, totally 7 variables are selected to form the input vector, including road alignment features and 3D ASD, as shown in Table3.Table 3
Classification and explanation of input variables.
Variables
Explanation
K
h
Horizontal curvature
S
h
Horizontal curve length
K
v
Vertical curvature
S
v
Vertical curve length
K
c
Cross slope
S
c
Cross-section width
ASD
3D available sight distanceFor the output variables of the model, considering that driving speed was described in term of bimodal GMM, the output variables are set to be the parameters in the GMM, as shown in Table4.Table 4
Classification and explanation of output variables.
Variables
Explanation
λ
1
Weight of the 1st Gauss distribution
μ
1
Mean value of the 1st Gauss distribution
μ
2
Mean value of the 2nd Gauss distribution
σ
1
Standard deviation of the 1st Gauss distribution
σ
2
Standard deviation of the2nd Gauss distributionSinceλ2=1−λ1, there is no need for λ2 to take an additional spot in the output vector.For the selection of numbers of nodes in the hidden layer, there has not been universal method in determining the certain number of nodes in NN. Generally, the number of samples in the training dataset should be 2–10 times more than the number of connection weights in the hidden layers. Considering the number of nodes in the input layer and output layers, it is appropriate to select the number of nodes in the hidden layer to be 25.For the selection of numbers of hidden layers, it has been proved that more hidden layers could improve the accuracy of the model, but the generalization ability would decrease at the same time. Generally, the profit from increasing number of nodes is larger than the profit from increasing number of hidden layers. Therefore, the number of hidden layers is set to 1 in this study.For the selection of loss function, mean relative error (MRE), mean square error (MSE), and mean absolute error (MAE) are the representative ones to measure the accuracy of NN models. However, the aim of the models applied in this study is to predict an accurate distribution of speed. Prediction accuracy of any isolated parameters in the GMM will be less significant to reveal the performance of the model. It will be more appropriate to measure the precision of the predicted distribution by measuring its divergence with the actual distribution. Therefore, Kullback–Leibler divergence (KL divergence) was selected to be the loss function considering its physical significance in distribution comparison. The loss function is shown in formulas (23) and (24). The value of the function represents the difference between distribution Px and Qx.(23)KLPQ=∫PxlogPxQx=EPxlogPxQx,(24)KLPQ=0,Px=Qx,KLPQ>0,Px≠Qx.SinceKLPQ≠KLQP, Px was set to be the actual speed distribution and Qx was the predicted speed distribution.For the selection of length of input sequence, freight vehicle drivers’ perception and memorization should be taken into consideration. A short length of input sequence may not be able to cover all the necessary information, while longer length of input sequence may cause redundancy. It has been proved that short time memory lasts for no longer than 20 s. Assuming the driving speed to be 90 km/h on mountainous freeway, drivers will remember the information of former 500 m road condition. In order to find out an appropriate length of the input sequence, five different lengths of input sequence including 100 m, 200 m, 300 m, 400 m, and 500 m will be tested, respectively.The bias vectors and weight matrixes are initiated randomly between (−1, 1), and the optimization of the weight matrixes is completed by backpropagation through time (BPTT).According to the convention of the training of neural networks, the proportions of the training set could be 60–90% considering the scale of the dataset [53]. Considering that there are totally 3000 groups of data in the dataset, 2700 groups of data were used for the training and establishment of the model, and the remaining 300 groups were used to test the performance and validate the model.


## 4. Results

The comparison of the three models with different lengths of input sequence is shown in Table5; the values in the table refer to the average KL divergence between the predicted distribution and the actual distribution. An example of the predicted distribution of LSTM with the length of input sequence being 400 m and the actual distribution is shown in Figure 15. The parameters of the actual distribution and the predicted distribution are shown in Table 6.Table 5
KL divergence of the deep learning models with different lengths of input sequence.
Type of model
Length of the input sequence
100 m
200 m
300 m
400 m
500 m
RNN
0.44
0.35
0.32
0.32
0.32
LSTM
0.25
0.18
0.12
0.11
0.11
GRU
0.34
0.27
0.25
0.25
0.25Figure 15
An example of the predicted distribution and actual distribution.Table 6
Parameters in the predicted distribution and the actual distribution.
Variable
Parameters in the bimodal GMM
λ
1
μ
1
σ
1
λ
2
μ
2
σ
2
Actual
0.77
77.74
5.22
0.23
89.11
4.80
Predicted
0.75
78.03
5.19
0.25
88.54
4.69
KL divergence
0.12It can be found that either type of network shows its applicability in fitting the speed prediction model with the minimum value of the loss function being no more than 0.32. The best performance belongs to LSTM with the input sequence of 400 m with its KL divergence reaching 0.11. It is also worth noticing that LSTM and GRU always outperformed RNN in accuracy with the same length of input sequence. It can be inferred that the additional gates in RNN could partly solve the problem of time dependency. Among those, LSTM holds the best performance all the time. The simplified structure of GRU resulted in its poorer performance.Besides, suppose that the driving speed to be 90 km/h, a length of 400 m means a memorization span of 16 s, which means that drivers are able to remember the information of road geometry for about 16 s on mountainous freeway. The result is highly correlated with the terrain condition on mountainous freeways. The character of road geometry is likely to change in 400 in mountainous freeway, which is a relatively large burden for the freight vehicle drivers to take. So, it can be explained that drivers are likely to get used to the oncoming road condition and forget the previous information if there is a significant difference between the adjacent sections. The length of input sequence and the time span may change in different road conditions.In order to validate the proposed LSTM model, the study applied multiple linear regression to make a comparative study. Since there are five parameters in the bimodal GMM, five multiple linear regression models were constructed to predict the parameters, respectively. The adjustedR2 values of the models are shown in Table 7. It can be easily concluded that multiple linear regression is weaker in model accuracy and interpretability than the LSTM model since the adjusted R2 values of the models are all smaller than 0.3, which means that it is difficult for the model to predict the parameters with precision. Meanwhile, the structure of the model is inferior than LSTM in interpreting the driving process since the isolated input variables fail to reflect the sequence characteristics of the driving process.Table 7
AdjustedR2 of the multiple linear regression models.
Predicted parameter
AdjustedR2
λ
1
0.182
μ
1
0.272
μ
2
0.153
σ
1
0.208
σ
2
0.135However, the multiple linear regression could help to understand the mechanism of the road environment affecting vehicle speed. Taking the multiple linear regression model predictingμ1 as an example, as shown in Table 8, under the confidence level of 0.05, horizontal curvature, horizontal curve length, and 3D available sight distance have significant influence on one of the mean values of the GMM. The coefficient of the three variables can be interpreted as follows: the increase of horizontal curvature, horizontal curve length, and 3D available sight distance will lead to higher speed, while horizontal curvature has a most significant impact among the three variables.Table 8
Coefficient table of the multiple linear regression model predictingμ1.
Variables
Standardized coefficients
Sig.
K
h
0.375
0.011
S
h
0.158
0.009
K
v
−0.242
0.088
S
v
0.272
0.059
K
c
−0.249
0.093
S
c
0.110
0.686
ASD
0.144
0.020


## 5. Conclusion

Targeting the weakness of traditional speed prediction models, this study applies several types of deep learning methods based on RNN to predict speed distribution on mountainous freeways. RNN, LSTM, and GRU were trained and tested, respectively, based on a driving simulation dataset. The results suggest that(1)
It is reasonable to apply bimodal GMM to characterize the distribution of speed of freight vehicle, which improved the traditional method by using single normal distribution or lognormal distribution.(2)
RNN, LSTM, and GRU all show their applicability in speed prediction of freight vehicles in consideration of road geometry. LSTM outperforms RNN and GRU on most tasks, and GRU shows its slight advantage over RNN on this specific issue.(3)
The length of input sequence has a significant impact on training results of the models, which demonstrates the necessity of the application of RNN and its variants. Drivers of freight vehicles are proved to get affected by the consecutive road condition in their driving process. On mountainous freeway, drivers are likely to update their memorization of road condition with the threshold of 16 s, which is 400 in driving distance. The change of road geometry may be the main reason for the time span. The value of the time span may change in different road conditions. This could also explain that mountainous freeway always has accident-prone road sections with heavy information load for freight vehicle drivers to take.(4)
The accurate road geometry information provided by 3D mobile mapping may help to improve the reliability of driving simulation study and the results of the speed prediction model.(5)
LSTM is obviously superior to regression models in terms of the model accuracy and interpretability of the driving process and the formation of vehicle speed. Further research on regression models could be conducted targeting the mechanism of road environment affecting vehicle speed.The findings contribute to a better understand on freight vehicle drivers’ driving behavior on mountainous freeways. The study also provided important insights into the road geometry design and development of transportation safety strategies.In the future work, more elements in road environment and driving behavior could be included into the model. Effort could be put into freight vehicle drivers’ memorizing mechanism of road environment, and analysis of the information load for drivers could also be made.



---

*Source: 8953182-2020-01-10.xml*