[go: up one dir, main page]

CN111311905A - Particle swarm optimization wavelet neural network-based expressway travel time prediction method - Google Patents

Particle swarm optimization wavelet neural network-based expressway travel time prediction method Download PDF

Info

Publication number
CN111311905A
CN111311905A CN202010068929.3A CN202010068929A CN111311905A CN 111311905 A CN111311905 A CN 111311905A CN 202010068929 A CN202010068929 A CN 202010068929A CN 111311905 A CN111311905 A CN 111311905A
Authority
CN
China
Prior art keywords
neural network
layer
output
travel time
toll
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010068929.3A
Other languages
Chinese (zh)
Inventor
于泉
孙瑶
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing University of Technology
Original Assignee
Beijing University of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing University of Technology filed Critical Beijing University of Technology
Priority to CN202010068929.3A priority Critical patent/CN111311905A/en
Publication of CN111311905A publication Critical patent/CN111311905A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/01Detecting movement of traffic to be counted or controlled
    • G08G1/0104Measuring and analyzing of parameters relative to traffic conditions
    • G08G1/0125Traffic data processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/004Artificial life, i.e. computing arrangements simulating life
    • G06N3/006Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention relates to a particle swarm optimization-based travel time prediction method for a wavelet neural network. The particle swarm optimization algorithm optimizes parameters of the wavelet neural network through continuous iteration, so that the defects of a wavelet neural network model are overcome, including slow convergence speed, easiness in falling into a local minimum value and easiness in generating an oscillation effect. Through comparison experiment analysis, the particle swarm optimization wavelet neural network model can accurately predict the change trend of the travel time and the fluctuation condition of the travel time, and the advantages of high convergence speed, high prediction precision and strong adaptability are proved.

Description

一种基于粒子群优化小波神经网络的高速公路行程时间预测 方法A Highway Travel Time Prediction Based on Particle Swarm Optimization Wavelet Neural Network method

技术领域technical field

本发明设计一种实用性模型,属于智能交通范畴,具体说是能够为出行者提供高实时性和可靠性的出行信息的一种基于粒子群优化小波神经网络的高速公路行程时间预测方法。The invention designs a practicability model, which belongs to the category of intelligent transportation, and specifically is a method for predicting highway travel time based on particle swarm optimization wavelet neural network, which can provide travelers with high real-time and reliable travel information.

背景技术Background technique

行程时间的精确预测为交通管理者制定管理决策和出行者合理安排出行计划提供了依据。目前,行程时间预测的方法包括:时间序列模型,多元回归模型,Kalman滤波预测和人工神经网络等。但是,时间序列模型不考虑影响行程时间的其他因素,而是通过分析过去数据中的类似趋势预测未来行程时间。多元回归模型研究目标路段和相邻路段的数据,预测结果通常不令人满意。Kalman滤波模型在预测过程中需要不断对权值进行修正,使得计算时耗过大,预测实时性较差。人工神经网络是行程时间预测较为常用的方式,但是在运用过程中存在易陷入局部最优解、易产生振荡效应和收敛缓慢等不足之处。Accurate prediction of travel time provides a basis for traffic managers to make management decisions and travelers to rationally arrange travel plans. At present, the methods of travel time prediction include: time series model, multiple regression model, Kalman filter prediction and artificial neural network. However, time series models do not take into account other factors that affect travel times, but predict future travel times by analyzing similar trends in past data. Multiple regression models study the data of the target road segment and adjacent road segments, and the prediction results are usually unsatisfactory. The Kalman filter model needs to constantly modify the weights in the prediction process, which makes the calculation time is too large and the real-time prediction is poor. Artificial neural network is a commonly used method for travel time prediction, but in the process of application, it is easy to fall into local optimal solution, easy to produce oscillation effect and slow convergence.

因此,本发明在对行程时间进行预测时,综合考虑现有方法优缺点,建立新的高速公路行程时间预测模型。Therefore, when the present invention predicts the travel time, the advantages and disadvantages of the existing methods are comprehensively considered, and a new expressway travel time prediction model is established.

发明内容SUMMARY OF THE INVENTION

鉴于现有技术的不足及研究趋势,本发明的目的在于提供一种基于粒子群优化小波神经网络的高速公路行程时间预测方法模型,精确预测行程时间,从而为有关部门进行交通管理和优化提供良好的理论支持和决策依据。In view of the deficiencies and research trends of the prior art, the purpose of the present invention is to provide a method model of expressway travel time prediction based on particle swarm optimization wavelet neural network, which can accurately predict the travel time, so as to provide a good solution for traffic management and optimization by relevant departments. theoretical support and decision-making basis.

为了实现本发明目的,所采用的技术方案为:In order to realize the purpose of the present invention, the technical scheme adopted is:

高速公路行程时间预测方法研究,其研究方法主要步骤包括:Research on the prediction method of expressway travel time. The main steps of the research method include:

A.对高速公路收费数据进行处理,提取研究所需的收据字段;A. Process the highway toll data and extract the receipt fields required for research;

B.对提取的收费数据字段进行数据处理;B. Perform data processing on the extracted charging data fields;

C.在数据处理的基础上,利用小波神经网络模型对高速公路行程时间进行预测;C. On the basis of data processing, use the wavelet neural network model to predict the travel time of the expressway;

D.在数据处理的基础上,利用粒子群优化小波神经网络模型对高速公路行程时间进行预测;D. On the basis of data processing, use particle swarm optimization wavelet neural network model to predict highway travel time;

E.采用平均绝对误差(MAE),平均相对误差(MAPE)、均方误差(MSE)3项评价指标对2种预测模型精度进行对比分析。通过对比结果可知粒子群优化的小波神经网络模型可更精确实现高速公路行程时间的预测,并在实际数据验证中表现出更好的适应性。E. Using mean absolute error (MAE), mean relative error (MAPE) and mean square error (MSE) three evaluation indicators to compare and analyze the accuracy of the two prediction models. By comparing the results, it can be seen that the wavelet neural network model of particle swarm optimization can more accurately predict the travel time of expressways, and show better adaptability in actual data verification.

所述的高速公路行程时间预测方法研究,其中,所述步骤A的具体分析过程为:The research on the expressway travel time prediction method, wherein, the specific analysis process of the step A is:

A1.我国高速公路收费采用全面覆盖收费过程的信息化系统,因而可以采集大量收费数据。研究所需的数据字段包括INSTATIONID(入口收费站编码)、INTIME(入口时间)、EXITSTATION(出口收费站编码)、EXITTIME(出口时间),如表1所示。A1. my country's highway toll collection adopts an information system that fully covers the toll collection process, so a large amount of toll data can be collected. The data fields required for the study include INSTATIONID (entry toll station code), INTIME (entry time), EXITSTATION (exit toll station code), EXITTIME (exit time), as shown in Table 1.

表1收费数据字段说明表Table 1 Charge data field description table

Figure BDA0002376793340000021
Figure BDA0002376793340000021

所述的高速公路行程时间预测方法研究,其中,所述步骤B的具体分析过程为:The research on the expressway travel time prediction method, wherein, the specific analysis process of the step B is:

B1.收费数据处理分两步进行,第一:剔除异常数据,包括缺失数据、错误数据等;第二:根据四分位法筛选有效数据,有效数据是指可以有效反映整体数值情况的数据集合,其区间为[tmin,tmax]。B1. The charging data processing is carried out in two steps. The first is to eliminate abnormal data, including missing data and wrong data. , whose interval is [t min ,t max ].

B2.异常数据主要包含以下四种类型:B2. Abnormal data mainly includes the following four types:

缺少进入/离开收费站或进入/离开的时间信息:当收费系统软件产生异常或者线路传输出现错误时,收费系统无法录入完整的收费数据信息;Lack of entry/exit toll booth or entry/exit time information: When the toll system software is abnormal or there is an error in the line transmission, the toll system cannot input complete toll data information;

相同进出收费站数据:当驾驶员在服务区交换收费卡从而逃避收费的行为发生时,会导致收费系统中记录的车辆在入口收费站和出口收费站的时间相同;The same data entering and leaving the toll booth: When the driver exchanges the toll card in the service area to avoid the toll collection, it will cause the vehicle recorded in the toll collection system to have the same time at the entrance toll booth and the exit toll booth;

