This application claims priority to Taiwan Application Serial Number 105113285, filed on Apr. 28, 2016, which is herein incorporated by reference.
The present invention relates to a vehicle speed prediction method.
The existing traffic prediction mechanism comprises artificial neural network calculation, data prospecting, machine-learning, statistical analysis, and fuzzy algorithm. The above traffic prediction mechanisms merely use long-term or short-term prediction. If only using short-term prediction, namely, just using short-term data to evaluate, as the prediction time increases, the accuracy will be reduced. However, if only using long-term prediction, namely, just using long-term data to evaluate, as traffic accident is appeared or be under construction, the long-term prediction system cannot reflect instantly. Therefore, the accuracy will also be reduced.
The present invention provides a vehicle speed prediction method. The present invention combines short-term and long-term vehicle speed data to evaluate the predicted vehicle speed and calculates the route running time according to a predicted vehicle speed of each road.
An aspect of the disclosure is to provide a vehicle speed prediction method, adapted for calculating a predicted vehicle speed at a predicted time for a selected road, wherein the vehicle speed prediction method is operated on a processing device, comprising the following steps: calculating a first predicted vehicle speed according to a short-term vehicle speed data through the processing device; calculating a second predicted vehicle speed according to a long-term vehicle speed data through the processing device; and multiplying the first predicted vehicle speed by a first weight, multiplying the second predicted vehicle speed by a second weight, and accumulating the above two results to obtain a mixed predicted vehicle speed through the processing device. Wherein the short-term vehicle speed data is defined as vehicle speed data of all vehicles driven on the selected road within a specific time frame before the predicted time, and the long-term vehicle speed data is defined as vehicle speed data of all vehicles driven on the selected road within at least one specific period before the predicted time.
In one embodiment of the present invention, wherein the specific period is defined as one day, one week, one month, or one year.
In one embodiment of the present invention, wherein a sum of the first weight and the second weight is one.
In one embodiment of the present invention, wherein the calculation steps of the first predicted vehicle speed are defined as follows: calculating an accumulation of multiplying a first statistical vehicle speed by a third weight at different time point; calculating an accumulation of multiplying a first error by a fourth weight at different time point; and calculating a sum of the above two results, and the sum is defined as the first predicted vehicle speed. Wherein the first error is defined as a difference between a real vehicle speed and a predicted vehicle speed at each time point, and the first statistical vehicle speed is defined as an average vehicle speed of all driven vehicles on the selected road at each time point.
In one embodiment of the present invention, wherein a value of the third weight at different time points is different, a value of the first statistical vehicle speed at different time points is different, a value of the fourth weight at different time points is different, and a value of the first error at different time points is different.
In one embodiment of the present invention, wherein the calculation steps of the second predicted vehicle speed are defined as follows: calculating an accumulation of multiplying a second statistical vehicle speed by a fifth weight at different time point; calculating an accumulation of multiplying a second error by a sixth weight at different time point; and calculating a sum of the above two results, and the sum is defined as the second predicted vehicle speed. Wherein the second error is defined as a difference between a real vehicle speed and a predicted vehicle speed at each time point, and the second statistical vehicle speed is defined as an average vehicle speed of all driven vehicles on the selected road at each time point.
In one embodiment of the present invention, wherein a value of the fifth weight at different time points is different, a value of the second statistical vehicle speed at different time points is different, a value of the sixth weight at different time points is different, and a value of the second error at different time points is different.
An aspect of the disclosure is to provide a vehicle speed prediction method, adapted for calculating a repeated-k-times mixed predicted vehicle speed at a predicted time for a selected road, wherein the vehicle speed prediction method is operated on a processing device and the k is a positive integer, comprising the following steps: calculating a repeated-k-times short-term predicted vehicle speed according to a short-term vehicle speed data through the processing device, wherein the short-term vehicle speed data is defined as vehicle speed data of all vehicles driven on the selected road within a specific time frame before the predicted time; calculating a repeated-k-times long-term predicted vehicle speed according to a long-term vehicle speed data through the processing device, wherein the long-term vehicle speed data is defined as vehicle speed data of all vehicles driven on the selected road within at least one specific period before the predicted time; and using the repeated-k-times short-term predicted vehicle speed and the repeated-k-times long-term predicted vehicle speed to calculate the repeated-k-times mixed predicted vehicle speed through the processing device, wherein the repeated-k-times mixed predicted vehicle speed is obtained through multiplying the repeated-k-times short-term predicted vehicle speed and the repeated-k-times long-term predicted vehicle speed by different weights respectively.
In one embodiment of the present invention, wherein steps of the repeated-k-times mixed predicted vehicle speed is obtained through multiplying the repeated-k-times short-term predicted vehicle speed and the repeated-k-times long-term predicted vehicle speed by different weights respectively comprises the following step: multiplying repeated-k-times short-term predicted vehicle speed by a first specific weight, multiplying repeated-k-times long-term predicted vehicle speed by a specific second weight, a sum of the above results is defined as the repeated-k-times mixed predicted vehicle speed, wherein the first specific weight is defined as the kth power of x, the x is a numerical value that is greater than zero and smaller than one, and sum of the first specific weight and the second specific weight is one.
In one embodiment of the present invention, wherein the calculation steps of the repeated-k-times short-term predicted vehicle speed are defined as follows: calculating an accumulation of multiplying a repeated-(k−i)-times short-term predicted vehicle speed by a third specific weight at different time point; calculating an accumulation of multiplying a first statistical vehicle speed by a fourth specific weight at different time point; calculating an accumulation of multiplying a first predicted error by a fifth specific weight at different time point; calculating an accumulation of multiplying a first error by a sixth specific weight at different time point; and calculating a sum of the above four results, and the sum is defined as the repeated-k-times short-term predicted vehicle speed. Wherein the first error is defined as a difference between a real vehicle speed and a predicted vehicle speed at each time point, the i is a positive integer, and the first statistical vehicle speed is defined as an average vehicle speed of all driven vehicles on the selected road at each time point.
In one embodiment of the present invention, wherein a value of the third specific weight at different time points is different, a value of the repeated-(k−i)-times short-term predicted vehicle speed at different time points is different, a value of the fourth specific weight at different time points is different, a value of the first statistical vehicle speed at different time points is different, a value of the fifth specific weight at different time points is different, a value of the first predicted error at different time points is different, a value of the sixth specific weight at different time points is different, and a value of the first error at different time points is different.
In one embodiment of the present invention, wherein the calculation steps of the repeated-k-times long-term predicted vehicle speed are defined as follows: calculating an accumulation of multiplying a second statistical vehicle speed by a seventh specific weight at different time point; calculating an accumulation of multiplying a second error by a eighth specific weight at different time point; and calculating a sum of the above two results, and the sum is defined as the repeated-k-times long-term predicted vehicle speed. Wherein the second error is defined as a difference between a real vehicle speed and a predicted vehicle speed at each time point, the i is a positive integer, and the second statistical vehicle speed is defined as an average vehicle speed of all driven vehicles on the selected road at each time point.
In one embodiment of the present invention, wherein a value of the seventh specific weight at different time points is different, a value of the second statistical vehicle speed at different time points is different, a value of the eighth specific weight at different time points is different, and a value of the second error at different time points is different.
It is to be understood that both the foregoing general description and the following detailed description are by examples, and are intended to provide further explanation of the invention as claimed.
The invention can be more fully understood by reading the following detailed description of the embodiment, with reference made to the accompanying drawings as follows:
Reference will now be made in detail to the present embodiments of the invention, examples of which are illustrated in the accompanying drawings. Wherever possible, the same reference numbers are used in the drawings and the description to refer to the same or like parts.
The present invention provides a vehicle speed prediction method. The present invention combines short-term and long-term vehicle speed data to evaluate the predicted vehicle speed and calculates the route running time according to a predicted vehicle speed of each road.
The vehicle speed prediction method is divided into three steps: a collecting step, a model-building step, and a prediction step.
At the collecting step, the vehicle speed prediction method of the present invention collects historical data of vehicle speed for each road in the city.
Next, the model-building step is operated. In this step, firstly, the short-term predicted vehicle speed and the long-term predicted vehicle speed are calculated respectively. In the vehicle speed prediction method of the present invention, each road is an independent object. The vehicle speed prediction method of the present invention builds ARIMA (Autoregressive Integrated Moving Average) model by using historical data of vehicle speed for each road and uses least square mathematic method to obtain parameters of the ARIMA model.
The calculation steps of the first predicted vehicle speed are defined as follows: calculating an accumulation of multiplying a first statistical vehicle speed by a third weight at different time point; calculating an accumulation of multiplying a first error by a fourth weight at different time point; and calculating a sum of the above two results, and the sum is defined as the first predicted vehicle speed. Wherein the first error is defined as a difference between a real vehicle speed and a predicted vehicle speed at each time point, and the first statistical vehicle speed is defined as an average vehicle speed of all driven vehicles on the selected road at each time point. The value of the third weight at different time points is different, the value of the first statistical vehicle speed at different time points is different, the value of the fourth weight at different time points is different, and the value of the first error at different time points is different.
The calculation steps of the second predicted vehicle speed are defined as follows: calculating an accumulation of multiplying a second statistical vehicle speed by a fifth weight at different time point; calculating an accumulation of multiplying a second error by a sixth weight at different time point; and calculating a sum of the above two results, and the sum is defined as the second predicted vehicle speed. Wherein the second error is defined as a difference between a real vehicle speed and a predicted vehicle speed at each time point, and the second statistical vehicle speed is defined as an average vehicle speed of all driven vehicles on the selected road at each time point. The value of the fifth weight at different time points is different, the value of the second statistical vehicle speed at different time points is different, the value of the sixth weight at different time points is different, and the value of the second error at different time points is different.
The calculation steps of the repeated-k-times short-term predicted vehicle speed are defined as follows: calculating an accumulation of multiplying a repeated-(k−i)-times short-term predicted vehicle speed by a third specific weight at different time point; calculating an accumulation of multiplying a first statistical vehicle speed by a fourth specific weight at different time point; calculating an accumulation of multiplying a first predicted error by a fifth specific weight at different time point; calculating an accumulation of multiplying a first error by a sixth specific weight at different time point; and calculating a sum of the above four results, and the sum is defined as the repeated-k-times short-term predicted vehicle speed. Wherein the first error is defined as a difference between a real vehicle speed and a predicted vehicle speed at each time point, the i is a positive integer, and the first statistical vehicle speed is defined as an average vehicle speed of all driven vehicles on the selected road at each time point. The value of the third specific weight at different time points is different, the value of the repeated-(k−i)-times short-term predicted vehicle speed at different time points is different, the value of the fourth specific weight at different time points is different, the value of the first statistical vehicle speed at different time points is different, the value of the fifth specific weight at different time points is different, the value of the first predicted error at different time points is different, the value of the sixth specific weight at different time points is different, and the value of the first error at different time points is different.
The calculation steps of the repeated-k-times long-term predicted vehicle speed are defined as follows: calculating an accumulation of multiplying a second statistical vehicle speed by a seventh specific weight at different time point; calculating an accumulation of multiplying a second error by a eighth specific weight at different time point; and calculating a sum of the above two results, and the sum is defined as the repeated-k-times long-term predicted vehicle speed. Wherein the second error is defined as a difference between a real vehicle speed and a predicted vehicle speed at each time point, the i is a positive integer, and the second statistical vehicle speed is defined as an average vehicle speed of all driven vehicles on the selected road at each time point. The value of the seventh specific weight at different time points is different, the value of the second statistical vehicle speed at different time points is different, the value of the eighth specific weight at different time points is different, and the value of the second error at different time points is different.
Next, the vehicle speed prediction method can be explained with one practical example.
However, the accuracy will be reduced since the predicted time increases. The formula (2) defines that predicting the short-term predicted vehicle speed with k times repeatedly to generate the short-term predicted vehicle speed S{circumflex over (V)}t+k at time (t+k). In the formula (2), φi, φi+1, θi, and θi+1 are weight parameters, and these parameters can be obtained by calculating the historical statistical data.
is defined as the short-term predicted vehicle speed at time (t+k−i). Vt+k-1-i is defined as a real vehicle speed at time (t+k−1−i).
is defined as the predicted error between the real vehicle speed and the predicted vehicle speed at time (t+k−i). εt+k-1-i is defined as the error between the real vehicle speed and the predicted vehicle speed at time (t+k−1−i).
Next, the vehicle speed prediction method of the present invention calculates the long-term predicted vehicle speed , and the unit time can be set as one day or set according to users' requirements. The predicted vehicle speed at time t can be obtained by the following formula (3). Vt−i×h is defined as the real vehicle speed at time (t−i×h). εt−i×h is defined as an error between the real vehicle speed and the predicted vehicle speed at time (t−i×h). To predict the long-term predicted vehicle speed at time t, firstly, multiply Vt−i×h by weight and then multiply εt−i×h by μi. Next, accumulate m pieces of λi Vt−i×h and n pieces of μiεt−i×h. The weight parameters λi and μi can be calculated by historical statistical data. The predicted vehicle speed and the real vehicle speed are known. A plurality of the set (λi, μi) can be obtained by using the formula (3) to calculate the historical statistical data. Next, the present invention uses the least squares method to get the best (λi, μi).
The following formula (4) defines that predicting the long-term predicted vehicle speed with k times repeatedly to generate the long-term predicted vehicle speed L{circumflex over (V)}t+k at time (t+k). In the formula (4), λi, and μi are weight parameters, and these parameters can be obtained by calculating the historical statistical data. Vt+k×h is defined as a real vehicle speed at time (t+k−i×h). εt+k-i×h is defined as the error between the real vehicle speed and the predicted vehicle speed at time (t+k−i×h).
After calculating the short-term and long-term predicted vehicle speed, the predicted results are mixed to generate the mixed predicted vehicle speed {circumflex over (V)}t, defined as the following formula (5). αt is a weight parameter, and the value of αt is greater than zero and smaller than 1. The value of αt will be distinct at different time point. For limiting the quantity of αt, the length of t is limited within one day, as {tilde over (t)} defined in the formula (6). For example, the value of at are different at 12:00 PM, 12:05 PM, and 12:10 PM today. However, the value of αt are the same at 12:00 PM today and at 12:00 PM at tomorrow, the value of αt are the same at 12:05 PM today and at 12:05 PM at tomorrow, and the value of at are the same at 12:10 PM today and at 12:10 PM at tomorrow.
{circumflex over (V)}
t=αtt+(1−αt) (5)
{tilde over (t)}=t mod h (6)
The repeated-k-times mixed predicted vehicle speed is defined as the following formula (7). Since the prediction period becomes longer,
becomes smaller. Therefore, the ratio of S{circumflex over (V)}t+k to becomes lower, and the ratio of L{circumflex over (V)}t+k becomes higher. When k is equal to a threshold ‘x’, it is only to calculate the long-term predicted vehicle speed, as disclosed in formula (8). For the value of x, if the weight parameter of S{circumflex over (V)}t+k is smaller than 0.1, the k is equal to the threshold x. If k is smaller than x, the repeated-k-times mixed predicted vehicle speed is defined as the following formula (7). If k is greater than or equal to x, the repeated-k-times mixed predicted vehicle speed is defined as the following formula (8).
The present invention uses the weight parameter αt{tilde over (+)} i to adjust the ratio of short-term predicted vehicle speed and the ratio of long-term predicted vehicle speed to the mixed predicted vehicle speed. For calculating the weight parameter αt{tilde over (+)} i, the present invention calculates historical statistical data and uses least squares method to obtain these weight parameters (α{grave over (t)}, αt{grave over (+)} 1 . . . αt{tilde over (+)} k).
A route can be divided into a plurality of roads r1, r2, r3, and . . . rz, and the related road length are d1, d2, d3, and . . . dz respectively. The related predicted vehicle speed at time t are {circumflex over (V)}t1, {circumflex over (V)}t2, {circumflex over (V)}t3, . . . {circumflex over (V)}tz respectively. The formula (9) explains how to calculate the required running time π1 of road r1. The formula (10) explains how to calculate the required running time πi of road ri. Finally, the required running time T of the whole route is defined as a sum of the required running time of each road, as disclosed in formula (11).
The ARIMA model built at the model-building step can obtain the short-term predicted vehicle speed and the long-term predicted vehicle speed according to an input time and an input route at the prediction step. Next, the present invention uses the above formula (7) to get the predicted vehicle speed. Next, the present invention predicts the route running time according to the predicated speed and the related distance for each road.
Since the traffic flow increase year by year, it is important that how to operate traffic prediction so as to save time and reduce power consuming accurately and efficiently. The great vehicle speed prediction method and running time prediction method not only help vehicle drivers to plan vehicle route but also help to relieve traffic congestion and improve the traffic situation. The vehicle speed prediction method of the present invention comprises two advantages: steady of long-term prediction and reflecting temporary changes of short-term prediction. The vehicle speed prediction method of the present invention considers the short-term correlation and long-term correlation at the same time. Comparing to the traditional vehicle speed prediction method, the vehicle speed prediction method of the present invention is more accurate.
Although the present invention has been described in considerable detail with reference to certain embodiments thereof, other embodiments are possible. Therefore, the spirit and scope of the appended claims should not be limited to the description of the embodiments contained herein.
It will be apparent to those skilled in the art that various modifications and variations can be made to the structure of the present invention without departing from the scope or spirit of the invention. In view of the foregoing, it is intended that the present invention cover modifications and variations of this invention provided they fall within the scope of the following claims.
Number | Date | Country | Kind |
---|---|---|---|
105113285 | Apr 2016 | TW | national |