摘要
车辆速度预测能为新能源汽车的能量管理策略提供重要的信息,但要准确地预测车速存在诸多困难。为克服交通状况、车辆类型和驾驶员意图等确定或随机因素对车速预测造成干扰的问题,提出了一种基于DK(DTW-based K-means)聚类模型的多工况速度预测器,该预测器通过DK模型对车速序列进行工况划分,并结合一维卷积神经网络和长短期记忆神经网络预测各工况下的未来车速。基于所提出的预测器,讨论了不同的输入序列长度及聚簇数对该预测器的影响,并比较了该预测器与其他常用模型的性能。结果表明,该预测器具有较好的多工况适应性,预测精度比其他模型更高。
由于全球变暖、环境污染等问题日益凸显,利用车速预测来优化新能源车的能量管理策略正成为当前的研究热点之
综上所述,为减少数据处理成本并提高预测精度,提出了一种仅以历史速度序列为输入的基于DK(DTW-based K-means)聚类模型的多工况速度预测器,该预测器主要由聚类模型和非参数预测模型两部分组成。与常见的根据特征聚类的聚类模型不同,本研究中提出的聚类模型由根据速度曲线的变化趋势聚类的K-means模型构成,为了更好地描述速度序列间的相似性,引入目前在语音识别、签名识别等方面应用较广泛的DTW(dynamic time warping)算
用于模型训练和测试的数据集来源于公共数据集Comma2k19,该数据集记录了通勤车在加州280高速公路上行驶超过33 h的各项行驶数据。从Comma2k19数据集中随机选择了约200 min的连续行驶数据来训练及验证本模型。在对原始数据集进行数据清洗后,按照时间维度将前60%的数据划分为模型的训练集,紧接着的20%作为验证集,剩下的20%作为测试集。测试集的速度曲线如

图1 测试集速度曲线
Fig. 1 The speed curve of the test set
车辆的未来速度会随着历史速度工况不同而发生变化。因此,如果使用单速度工况预测器来预测多个驾驶周期内车辆的未来速度,则在某些速度工况下预测器的性能可能会下降。提出基于DK聚类模型的多工况速度预测器来解决这一问题。预测器的整体设计框架如

图2 基于DK聚类模型的多工况速度预测器框架图
Fig. 2 The structure of multi-conditions speed predictor based on the DK clustering model
K-means是一种经典的基于迭代求解的非监督聚类算
给定2个长度分别为n与m的速度序列与,构建的局部距离矩阵C如下:
(1) |
式中:表示与之间的欧氏距离,i=1,2,…,n,j=1,2,3,…,m。以表示与之间的映射关系,k=1,2,…,K,则序列与序列间的一条翘曲路径需同时满足以下条件:
(2) |
式中:、为上的元素点,、为上的元素点,。
在所有满足条件(2)的翘曲路径中,存在一条使翘曲成本最小的最优路径,将其定义为:
(3) |
为求解公式(3),使用动态规划构算法构造一个累积成本矩阵R:
, | (4) |
则即为序列与序列的最短DTW距离。
DBA(DTW barycenter averaging)算
DK聚类模型根据输入的历史速度序列的变化趋势特征将其划分到不同的簇,每个簇都是一个子数据库,用于训练各簇所对应的conv1D-LSTM子模型,将各簇的conv1D-LSTM子模型组合起来即可得到高度适应各种速度工况的混合速度预测器。具体而言,本研究中提出的conv1D-LSTM模型是一个由conv1D网络和LSTM网络构成的序列到序列的多步速度预测模型,该模型的输入与输出都是速度序列,其输出的速度序列由多步迭代预测得到。虽然卷积神经网络一般都应用于图像处理领域,但近年来多项研究表明,卷积神经网络在空间层面上捕获水平相关信息的能力可为预测模型提供丰富的横向信息,在多个时间序列预测领域中也具有较好的效
LSTM网络是Hochreiter
(5) |
(6) |
(7) |
(8) |
(9) |
(10) |
式中:表示向量中的元素按位相乘;表示sigmoid函数;表示tanh函数;、、、、、分别表示遗忘门、输入门、输入节点、输出门、中间输出和细胞状态;、、、、、、、分别表示相对应门与输入或与中间输出相乘的权值矩阵;、、、为相对应门的偏置项。

图3 LSTM隐含层的基本单元结构
Fig. 3 The basic unit structure of LSTM hidden layer
conv1D-LSTM模型的具体设计结构如
, | (11) |
, | (12) |
(13) |
式中:表示当前时刻;表示每次迭代预测得到的速度点;速度采样频率为1 Hz,则表示前{p}s的历史速度序列;为预测的未来{T}s的速度序列。本研究中的预测器是利用历史4 s的速度序列来预测未来2 s的速度序列,因此p、T分别为4 s和2 s。