异常时间数据记录。收费系统虽日益完善,但也存在不同收费站的系统不同步的弊端,从而导致不同收费站时间出现偏差,造成了入口时间晚于出口时间的现象。通常这种情况会在凌晨收费系统更新日期时发生;Abnormal time data record. Although the toll collection system is becoming more and more perfect, there is also the disadvantage that the systems of different toll stations are not synchronized, which leads to the deviation of the time of different toll stations, resulting in the phenomenon that the entrance time is later than the exit time. Usually this happens in the early hours of the morning when the charging system is updated;

异常时间数据记录。由于高速公路的特殊性,路段上一般会设置服务区和停车区,从而出现长途车辆长时间驻留的现象。Abnormal time data record. Due to the particularity of expressways, service areas and parking areas are generally set up on the road sections, resulting in the phenomenon of long-distance vehicles staying for a long time.

B3.在去除错误数据的基础上,基于四分位法筛选有效数据。行程时间有效数据集合下限和上限计算公式为:B3. On the basis of removing erroneous data, screen valid data based on quartile method. The formula for calculating the lower limit and upper limit of the valid data set of travel time is:

tmin=t25%-1.5×(t75%-t25%)t min =t 25% -1.5×(t 75% -t 25% )

tmax=t75%+1.5×(t75%-t25%)t max =t 75% +1.5×(t 75% -t 25% )

t25%--25%分位数t 25% --25% quantile

t75%---75%分位数t 75% --- 75% quantile

tmin---行程时间有效数据集合下限值t min --- lower limit value of valid data set of travel time

tmax---行程时间有效数据集合上限值。t max ---The upper limit value of the valid data set of travel time.

所述的高速公路行程时间预测方法研究,其中,所述步骤C的具体分析过程为:The research on the expressway travel time prediction method, wherein, the specific analysis process of the step C is:

C1.网络构建。构建包含输入层、隐含层和输出层的三层小波神经网络。如图1所示,其中X1,X2,...,Xm(m表示输入神经元个数)表示小波神经网络的输入,Y1,Y2,...,Yn(n表示输出神经元个数),J表示隐含层节点个数,ωij和ωjk分别指输入层与隐含层,隐含层和输出层之间的权重,其中i=1,2,...,m;j=1,2,...,J;k=1,2,...,n。C1. Network construction. Construct a three-layer wavelet neural network with input layer, hidden layer and output layer. As shown in Figure 1, where X 1 , X 2 ,...,X m (m represents the number of input neurons) represents the input of the wavelet neural network, Y 1 , Y 2 ,..., Y n (n represents the input of the wavelet neural network) The number of output neurons), J represents the number of hidden layer nodes, ω ij and ω jk respectively refer to the weight between the input layer and the hidden layer, the hidden layer and the output layer, where i=1, 2, .. .,m; j=1,2,...,J; k=1,2,...,n.

C2.网络初始化。随机初始化小波函数的伸缩因子aj,平移因子bj,连接权重ωij(输入层与隐含层)和ωjk(隐含层与输出层)。设置小波神经网络的学习速率η1和η2C2. Network initialization. Randomly initialize the scaling factor a j of the wavelet function, the translation factor b j , the connection weights ω ij (input layer and hidden layer) and ω jk (hidden layer and output layer). Set the learning rates η 1 and η 2 of the wavelet neural network.

伸缩因子的调整公式如下:The adjustment formula of the scaling factor is as follows:

Figure BDA0002376793340000031
Figure BDA0002376793340000031

Figure BDA0002376793340000032
---调整前伸缩因子;
Figure BDA0002376793340000032
--- Adjust the front scaling factor;

Figure BDA0002376793340000041
--调整后伸缩因子;
Figure BDA0002376793340000041
-- Adjusted scaling factor;

η2---小波参数的学习速率,可取η2=0.01。η 2 --- the learning rate of wavelet parameters, which can be taken as η 2 =0.01.

平移因子的调整公式如下:The adjustment formula of the translation factor is as follows:

Figure BDA0002376793340000042
Figure BDA0002376793340000042

Figure BDA0002376793340000043
---调整前平移因子值;
Figure BDA0002376793340000043
---Translation factor value before adjustment;

Figure BDA0002376793340000044
---调整后平移因子值;
Figure BDA0002376793340000044
--- Adjusted translation factor value;

η2---小波参数的学习速率,可取η2=0.01。η 2 --- the learning rate of wavelet parameters, which can be taken as η 2 =0.01.

输入层和隐含层之间可通过下式修正调整:The adjustment between the input layer and the hidden layer can be adjusted by the following formula:

Figure BDA0002376793340000045
Figure BDA0002376793340000045

Figure BDA0002376793340000046
---调整之前输入层与隐含层之间的权值;
Figure BDA0002376793340000046
--- Adjust the weights between the input layer and the hidden layer before;

Figure BDA0002376793340000047
---调整之后输入层与隐含之间的权值;
Figure BDA0002376793340000047
---The weight between the input layer and the hidden layer after adjustment;

η1---网络权值参数的学习速率,可取η1=0.01。η 1 --- the learning rate of the network weight parameter, which can be η 1 =0.01.

隐含层和输出层之间可通过下式修正调整:The adjustment between the hidden layer and the output layer can be adjusted by the following formula:

Figure BDA0002376793340000048
Figure BDA0002376793340000048

Figure BDA0002376793340000049
---调整之前隐含层与输出层之间的权值;
Figure BDA0002376793340000049
--- Adjust the weights between the hidden layer and the output layer before;

Figure BDA00023767933400000410
---调整之后隐含层与输出层之间的权值;
Figure BDA00023767933400000410
---After adjustment, the weights between the hidden layer and the output layer;

η1---网络权值参数的学习速率,可取η1=0.01。η 1 --- the learning rate of the network weight parameter, which can be η 1 =0.01.

C3.预测输出。将训练样本输入网络,从而计算网络的预测输出并计算网络输出和期望输出误差e。C3. Predict output. The training samples are fed into the network to calculate the predicted output of the network and calculate the error e between the network output and the expected output.

C4.误差计算。计算网络的预测输出和期望输出之间的误差e。具体计算公式为:C4. Error calculation. Calculate the error e between the predicted output of the network and the expected output. The specific calculation formula is:

Figure BDA0002376793340000051
Figure BDA0002376793340000051

yp,k(k)---实际输出值;y p,k (k)---actual output value;

tp,k---理想输出值。t p,k --- ideal output value.

C5.权值修正。为了使得误差满足要求,采用梯度下降法修正小波神经网络的权值和参数。C5. Weight correction. In order to make the error meet the requirements, the weights and parameters of the wavelet neural network are modified by the gradient descent method.

C6.如果训练次数大于1000或者e满足预测精度要求(e<0.0001,误差精度设定为0.0001,若误差精度若设定过高,网络收敛速度慢;若误差精度设定过低,影响预测结果的准确性)时,结束训练返回预测结果,否则继续学习和训练。C6. If the number of training times is greater than 1000 or e meets the prediction accuracy requirements (e<0.0001, the error accuracy is set to 0.0001. If the error accuracy is set too high, the network convergence speed will be slow; if the error accuracy is set too low, the prediction result will be affected. accuracy), end the training and return the prediction result, otherwise continue learning and training.

基于小波神经网络的行程时间预测试验流程如图2所示。The test flow of travel time prediction based on wavelet neural network is shown in Figure 2.

所述的高速公路行程时间预测方法研究,其中,所述步骤D的具体分析过程为:The research on the method for predicting the travel time of the expressway, wherein, the specific analysis process of the step D is:

D1.网络构建:构建包含输入层、隐含层和输出层的三层POS-WNN神经网络D1. Network construction: construct a three-layer POS-WNN neural network including input layer, hidden layer and output layer

D2.参数初始化处理:系统随机生成S个粒子,并利用这些粒子的位置矢量来表示小波基函数中的伸缩因子和平移因子aj,bj;以及权重值ωij(第i个输入和第j个隐层间的权重值)和ωj(第j个隐层和输出层间的权重值),计算公式如下。同时设定粒子的最大最小速度,学习速率及最大迭代次数。D2. Parameter initialization processing: the system randomly generates S particles, and uses the position vectors of these particles to represent the scaling factors and translation factors a j , b j in the wavelet basis function; and the weight value ω ij (the ith input and the first The weight value between the j hidden layers) and ω j (the weight value between the jth hidden layer and the output layer), the calculation formula is as follows. At the same time, set the maximum and minimum speed of particles, the learning rate and the maximum number of iterations.

xs=(xs,1,...,xs,d,...,xs,D)=(a1,...,aJ,b1,...,bJ11,...,ω1J21,...,ω2J,...,ω291,...,ω29J1,...,ωJ)x s =(x s,1 ,...,x s,d ,...,x s,D )=(a 1 ,...,a J ,b 1 ,...,b J11 ,...,ω 1J21 ,...,ω 2J ,...,ω 291 ,...,ω 29J1 ,...,ω J )

D=m×J+J×(m-n)+(m-1)×JD=m×J+J×(m-n)+(m-1)×J

m---输入层节点数m---number of input layer nodes

J---隐含层节点数J---the number of hidden layer nodes

n---输出层节点数n---the number of output layer nodes

D3.网络训练。基于实际输出值与理想输出值间的误差,计算每次迭代过程中粒子适应度,计算公式如下。D3. Network training. Based on the error between the actual output value and the ideal output value, the particle fitness in each iteration process is calculated, and the calculation formula is as follows.

Figure BDA0002376793340000061
Figure BDA0002376793340000061

Q---训练样本总数Q---Total number of training samples

n---网络输出神经元个数n---the number of output neurons of the network

yp,k(k)---实际输出值y p,k (k)---actual output value

tp,k---理想输出值。t p,k --- ideal output value.

D4.将粒子适应度作为判定是否达到设定的误差要求的指标,如果能够达到设定的误差要求,即适应度值基本保持不变,则完成训练,转至第F步;如果依旧达不到误差要求,则进行下一步。D4. Use the particle fitness as an indicator to determine whether the set error requirement is met. If the set error requirement can be met, that is, the fitness value remains basically unchanged, then the training is completed and go to step F; if it still fails to meet the set error requirement To the error requirement, proceed to the next step.

D5.判断训练的次数是否达到了设定的最大迭代次数,如果达到了,则跳出循环,转至第F步,停止训练;否则按照下式更新粒子的速度和位置,返回步骤C继续训练。D5. Determine whether the number of training has reached the set maximum number of iterations, if so, jump out of the loop, go to step F, and stop training; otherwise, update the speed and position of the particle according to the following formula, and return to step C to continue training.

vs,d(i+1)=ω×vs,d(i)+c1r1[ps,d-xs,d(i)]+c2r2[pg,d-xs,d(i)]v s,d (i+1)=ω×v s,d (i)+c 1 r 1 [p s,d -x s,d (i)]+c 2 r 2 [p g,d -x s,d (i)]

xs,d(i+1)=xs,d(i)+vs,d(i+1)x s,d (i+1)=x s,d (i)+v s,d (i+1)

s=1,2,..,S;d=1,2,...,Ds=1,2,..,S; d=1,2,...,D

c1,c2---加速因子c 1 ,c 2 --- acceleration factor

i---当前迭代次数i---current iteration number

ω---惯性因子ω---Inertia factor

r1,r2---0和1之间均匀分布的随机数。r 1 ,r 2 --- Random numbers uniformly distributed between 0 and 1.

D6.网络调试:选择训练样本的特定时段样本值作为输入值,训练样本中的另一特定时段的实际值作为理想输出值,根据步骤C适应度计算公式计算误差,若满足误差精度的设定,则结束运行;若不能满足设定的误差精度,则转至第C步。D6. Network debugging: Select the sample value of the training sample in a specific period as the input value, and the actual value of another specific period in the training sample as the ideal output value, and calculate the error according to the fitness calculation formula of step C. If the error accuracy setting is satisfied , then end the operation; if the set error accuracy cannot be met, go to step C.

基于粒子群优化小波神经网络的行程时间预测模型实验流程如图3所示。The experimental flow of the travel time prediction model based on particle swarm optimization wavelet neural network is shown in Figure 3.

所述的高速公路行程时间预测方法研究,其中,所述步骤E的具体分析过程为:The research on the method for predicting the travel time of the expressway, wherein, the specific analysis process of the step E is:

E1.采用平均绝对误差(MAE),平均相对误差(MAPE)、均方误差(MSE)3项评价指标对2种预测模型精度进行对比分析。E1. Using mean absolute error (MAE), mean relative error (MAPE) and mean square error (MSE) three evaluation indicators to compare and analyze the accuracy of the two prediction models.

E2.设tp,k表示行程时间实际值,yp,k(k)表示行程时间预测值,l表示预测时间段个数。E2. Let t p,k represent the actual value of travel time, y p,k (k) represent the predicted value of travel time, and l represent the number of predicted time periods.

E3.对平均绝对误差评价指标进行计算,具体的计算表达式为:E3. Calculate the mean absolute error evaluation index, and the specific calculation expression is:

Figure BDA0002376793340000071
Figure BDA0002376793340000071

平均绝对误差(MAE)——用于评定实际值与预测值之间的差异的指标。Mean Absolute Error (MAE) - A measure used to assess the difference between actual and predicted values.

E4.对平均相对误差评价指标进行计算,具体的计算表达式为:E4. Calculate the average relative error evaluation index, and the specific calculation expression is:

Figure BDA0002376793340000072
Figure BDA0002376793340000072

平均相对误差(MAPE)——在行程时间预测过程中,用于评定行程时间预测结果精确度大小的指标。Mean Relative Error (MAPE)—In the process of travel time prediction, it is used to evaluate the accuracy of travel time prediction results.

E5.对均方误差评价指标进行计算,具体的计算表达式为:E5. Calculate the mean square error evaluation index, and the specific calculation expression is:

Figure BDA0002376793340000073
Figure BDA0002376793340000073

均方误差(MSE)----综合评价数据的变化程度。Mean Squared Error (MSE)----Comprehensive evaluation of the degree of change in the data.

采用平均绝对误差(MAE),平均相对误差(MAPE)、均方误差(MSE)3项评价指标对2种预测模型精度进行对比分析。实验结果显示:粒子群优化的小波神经网络行程时间预测模型预测结果的平均绝对误差,平均相对误差和均方误差相较于小波神经网络模型分别降低了83.36%,82.20%和98.15%。粒子群优化的小波神经网络行程时间预测模型不仅预测精度高,而且能比较准确的预测出行程时间的走向及波动情况,在收敛速度方面也呈现出一定的优势,具有较好的适应能力。The mean absolute error (MAE), mean relative error (MAPE) and mean square error (MSE) were used to compare and analyze the accuracy of the two prediction models. The experimental results show that the mean absolute error, mean relative error and mean square error of the prediction results of the wavelet neural network travel time prediction model of particle swarm optimization are reduced by 83.36%, 82.20% and 98.15% respectively compared with the wavelet neural network model. The wavelet neural network travel time prediction model of particle swarm optimization not only has high prediction accuracy, but also can accurately predict the trend and fluctuation of travel time. It also shows certain advantages in convergence speed and has good adaptability.

本发明公开了一种基于粒子群优化小波神经网络的行程时间预测方法。粒子群优化算法通过不断的迭代优化小波神经网络的参数,解决了小波神经网络模型的缺陷,包括收敛速度缓慢、易陷入局部最小值和易产生振荡效应。通过对比实验分析,粒子群优化小波神经网络模型不仅能准确预测行程时间的变化趋势,也能比较准确预测行程时间的波动情况。基于粒子群优化小波神经网络模型的高速公路行程时间预测实验证明了粒子群优化小波神经网络具有收敛速度快,预测精度高,适应性强的优点。The invention discloses a travel time prediction method based on particle swarm optimization wavelet neural network. The particle swarm optimization algorithm solves the defects of the wavelet neural network model through continuous iterative optimization of the parameters of the wavelet neural network, including slow convergence speed, easy to fall into local minimum and easy to produce oscillation effect. Through comparative experimental analysis, the particle swarm optimization wavelet neural network model can not only accurately predict the change trend of travel time, but also more accurately predict the fluctuation of travel time. The expressway travel time prediction experiment based on the particle swarm optimization wavelet neural network model proves that the particle swarm optimization wavelet neural network has the advantages of fast convergence, high prediction accuracy and strong adaptability.