图4 序列到序列的conv1D-LSTM多步速度预测器的结构图
Fig. 4 The structure of Sequence-to-sequence conv1D-LSTM multi-step speed predictor
输入的历史速度序列长度L和聚簇数M的设置会对DK聚类模型的性能产生影响,从而进一步影响多工况速度预测器的准确性。DK聚类模型经过多轮训练后,根据DBA算法可得到各簇优化后的平均序列,各簇内的速度序列样本与该簇的平均序列具有相似的变化趋势。虽然较大的M可以使簇内样本之间的相关性更高,但簇间样本的差异性会变
(14) |
式中:Y为所有速度序列样本总数;表示第i个预测序列的j时刻的速度值;表示第i个真实速度序列的j时刻的速度值。

图5 不同(L, M)下多工况速度预测器的MAE值结果
Fig. 5 MAE result of the multi-conditions speed predictor with different (L, M) settings


图6 L取4时DK模型的具体聚类结果
Fig. 6 The detailed clustering results of the DK model (L = 4)
为比较多工况速度预测器的性能,设置了ARIMA、单层LSTM、基于DK聚类的LSTM共3种速度预测模型。其中,基于DK聚类的LSTM模型由本研究中的多工况速度预测器删减变形得到,该模型只保留了DK聚类模型和单层LSTM网络两部分。



图7 模型的预测速度曲线与真实速度曲线的对比结果
Fig. 7 Predicted and actual speed curves of models
模型 | 训练轮次 | 测试集MAE/ |
---|---|---|
ARIMA | 200 | 8.862 |
单层LSTM | 200 | 3.758 |
基于DK聚类的LSTM | 200 | 1.270 |
基于DK聚类的多工况速度预测器 | 200 | 0.212 |
从总体上看,在整个驾驶周期内,基于DK聚类的LSTM模型与本文多工况速度预测器的预测效果明显优于ARIMA和单层LSTM模型,且本文多工况速度预测器的MAE值最小。从单层LSTM模型与基于DK聚类的LSTM模型的预测结果对比可以发现,在进行速度预测前,先进行速度工况分类可有效地提高模型预测精度。从局部放大