应当理解的是,本发明不局限于上述最佳实施方式,任何人在本发明的启示下都可得出其他各种形式的产品,但不论在其形状或结构上作任何变化,凡是具有与本申请相同或相近似的技术方案,均落在本发明的保护范围之内。It should be understood that the present invention is not limited to the above-mentioned best embodiment, and anyone can draw other various forms of products under the inspiration of the present invention, but no matter if any changes are made in its shape or structure, any The same or similar technical solutions of the present application all fall within the protection scope of the present invention.

附图说明Description of drawings

图1紧致型小波神经网络结构图Fig.1 Structure of compact wavelet neural network

图2小波神经网络流程图Figure 2 Flow chart of wavelet neural network

图3粒子群优化小波神经网络行程时间预测模型实验流程图Fig. 3 The experimental flow chart of the particle swarm optimization wavelet neural network travel time prediction model

高速公路行程时间预测方法研究,其研究方法主要步骤包括:Research on the prediction method of expressway travel time. The main steps of the research method include:

A.对高速公路收费数据进行处理,提取研究所需的收据字段;A. Process the highway toll data and extract the receipt fields required for research;

B.对提取的收费数据字段进行数据处理;B. Perform data processing on the extracted charging data fields;

C.在数据处理的基础上,利用小波神经网络模型对高速公路行程时间进行预测;C. On the basis of data processing, use the wavelet neural network model to predict the travel time of the expressway;

D.在数据处理的基础上,利用粒子群优化小波神经网络模型对高速公路行程时间进行预测;D. On the basis of data processing, use particle swarm optimization wavelet neural network model to predict highway travel time;

E.采用平均绝对误差(MAE),平均相对误差(MAPE)、均方误差(MSE)3项评价指标对2种预测模型精度进行对比分析。通过对比结果可知粒子群优化的小波神经网络模型可更精确实现高速公路行程时间的预测,并在实际数据验证中表现出更好的适应性。E. Using mean absolute error (MAE), mean relative error (MAPE) and mean square error (MSE) three evaluation indicators to compare and analyze the accuracy of the two prediction models. By comparing the results, it can be seen that the wavelet neural network model of particle swarm optimization can more accurately predict the travel time of expressways, and show better adaptability in actual data verification.

所述的高速公路行程时间预测方法研究,其中,所述步骤A的具体分析过程为:The research on the expressway travel time prediction method, wherein, the specific analysis process of the step A is:

A1.我国高速公路收费采用全面覆盖收费过程的信息化系统,因而可以采集大量收费数据。研究所需的数据字段包括INSTATIONID(入口收费站编码)、INTIME(入口时间)、EXITSTATION(出口收费站编码)、EXITTIME(出口时间),如表1所示。A1. my country's highway toll collection adopts an information system that fully covers the toll collection process, so a large amount of toll data can be collected. The data fields required for the study include INSTATIONID (entry toll station code), INTIME (entry time), EXITSTATION (exit toll station code), EXITTIME (exit time), as shown in Table 1.

表1收费数据字段说明表Table 1 Charge data field description table

Figure BDA0002376793340000081
Figure BDA0002376793340000081

Figure BDA0002376793340000091
Figure BDA0002376793340000091

所述的高速公路行程时间预测方法研究,其中,所述步骤B的具体分析过程为:The research on the expressway travel time prediction method, wherein, the specific analysis process of the step B is:

B1.收费数据处理分两步进行,第一:剔除异常数据,包括缺失数据、错误数据等;第二:根据四分位法筛选有效数据,有效数据是指可以有效反映整体数值情况的数据集合,其区间为[tmin,tmax]。B1. The charging data processing is carried out in two steps. The first is to eliminate abnormal data, including missing data and wrong data. , whose interval is [t min ,t max ].

B2.异常数据主要包含以下四种类型:B2. Abnormal data mainly includes the following four types:

缺少进入/离开收费站或进入/离开的时间信息:当收费系统软件产生异常或者线路传输出现错误时,收费系统无法录入完整的收费数据信息;Lack of entry/exit toll booth or entry/exit time information: When the toll system software is abnormal or there is an error in the line transmission, the toll system cannot input complete toll data information;

相同进出收费站数据:当驾驶员在服务区交换收费卡从而逃避收费的行为发生时,会导致收费系统中记录的车辆在入口收费站和出口收费站的时间相同;The same data entering and leaving the toll booth: When the driver exchanges the toll card in the service area to avoid the toll collection, it will cause the vehicle recorded in the toll collection system to have the same time at the entrance toll booth and the exit toll booth;

异常时间数据记录。收费系统虽日益完善,但也存在不同收费站的系统不同步的弊端,从而导致不同收费站时间出现偏差,造成了入口时间晚于出口时间的现象。通常这种情况会在凌晨收费系统更新日期时发生;Abnormal time data record. Although the toll collection system is becoming more and more perfect, there is also the disadvantage that the systems of different toll stations are not synchronized, which leads to the deviation of the time of different toll stations, resulting in the phenomenon that the entrance time is later than the exit time. Usually this happens in the early hours of the morning when the charging system is updated;

异常时间数据记录。由于高速公路的特殊性,路段上一般会设置服务区和停车区,从而出现长途车辆长时间驻留的现象。Abnormal time data record. Due to the particularity of expressways, service areas and parking areas are generally set up on the road sections, resulting in the phenomenon of long-distance vehicles staying for a long time.

B3.在去除错误数据的基础上,基于四分位法筛选有效数据。行程时间有效数据集合下限和上限计算公式为:B3. On the basis of removing erroneous data, screen valid data based on quartile method. The formula for calculating the lower limit and upper limit of the valid data set of travel time is:

tmin=t25%-1.5×(t75%-t25%)t min =t 25% -1.5×(t 75% -t 25% )

tmax=t75%+1.5×(t75%-t25%)t max =t 75% +1.5×(t 75% -t 25% )

t25%--25%分位数t 25% --25% quantile

t75%---75%分位数t 75% --- 75% quantile

tmin---行程时间有效数据集合下限值t min --- lower limit value of valid data set of travel time

tmax---行程时间有效数据集合上限值。t max ---The upper limit value of the valid data set of travel time.

所述的高速公路行程时间预测方法研究,其中,所述步骤C的具体分析过程为:The research on the expressway travel time prediction method, wherein, the specific analysis process of the step C is:

C1.网络构建。构建包含输入层、隐含层和输出层的三层小波神经网络。如图1所示,其中X1,X2,...,Xm(m表示输入神经元个数)表示小波神经网络的输入,Y1,Y2,...,Yn(n表示输出神经元个数),J表示隐含层节点个数,ωij和ωjk分别指输入层与隐含层,隐含层和输出层之间的权重,其中i=1,2,...,m;j=1,2,...,J;k=1,2,...,n。C1. Network construction. Construct a three-layer wavelet neural network with input layer, hidden layer and output layer. As shown in Figure 1, where X 1 , X 2 ,...,X m (m represents the number of input neurons) represents the input of the wavelet neural network, Y 1 , Y 2 ,..., Y n (n represents the input of the wavelet neural network) The number of output neurons), J represents the number of hidden layer nodes, ω ij and ω jk respectively refer to the weight between the input layer and the hidden layer, the hidden layer and the output layer, where i=1, 2, .. .,m; j=1,2,...,J; k=1,2,...,n.

C2.网络初始化。随机初始化小波函数的伸缩因子aj,平移因子bj,连接权重ωij(输入层与隐含层)和ωjk(隐含层与输出层)。设置小波神经网络的学习速率η1和η2C2. Network initialization. Randomly initialize the scaling factor a j of the wavelet function, the translation factor b j , the connection weights ω ij (input layer and hidden layer) and ω jk (hidden layer and output layer). Set the learning rates η 1 and η 2 of the wavelet neural network.

伸缩因子的调整公式如下:The adjustment formula of the scaling factor is as follows:

Figure BDA0002376793340000101
Figure BDA0002376793340000101

Figure BDA0002376793340000102
---调整前伸缩因子;
Figure BDA0002376793340000102
--- Adjust the front scaling factor;

Figure BDA0002376793340000103
---调整后伸缩因子;
Figure BDA0002376793340000103
--- Adjusted scaling factor;

η2---小波参数的学习速率,可取η2=0.01。η 2 --- the learning rate of wavelet parameters, which can be taken as η 2 =0.01.

平移因子的调整公式如下:The adjustment formula of the translation factor is as follows:

Figure BDA0002376793340000104
Figure BDA0002376793340000104

Figure BDA0002376793340000105
---调整前平移因子值;
Figure BDA0002376793340000105
---Translation factor value before adjustment;

Figure BDA0002376793340000106
---调整后平移因子值;
Figure BDA0002376793340000106
--- Adjusted translation factor value;

η2---小波参数的学习速率,可取η2=0.01。η 2 --- the learning rate of wavelet parameters, which can be taken as η 2 =0.01.

输入层和隐含层之间可通过下式修正调整:The adjustment between the input layer and the hidden layer can be adjusted by the following formula:

Figure BDA0002376793340000111
Figure BDA0002376793340000111

Figure BDA0002376793340000112
---调整之前输入层与隐含层之间的权值;
Figure BDA0002376793340000112
--- Adjust the weights between the input layer and the hidden layer before;

Figure BDA0002376793340000113
---调整之后输入层与隐含之间的权值;
Figure BDA0002376793340000113
---The weight between the input layer and the hidden layer after adjustment;

η1---网络权值参数的学习速率,可取η1=0.01。η 1 --- the learning rate of the network weight parameter, which can be η 1 =0.01.

隐含层和输出层之间可通过下式修正调整:The adjustment between the hidden layer and the output layer can be adjusted by the following formula:

Figure BDA0002376793340000114
Figure BDA0002376793340000114

Figure BDA0002376793340000115
---调整之前隐含层与输出层之间的权值;
Figure BDA0002376793340000115
--- Adjust the weights between the hidden layer and the output layer before;

Figure BDA0002376793340000116
---调整之后隐含层与输出层之间的权值;
Figure BDA0002376793340000116
---After adjustment, the weights between the hidden layer and the output layer;

η1---网络权值参数的学习速率,可取η1=0.01。η 1 --- the learning rate of the network weight parameter, which can be η 1 =0.01.

C3.预测输出。将训练样本输入网络,从而计算网络的预测输出并计算网络输出和期望输出误差e。C3. Predict output. The training samples are fed into the network to calculate the predicted output of the network and calculate the error e between the network output and the expected output.

C4.误差计算。计算网络的预测输出和期望输出之间的误差e。具体计算公式为:C4. Error calculation. Calculate the error e between the predicted output of the network and the expected output. The specific calculation formula is:

Figure BDA0002376793340000117
Figure BDA0002376793340000117

yp,k(k)---实际输出值;y p,k (k)---actual output value;

tp,k---理想输出值。t p,k --- ideal output value.

C5.权值修正。为了使得误差满足要求,采用梯度下降法修正小波神经网络的权值和参数。C5. Weight correction. In order to make the error meet the requirements, the weights and parameters of the wavelet neural network are modified by the gradient descent method.

C6.如果训练次数大于1000或者e满足预测精度要求(e<0.0001,误差精度设定为0.0001,若误差精度若设定过高,网络收敛速度慢;若误差精度设定过低,影响预测结果的准确性)时,结束训练返回预测结果,否则继续学习和训练。C6. If the number of training times is greater than 1000 or e meets the prediction accuracy requirements (e<0.0001, the error accuracy is set to 0.0001. If the error accuracy is set too high, the network convergence speed will be slow; if the error accuracy is set too low, the prediction result will be affected. accuracy), end the training and return the prediction result, otherwise continue learning and training.

基于小波神经网络的行程时间预测试验流程如图2所示。The test flow of travel time prediction based on wavelet neural network is shown in Figure 2.

所述的高速公路行程时间预测方法研究,其中,所述步骤D的具体分析过程为:The research on the method for predicting the travel time of the expressway, wherein, the specific analysis process of the step D is:

D1.网络构建:构建包含输入层、隐含层和输出层的三层POS-WNN神经网络D1. Network construction: construct a three-layer POS-WNN neural network including input layer, hidden layer and output layer

D2.参数初始化处理:系统随机生成S个粒子,并利用这些粒子的位置矢量来表示小波基函数中的伸缩因子和平移因子aj,bj;以及权重值ωij(第i个输入和第j个隐层间的权重值)和ωj(第j个隐层和输出层间的权重值),计算公式如下。同时设定粒子的最大最小速度,学习速率及最大迭代次数。D2. Parameter initialization processing: the system randomly generates S particles, and uses the position vectors of these particles to represent the scaling factors and translation factors a j , b j in the wavelet basis function; and the weight value ω ij (the ith input and the first The weight value between the j hidden layers) and ω j (the weight value between the jth hidden layer and the output layer), the calculation formula is as follows. At the same time, set the maximum and minimum speed of particles, the learning rate and the maximum number of iterations.

xs=(xs,1,...,xs,d,...,xs,D)=(a1,...,aJ,b1,...,bJ11,...,ω1J21,...,ω2J,...,ω291,...,ω29J1,...,ωJ)x s =(x s,1 ,...,x s,d ,...,x s,D )=(a 1 ,...,a J ,b 1 ,...,b J11 ,...,ω 1J21 ,...,ω 2J ,...,ω 291 ,...,ω 29J1 ,...,ω J )

D=m×J+J×(m-n)+(m-1)×JD=m×J+J×(m-n)+(m-1)×J

m---输入层节点数m---number of input layer nodes

J---隐含层节点数J---the number of hidden layer nodes

n---输出层节点数n---the number of output layer nodes

D3.网络训练。基于实际输出值与理想输出值间的误差,计算每次迭代过程中粒子适应度,计算公式如下。D3. Network training. Based on the error between the actual output value and the ideal output value, the particle fitness in each iteration process is calculated, and the calculation formula is as follows.

Figure BDA0002376793340000121
Figure BDA0002376793340000121

Q---训练样本总数Q---Total number of training samples

n---网络输出神经元个数n---the number of output neurons of the network

yp,k(k)---实际输出值y p,k (k)---actual output value

tp,k---理想输出值。t p,k --- ideal output value.

D4.将粒子适应度作为判定是否达到设定的误差要求的指标,如果能够达到设定的误差要求,即适应度值基本保持不变,则完成训练,转至第F步;如果依旧达不到误差要求,则进行下一步。D4. Use the particle fitness as an indicator to determine whether the set error requirement is met. If the set error requirement can be met, that is, the fitness value remains basically unchanged, then the training is completed and go to step F; if it still fails to meet the set error requirement To the error requirement, proceed to the next step.

D5.判断训练的次数是否达到了设定的最大迭代次数,如果达到了,则跳出循环,转至第F步,停止训练;否则按照下式更新粒子的速度和位置,返回步骤C继续训练。D5. Determine whether the number of training has reached the set maximum number of iterations, if so, jump out of the loop, go to step F, and stop training; otherwise, update the speed and position of the particle according to the following formula, and return to step C to continue training.

vs,d(i+1)=ω×vs,d(i)+c1r1[ps,d-xs,d(i)]+c2r2[pg,d-xs,d(i)]v s,d (i+1)=ω×v s,d (i)+c 1 r 1 [p s,d -x s,d (i)]+c 2 r 2 [p g,d -x s,d (i)]

xs,d(i+1)=xs,d(i)+vs,d(i+1)x s,d (i+1)=x s,d (i)+v s,d (i+1)

s=1,2,..,S;d=1,2,...,Ds=1,2,..,S; d=1,2,...,D

c1,c2---加速因子c 1 ,c 2 --- acceleration factor

i---当前迭代次数i---current iteration number

ω---惯性因子ω---Inertia factor

r1,r2---0和1之间均匀分布的随机数。r 1 ,r 2 --- Random numbers uniformly distributed between 0 and 1.

D6.网络调试:选择训练样本的特定时段样本值作为输入值,训练样本中的另一特定时段的实际值作为理想输出值,根据步骤C适应度计算公式计算误差,若满足误差精度的设定,则结束运行;若不能满足设定的误差精度,则转至第C步。D6. Network debugging: Select the sample value of the training sample in a specific period as the input value, and the actual value of another specific period in the training sample as the ideal output value, and calculate the error according to the fitness calculation formula in step C. If the error accuracy setting is satisfied , then end the operation; if the set error accuracy cannot be met, go to step C.