图8 模型预测速度与实际速度的散点图
Fig. 8 Scatter plots of predicted speed against actual speed of models
针对速度工况的多变性,提出了一种基于DK聚类模型的多工况速度预测器。为实现对速度工况分类,建立了基于DTW距离的K-means聚类模型。结合一维卷积神经网络和LSTM网络的优点,设计了conv1D-LSTM多步预测模型对未来速度进行预测。讨论了输入速度序列长度和聚簇数对多工况速度预测器的影响,结果表明,当输入序列长度取4且聚簇数取5时,多工况速度预测器可取得最优性能,MAE值仅为0.212 m/s。多工况速度预测器与ARIMA、单层LSTM、基于DK聚类的LSTM模型对比的结果表明,多工况速度预测器具有更高的预测精度以及更好的工况适应性,证明该多工况速度预测器可有效地进行未来速度预测。
参考文献
Zhou Y, Ravey A, Péra M C. A survey on driving prediction techniques for predictive energy management of plug-in hybrid electric vehicles[J]. Journal of Power Sources, 2019, 412: 480-495. [百度学术]
Baker D, Asher Z D, Bradley T. V2V communication based real-world velocity predictions for improved HEV fuel economy[J/OL]. SAE Technical Papers, 2018-04-03 [2021-01-05]. https://doi.org/10.4271/2018-01-1000. [百度学术]
Yuan J N, Yang L, Chen Q. Intelligent energy management strategy based on hierarchical approximate global optimization for plug-in fuel cell hybrid electric vehicles[J]. International Journal of Hydrogen Energy, 2018, 43(16): 8063-8078. [百度学术]
Liu K, Asher Z, Gong X, et al. Vehicle velocity prediction and energy management strategy part 1: deterministic and stochastic vehicle velocity prediction using machine learning[J/OL]. SAE Technical Papers, 2019-04-02 [2021-01-05]. https://doi.org/10.4271/2019-01-1051. [百度学术]
Yeon K, Min K, Shin J, et al. Ego-vehicle speed prediction using a long short-term memory based recurrent neural network[J]. International Journal of Automotive Technology, 2019, 20(4): 713-722. [百度学术]
Lefèvre S, Sun C, Bajcsy R, et al. Comparison of parametric and non-parametric approaches for vehicle speed prediction[C]//2014 American Control Conference, June 4-6, 2014, Portland, OR, USA. IEEE, 2014: 3494-3499. [百度学术]
Vlahogianni E I, Golias J C, Karlaftis M G. Short-term traffic forecasting: Overview of objectives and methods[J]. Transport Reviews, 2004, 24(5): 533-557. [百度学术]
Sun C, Hu X S, Moura S J, et al. Velocity predictors for predictive energy management in hybrid electric vehicles[J]. IEEE Transactions on Control Systems Technology, 2015, 23(3): 1197-1204. [百度学术]
Che Z, Purushotham S, Cho K, et al. Recurrent neural networks for multivariate time series with missing values[J]. Scientific Reports, 2018, 8: 6085. [百度学术]
Xu J, Rahmatizadeh R, Bölöni L, et al. Real-time prediction of taxi demand using recurrent neural networks[J]. IEEE Transactions on Intelligent Transportation Systems, 2018, 19(8): 2572-2581. [百度学术]
Xing Y, Lv C. Dynamic state estimation for the advanced brake system of electric vehicles by using deep recurrent neural networks[J]. IEEE Transactions on Industrial Electronics, 2020, 67(11): 9536-9547. [百度学术]
Ruan S M, Ma Y. Real-time energy management strategy based on driver-action-impact MPC for series hybrid electric vehicles[J]. Complexity, 2020, 2020: 1-15. [百度学术]
Wang R, Lukic S M. Review of driving conditions prediction and driving style recognition based control algorithms for hybrid electric vehicles[C]//2011 IEEE Vehicle Power and Propulsion Conference, September 6-9, 2011, Chicago, IL, USA. IEEE, 2011: 1-7. [百度学术]
Zhou Y, Li H, Ravey A, et al. An integrated predictive energy management for light-duty range-extended plug-in fuel cell electric vehicle[J]. Journal of Power Sources, 2020, 451: 227780. [百度学术]
Bellman R, Kalaba R. On adaptive control processes[J]. IRE Transactions on Automatic Control, 1959, 4(2): 1-9. [百度学术]
Zhang Y Z, Huang Z Y, Zhang C Z, et al. Improved short-term speed prediction using spatiotemporal-vision-based deep neural network for intelligent fuel cell vehicles[J]. IEEE Transactions on Industrial Informatics, 2021, 17(9): 6004-6013. [百度学术]
Fisher D H. Knowledge acquisition via incremental conceptual clustering[J]. Machine Learning, 1987, 2(2): 139-172. [百度学术]
Huang S T, Dai G H, Sun Y L, et al. DTW-based subsequence similarity search on AMD heterogeneous computing platform[C]//2013 IEEE 10th International Conference on High Performance Computing and Communications & 2013 IEEE International Conference on Embedded and Ubiquitous Computing, November 13-15, 2013, Zhangjiajie, China. IEEE, 2013: 1054-1063. [百度学术]
Berndt D J, Clifford J. Using dynamic time warping to find patterns in time series[C]//KDD Workshop 1994, Seattle, WA, USA,1994: 359-370. [百度学术]
Petitjean F, Ketterlin A, Gançarski P. A global averaging method for dynamic time warping, with applications to clustering[J]. Pattern Recognition, 2011, 44(3): 678-693. [百度学术]
Jin X B, Yu X H, Wang X Y, et al. Prediction for time series with CNN and LSTM[M]//Proceedings of the 11th International Conference on Modelling, Identification and Control (ICMIC2019). Singapore: Springer Singapore, 2019: 631-641. [百度学术]
Corizzo R, Ceci M, Zdravevski E, et al. Scalable auto-encoders for gravitational waves detection from time series data[J]. Expert Systems With Applications, 2020, 151: 113378. [百度学术]
Sadaei H J, de Lima e Silva P C, Guimarães F G, et al. Short-term load forecasting by using a combined method of convolutional neural networks and fuzzy time series[J]. Energy, 2019, 175: 365-377. [百度学术]
Shen Z P, Zhang Y M, Lu J W, et al. A novel time series forecasting model with deep learning[J]. Neurocomputing, 2020, 396: 302-313. [百度学术]
Koprinska I, Wu D S, Wang Z. Convolutional neural networks for energy time series forecasting[C]//2018 International Joint Conference on Neural Networks (IJCNN), July 8-13, 2018, Rio de Janeiro, Brazil. IEEE, 2018: 1-8. [百度学术]
Hochreiter S, Schmidhuber J. Long short-term memory[J]. Neural Computation, 1997, 9(8): 1735-1780. [百度学术]
Srivastava N, Hinton G, Krizhevsky A, et al. Dropout: a simple way to prevent neural networks from overfitting[J]. Journal of Machine Learning Research, 2014, 15: 1929-1958. [百度学术]
Zhang F Q, Xi J Q, Langari R. Real-time energy management strategy based on velocity forecasts using V2V and V2I communications[J]. IEEE Transactions on Intelligent Transportation Systems, 2017, 18(2): 416-430. [百度学术]