基于粒子群优化小波神经网络的行程时间预测模型实验流程如图3所示。The experimental flow of the travel time prediction model based on particle swarm optimization wavelet neural network is shown in Figure 3.

所述的高速公路行程时间预测方法研究,其中,所述步骤E的具体分析过程为:The research on the method for predicting the travel time of the expressway, wherein, the specific analysis process of the step E is:

E1.采用平均绝对误差(MAE),平均相对误差(MAPE)、均方误差(MSE)3项评价指标对2种预测模型精度进行对比分析。E1. Using mean absolute error (MAE), mean relative error (MAPE) and mean square error (MSE) three evaluation indicators to compare and analyze the accuracy of the two prediction models.

E2.设tp,k表示行程时间实际值,yp,k(k)表示行程时间预测值,l表示预测时间段个数。E2. Let t p,k represent the actual value of travel time, y p,k (k) represent the predicted value of travel time, and l represent the number of predicted time periods.

E3.对平均绝对误差评价指标进行计算,具体的计算表达式为:E3. Calculate the mean absolute error evaluation index, and the specific calculation expression is:

Figure BDA0002376793340000131
Figure BDA0002376793340000131

平均绝对误差(MAE)——用于评定实际值与预测值之间的差异的指标。Mean Absolute Error (MAE) - A measure used to assess the difference between actual and predicted values.

E4.对平均相对误差评价指标进行计算,具体的计算表达式为:E4. Calculate the average relative error evaluation index, and the specific calculation expression is:

Figure BDA0002376793340000132
Figure BDA0002376793340000132

平均相对误差(MAPE)——在行程时间预测过程中,用于评定行程时间预测结果精确度大小的指标。Mean Relative Error (MAPE)—In the process of travel time prediction, it is used to evaluate the accuracy of travel time prediction results.

E5.对均方误差评价指标进行计算,具体的计算表达式为:E5. Calculate the mean square error evaluation index, and the specific calculation expression is:

Figure BDA0002376793340000141
Figure BDA0002376793340000141

均方误差(MSE)----综合评价数据的变化程度。Mean Squared Error (MSE)----Comprehensive evaluation of the degree of change in the data.

采用平均绝对误差(MAE),平均相对误差(MAPE)、均方误差(MSE)3项评价指标对2种预测模型精度进行对比分析。实验结果显示:粒子群优化的小波神经网络行程时间预测模型预测结果的平均绝对误差,平均相对误差和均方误差相较于小波神经网络模型分别降低了83.36%,82.20%和98.15%。粒子群优化的小波神经网络行程时间预测模型不仅预测精度高,而且能比较准确的预测出行程时间的走向及波动情况,在收敛速度方面也呈现出一定的优势,具有较好的适应能力。The mean absolute error (MAE), mean relative error (MAPE) and mean square error (MSE) were used to compare and analyze the accuracy of the two prediction models. The experimental results show that the mean absolute error, mean relative error and mean square error of the prediction results of the wavelet neural network travel time prediction model of particle swarm optimization are reduced by 83.36%, 82.20% and 98.15% respectively compared with the wavelet neural network model. The wavelet neural network travel time prediction model of particle swarm optimization not only has high prediction accuracy, but also can accurately predict the trend and fluctuation of travel time. It also shows certain advantages in convergence speed and has good adaptability.

Claims (5)

1.一种基于粒子群优化小波神经网络的高速公路行程时间预测方法,其特征在于,包括以下步骤:1. a kind of expressway travel time prediction method based on particle swarm optimization wavelet neural network, is characterized in that, comprises the following steps: A.对高速公路收费数据进行处理,提取研究所需的收据字段;A. Process the highway toll data and extract the receipt fields required for research; B.对提取的收费数据字段进行数据处理;B. Perform data processing on the extracted charging data fields; C.在数据处理的基础上,利用小波神经网络模型对高速公路行程时间进行预测;C. On the basis of data processing, use the wavelet neural network model to predict the travel time of the expressway; D.在数据处理的基础上,利用粒子群优化小波神经网络模型对高速公路行程时间进行预测。D. On the basis of data processing, use the particle swarm optimization wavelet neural network model to predict the travel time of the expressway. 2.根据权利要求1一种基于粒子群优化小波神经网络的高速公路行程时间预测方法,其特征在于,所述步骤A的具体分析过程为:2. a kind of expressway travel time prediction method based on particle swarm optimization wavelet neural network according to claim 1, is characterized in that, the concrete analysis process of described step A is: A1.我国高速公路收费采用全面覆盖收费过程的信息化系统,因而可以采集大量收费数据;研究所需的数据字段包括INSTATIONID(入口收费站编码)、INTIME(入口时间)、EXITSTATION(出口收费站编码)、EXITTIME(出口时间)。A1. my country's highway toll collection adopts an information system that fully covers the toll collection process, so a large amount of toll data can be collected; the data fields required for the study include INSTATIONID (entry toll station code), INTIME (entry time), EXITSTATION (exit toll station code) ), EXITTIME (exit time). 3.根据权利要求1一种基于粒子群优化小波神经网络的高速公路行程时间预测方法,其特征在于,其中,所述步骤B的具体分析过程为:3. a kind of expressway travel time prediction method based on particle swarm optimization wavelet neural network according to claim 1, is characterized in that, wherein, the concrete analysis process of described step B is: B1.收费数据处理分两步进行,第一:剔除异常数据,包括缺失数据、错误数据等;第二:根据四分位法筛选有效数据,有效数据是指反映整体数值情况的数据集合,其区间为[tmin,tmax];B1. The charging data processing is carried out in two steps. The first is to eliminate abnormal data, including missing data, wrong data, etc.; the second is to filter valid data according to the quartile method. The interval is [t min ,t max ]; B2.异常数据包含以下四种类型:B2. Abnormal data includes the following four types: 缺少进入/离开收费站或进入/离开的时间信息:当收费系统软件产生异常或者线路传输出现错误时,收费系统无法录入完整的收费数据信息;Lack of entry/exit toll booth or entry/exit time information: When the toll system software is abnormal or there is an error in the line transmission, the toll system cannot input complete toll data information; 相同进出收费站数据:当驾驶员在服务区交换收费卡从而逃避收费的行为发生时,会导致收费系统中记录的车辆在入口收费站和出口收费站的时间相同;The same data entering and leaving the toll booth: When the driver exchanges the toll card in the service area to avoid the toll collection, it will cause the vehicle recorded in the toll collection system to have the same time at the entrance toll booth and the exit toll booth; 异常时间数据记录;收费系统虽日益完善,但也存在不同收费站的系统不同步的弊端,从而导致不同收费站时间出现偏差,造成了入口时间晚于出口时间的现象;Abnormal time data recording; although the toll collection system is becoming more and more perfect, it also has the disadvantage that the systems of different toll stations are not synchronized, which leads to the deviation of the time of different toll stations, resulting in the phenomenon that the entrance time is later than the exit time; 异常时间数据记录;由于高速公路的特殊性,路段上设置服务区和停车区,从而出现长途车辆长时间驻留的现象;Abnormal time data recording; due to the particularity of expressways, service areas and parking areas are set up on the road sections, resulting in the phenomenon of long-distance vehicles staying for a long time; B3.在去除错误数据的基础上,基于四分位法筛选有效数据;行程时间有效数据集合下限和上限计算公式为:B3. On the basis of removing the erroneous data, the valid data is screened based on the quartile method; the calculation formula of the lower limit and upper limit of the valid data set of travel time is: tmin=t25%-1.5×(t75%-t25%)t min =t 25% -1.5×(t 75% -t 25% ) tmax=t75%+1.5×(t75%-t25%)t max =t 75% +1.5×(t 75% -t 25% ) t25%--25%分位数t 25% --25% quantile t75%---75%分位数t 75% --- 75% quantile tmin---行程时间有效数据集合下限值t min --- lower limit value of valid data set of travel time tmax---行程时间有效数据集合上限值。t max ---The upper limit value of the valid data set of travel time. 4.根据权利要求1一种基于粒子群优化小波神经网络的高速公路行程时间预测方法,其特征在于,所述步骤C的具体分析过程为:4. a kind of expressway travel time prediction method based on particle swarm optimization wavelet neural network according to claim 1, is characterized in that, the concrete analysis process of described step C is: C1.网络构建;构建包含输入层、隐含层和输出层的三层小波神经网络;如图1所示,其中X1,X2,...,Xm,表示小波神经网络的输入,其中m表示输入神经元个数;Y1,Y2,...,Yn,其中n表示输出神经元个数,J表示隐含层节点个数,ωij和ωjk分别指输入层与隐含层,隐含层和输出层之间的权重,其中i=1,2,...,m;j=1,2,...,J;k=1,2,...,n;C1. Network construction; construct a three-layer wavelet neural network including input layer, hidden layer and output layer; as shown in Figure 1, where X 1 , X 2 ,..., X m , represent the input of the wavelet neural network, Where m represents the number of input neurons; Y 1 , Y 2 ,...,Y n , where n represents the number of output neurons, J represents the number of hidden layer nodes, ω ij and ω jk refer to the input layer and the Hidden layer, weight between hidden layer and output layer, where i=1,2,...,m; j=1,2,...,J; k=1,2,..., n; C2.网络初始化;随机初始化小波函数的伸缩因子aj,平移因子bj,输入层与隐含层之间的连接权重ωij和隐含层与输出层之间的连接权重ωjk;设置小波神经网络的学习速率η1和η2C2. Network initialization; randomly initialize the scaling factor a j of the wavelet function, the translation factor b j , the connection weight ω ij between the input layer and the hidden layer and the connection weight ω jk between the hidden layer and the output layer; set the wavelet the learning rates η 1 and η 2 of the neural network; 伸缩因子的调整公式如下:The adjustment formula of the scaling factor is as follows:
Figure FDA0002376793330000021
Figure FDA0002376793330000021
Figure FDA0002376793330000022
---调整前伸缩因子;
Figure FDA0002376793330000022
--- Adjust the front scaling factor;
Figure FDA0002376793330000023
---调整后伸缩因子;
Figure FDA0002376793330000023
--- Adjusted scaling factor;
η2---小波参数的学习速率,可取η2=0.01;η 2 --- the learning rate of wavelet parameters, preferably η 2 =0.01; 平移因子的调整公式如下:The adjustment formula of the translation factor is as follows:
Figure FDA0002376793330000031
Figure FDA0002376793330000031
Figure FDA0002376793330000032
---调整前平移因子值;
Figure FDA0002376793330000032
---Translation factor value before adjustment;
Figure FDA0002376793330000033
---调整后平移因子值;
Figure FDA0002376793330000033
--- Adjusted translation factor value;
η2---小波参数的学习速率,可取η2=0.01;η 2 --- the learning rate of wavelet parameters, preferably η 2 =0.01; 输入层和隐含层之间通过下式修正调整:The adjustment between the input layer and the hidden layer is adjusted by the following formula:
Figure FDA0002376793330000034
Figure FDA0002376793330000034
Figure FDA0002376793330000035
---调整之前输入层与隐含层之间的权值;
Figure FDA0002376793330000035
--- Adjust the weights between the input layer and the hidden layer before;
Figure FDA0002376793330000036
---调整之后输入层与隐含之间的权值;
Figure FDA0002376793330000036
---The weight between the input layer and the hidden layer after adjustment;
η1---网络权值参数的学习速率,可取η1=0.01;η 1 --- the learning rate of the network weight parameter, preferably η 1 =0.01; 隐含层和输出层之间可通过下式修正调整:The adjustment between the hidden layer and the output layer can be adjusted by the following formula:
Figure FDA0002376793330000037
Figure FDA0002376793330000037
Figure FDA0002376793330000038
---调整之前隐含层与输出层之间的权值;
Figure FDA0002376793330000038
--- Adjust the weights between the hidden layer and the output layer before;
Figure FDA0002376793330000039
---调整之后隐含层与输出层之间的权值;
Figure FDA0002376793330000039
---After adjustment, the weights between the hidden layer and the output layer;
η1---网络权值参数的学习速率,可取η1=0.01;η 1 --- the learning rate of the network weight parameter, preferably η 1 =0.01; C3.预测输出;将训练样本输入网络,从而计算网络的预测输出并计算网络输出和期望输出误差e;C3. Predict the output; input the training samples into the network to calculate the predicted output of the network and calculate the error e between the network output and the expected output; C4.误差计算;计算网络的预测输出和期望输出之间的误差e;具体计算公式为:C4. Error calculation; calculate the error e between the predicted output and the expected output of the network; the specific calculation formula is:
Figure FDA00023767933300000310
Figure FDA00023767933300000310
yp,k(k)---实际输出值;y p,k (k)---actual output value; tp,k---理想输出值;t p,k --- ideal output value; C5.权值修正;采用梯度下降法修正小波神经网络的权值和参数;C5. Weight correction; use the gradient descent method to correct the weights and parameters of the wavelet neural network; C6.如果训练次数大于1000或者e满足预测精度要求;e<0.0001,误差精度设定为0.0001,结束训练返回预测结果,否则继续学习和训练。C6. If the number of training times is greater than 1000 or e meets the prediction accuracy requirements; e<0.0001, the error accuracy is set to 0.0001, and the prediction result is returned after the training, otherwise the learning and training continue.
5.根据权利要求1一种基于粒子群优化小波神经网络的高速公路行程时间预测方法,其特征在于,5. a kind of expressway travel time prediction method based on particle swarm optimization wavelet neural network according to claim 1, is characterized in that, 所述步骤D的具体分析过程为:The specific analysis process of the step D is: D1.网络构建:构建包含输入层、隐含层和输出层的三层POS-WNN神经网络D1. Network construction: construct a three-layer POS-WNN neural network including input layer, hidden layer and output layer D2.参数初始化处理:系统随机生成S个粒子,并利用这些粒子的位置矢量来表示小波基函数中的伸缩因子和平移因子aj,bj;以及第i个输入和第j个隐层间的权重值权重值ωij和第j个隐层和输出层间的权重值ωj,计算公式如下;同时设定粒子的最大最小速度,学习速率及最大迭代次数;D2. Parameter initialization processing: the system randomly generates S particles, and uses the position vectors of these particles to represent the scaling factors and translation factors a j , b j in the wavelet basis function; and between the ith input and the jth hidden layer The weight value ω ij and the weight value ω j between the jth hidden layer and the output layer, the calculation formula is as follows; at the same time, set the maximum and minimum speed of the particle, the learning rate and the maximum number of iterations; xs=(xs,1,...,xs,d,...,xs,D)=(a1,...,aJ,b1,...,bJ11,...,ω1J21,...,ω2J,...,ω291,...,ω29J1,...,ωJ)x s =(x s,1 ,...,x s,d ,...,x s,D )=(a 1 ,...,a J ,b 1 ,...,b J11 ,...,ω 1J21 ,...,ω 2J ,...,ω 291 ,...,ω 29J1 ,...,ω J ) D=m×J+J×(m-n)+(m-1)×JD=m×J+J×(m-n)+(m-1)×J m---输入层节点数m---number of input layer nodes J---隐含层节点数J---the number of hidden layer nodes n---输出层节点数n---the number of output layer nodes D3.网络训练;基于实际输出值与理想输出值间的误差,计算每次迭代过程中粒子适应度,计算公式如下;D3. Network training; based on the error between the actual output value and the ideal output value, calculate the particle fitness in each iteration process, and the calculation formula is as follows;
Figure FDA0002376793330000041
Figure FDA0002376793330000041
Q---训练样本总数Q---Total number of training samples n---网络输出神经元个数n---the number of output neurons of the network yp,k(k)---实际输出值y p,k (k)---actual output value tp,k---理想输出值;t p,k --- ideal output value; D4.将粒子适应度作为判定是否达到设定的误差要求的指标,如果能够达到设定的误差要求,即适应度值基本保持不变,则完成训练,转至第F步;如果依旧达不到误差要求,则进行下一步;D4. Use the particle fitness as an indicator to determine whether the set error requirement is met. If the set error requirement can be met, that is, the fitness value remains basically unchanged, then the training is completed and go to step F; if it still fails to meet the set error requirement To the error requirement, proceed to the next step; D5.判断训练的次数是否达到了设定的最大迭代次数,如果达到了,则跳出循环,转至第F步,停止训练;否则按照下式更新粒子的速度和位置,返回步骤C继续训练;D5. Determine whether the number of training has reached the set maximum number of iterations, if so, jump out of the loop, go to step F, and stop training; otherwise, update the speed and position of the particle according to the following formula, and return to step C to continue training; vs,d(i+1)=ω×vs,d(i)+c1r1[ps,d-xs,d(i)]+c2r2[pg,d-xs,d(i)]v s,d (i+1)=ω×v s,d (i)+c 1 r 1 [p s,d -x s,d (i)]+c 2 r 2 [p g,d -x s,d (i)] xs,d(i+1)=xs,d(i)+vs,d(i+1)x s,d (i+1)=x s,d (i)+v s,d (i+1) s=1,2,..,S;d=1,2,...,Ds=1,2,..,S; d=1,2,...,D c1,c2---加速因子c 1 ,c 2 --- acceleration factor i---当前迭代次数i---current iteration number ω---惯性因子ω---Inertia factor r1,r2---0和1之间均匀分布的随机数;r 1 , r 2 --- random numbers uniformly distributed between 0 and 1; D6.网络调试:选择训练样本的特定时段样本值作为输入值,训练样本中的另一特定时段的实际值作为理想输出值,根据步骤C适应度计算公式计算误差,若满足误差精度的设定,则结束运行;若不能满足设定的误差精度,则转至第C步。D6. Network debugging: Select the sample value of the training sample in a specific period as the input value, and the actual value of another specific period in the training sample as the ideal output value, and calculate the error according to the fitness calculation formula of step C. If the error accuracy setting is satisfied , then end the operation; if the set error accuracy cannot be met, go to step C.
CN202010068929.3A 2020-01-21 2020-01-21 Particle swarm optimization wavelet neural network-based expressway travel time prediction method Pending CN111311905A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010068929.3A CN111311905A (en) 2020-01-21 2020-01-21 Particle swarm optimization wavelet neural network-based expressway travel time prediction method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010068929.3A CN111311905A (en) 2020-01-21 2020-01-21 Particle swarm optimization wavelet neural network-based expressway travel time prediction method

Publications (1)

Publication Number Publication Date
CN111311905A true CN111311905A (en) 2020-06-19

Family

ID=71144901

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010068929.3A Pending CN111311905A (en) 2020-01-21 2020-01-21 Particle swarm optimization wavelet neural network-based expressway travel time prediction method

Country Status (1)

Country Link
CN (1) CN111311905A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112633592A (en) * 2020-12-30 2021-04-09 鱼快创领智能科技(南京)有限公司 Vehicle frequent-running route calculation method and system based on machine learning clustering algorithm
CN112906993A (en) * 2021-01-12 2021-06-04 西安石油大学 Expressway green traffic station-passing inspection time prediction method
CN115158094A (en) * 2022-08-02 2022-10-11 重庆大学 Plug-in hybrid electric vehicle energy management method based on long-short-term SOC (System on chip) planning

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3099934B2 (en) * 1994-09-08 2000-10-16 株式会社東芝 Travel time prediction device
JP3212241B2 (en) * 1995-08-25 2001-09-25 株式会社東芝 Traffic flow prediction device
CN103077610A (en) * 2012-12-31 2013-05-01 清华大学 Road trip time estimating method and system
CN105355049A (en) * 2015-11-05 2016-02-24 北京航空航天大学 Highway running state evaluation method based on macroscopic fundamental diagram
CN105761488A (en) * 2016-03-30 2016-07-13 湖南大学 Real-time limit learning machine short-time traffic flow prediction method based on fusion
CN105913661A (en) * 2016-06-15 2016-08-31 北京航空航天大学 Highway road section traffic state discrimination method based on charging data
CN106372722A (en) * 2016-09-18 2017-02-01 中国科学院遥感与数字地球研究所 Subway short-time flow prediction method and apparatus
CN106971536A (en) * 2017-04-17 2017-07-21 武汉云砥信息科技有限公司 It is a kind of to merge Floating Car and the highway congestion status detection method of trackside video

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3099934B2 (en) * 1994-09-08 2000-10-16 株式会社東芝 Travel time prediction device
JP3212241B2 (en) * 1995-08-25 2001-09-25 株式会社東芝 Traffic flow prediction device
CN103077610A (en) * 2012-12-31 2013-05-01 清华大学 Road trip time estimating method and system
CN105355049A (en) * 2015-11-05 2016-02-24 北京航空航天大学 Highway running state evaluation method based on macroscopic fundamental diagram
CN105761488A (en) * 2016-03-30 2016-07-13 湖南大学 Real-time limit learning machine short-time traffic flow prediction method based on fusion
CN105913661A (en) * 2016-06-15 2016-08-31 北京航空航天大学 Highway road section traffic state discrimination method based on charging data
CN106372722A (en) * 2016-09-18 2017-02-01 中国科学院遥感与数字地球研究所 Subway short-time flow prediction method and apparatus
CN106971536A (en) * 2017-04-17 2017-07-21 武汉云砥信息科技有限公司 It is a kind of to merge Floating Car and the highway congestion status detection method of trackside video

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
姚佳辰: "基于浮动车GPS数据的城市路况判别与短时预测", 《中国优秀硕士学位论文全文数据库 工程科技Ⅱ辑》 *
李少华等: "基于改进的PSO算法的小波神经网络", 《科研新视野》 *
陈娇娜: "大数据驱动下的高速公路交通运行状态评价与分析", 《中国博士学位论文全文数据库 工程科技Ⅱ辑》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112633592A (en) * 2020-12-30 2021-04-09 鱼快创领智能科技(南京)有限公司 Vehicle frequent-running route calculation method and system based on machine learning clustering algorithm
CN112633592B (en) * 2020-12-30 2023-07-18 鱼快创领智能科技(南京)有限公司 Vehicle constant running route calculation method and system based on machine learning clustering algorithm
CN112906993A (en) * 2021-01-12 2021-06-04 西安石油大学 Expressway green traffic station-passing inspection time prediction method
CN115158094A (en) * 2022-08-02 2022-10-11 重庆大学 Plug-in hybrid electric vehicle energy management method based on long-short-term SOC (System on chip) planning

Similar Documents

Publication Publication Date Title
WO2023056696A1 (en) Urban rail transit short-term passenger flow forecasting method based on recurrent neural network
CN108269401B (en) Data-driven viaduct traffic jam prediction method
CN111951553B (en) Prediction method based on traffic big data platform and mesoscopic simulation model
CN111931978B (en) A method for predicting passenger flow status of urban rail transit based on spatiotemporal characteristics
CN115240431B (en) Real-time online simulation system and method for traffic flow of highway toll station
CN106845768B (en) Bus travel time model construction method based on survival analysis parameter distribution
CN114596700B (en) Real-time traffic estimation method for expressway section based on portal data
CN111311905A (en) Particle swarm optimization wavelet neural network-based expressway travel time prediction method
CN110210648B (en) A method for predicting strategic flow in controlled airspace based on gray long-short-term memory network
CN113591380A (en) Traffic flow prediction method, medium and equipment based on graph Gaussian process
CN115512543B (en) Vehicle path chain reconstruction method based on deep reverse reinforcement learning
CN111179592B (en) Urban traffic prediction method and system based on spatio-temporal data flow fusion analysis
CN108417032A (en) A Method for Analysis and Prediction of On-street Parking Demand in Urban Central Area
CN113449905A (en) Traffic jam early warning method based on gated cyclic unit neural network
CN112767684A (en) Highway traffic jam detection method based on charging data
CN110889092A (en) Short-time large-scale activity peripheral track station passenger flow volume prediction method based on track transaction data
Yang et al. Short-term prediction of airway congestion index using machine learning methods
CN110991776A (en) Method and system for realizing water level prediction based on GRU network
CN108600965A (en) A kind of passenger flow data prediction technique based on guest location information
CN110659774B (en) Parking demand forecasting method driven by big data method
Bao A multi-index fusion clustering strategy for traffic flow state identification
CN118397826A (en) Traffic flow prediction method based on graph neural network and distribution characterization matching
CN114116756B (en) Engineering cost data correction system and method thereof
CN110008571A (en) An urban rail transit project investment calculation method and system
CN109255956A (en) A kind of charge station&#39;s magnitude of traffic flow method for detecting abnormality

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20200619