Pedestrian Trajectory Prediction Model Based on Self-Attention Mechanism and Group Behavior Characteristics
-
摘要: 理解并准确预测行人的移动轨迹,对提高自动驾驶技术的水平,减少交通事故的发生有重要的意义。针对现有轨迹预测方法预测精度不高,对行人交互信息利用不充分等问题,提出了一种结合自注意力机制和结伴行为特征的行人轨迹预测模型,该模型考虑了每个行人的运动信息及其与周围行人的交互作用,使用循环神经网络和图卷积网络分别对行人的行走状态和行人间的交互进行建模。在图卷积网络中,定义图的节点表示行人的运动信息,图的边表示行人之间的交互,使用自注意力机制计算行人间的交互程度。此外,为了增加模型捕捉结伴行走行为特征的能力,提高对该类轨迹预测的精度,提出了同伴损失函数的概念。在公共数据集上的实验表明,该模型在预测精度上相比其他方法有较大的提升。Abstract: Understanding and accurately predicting the trajectory of pedestrians is of great significance to improve the level of auto-driving technology and reduce the occurrence of traffic accidents. Aiming at the problems of low prediction accuracy and insufficient utilization of pedestrian interaction information, a pedestrian trajectory prediction model based on self-attention mechanism and group behavior characteristics is presented. The model considers the movement information of each pedestrian and its interaction with the surrounding pedestrians. The recurrent neural network and graph convolutional network are used to model the pedestrian's walking state and the pedestrian's interaction separately. In the graph convolutional network, nodes of the graph represent the movement information of pedestrians, and edges of the graph represent the interaction between pedestrians. Self-attention mechanism is used to calculate pedestrian interaction. In addition, in order to increase the ability of the network to capture the group walk behavior and decrease the prediction error, a peer loss function is proposed. Experiments on public datasets show that the proposed model in this paper improves prediction accuracy significantly.
-
经典平差模型和最小二乘估计理论[1]在大地测量等众多科学研究和工程领域中应用广泛,其中,高斯-马尔科夫模型(Gauss-Markov model, GMM)最为常用,而高斯-赫尔默特模型(GaussHelmert model, GHM)可视为经典平差模型的一般通用形式。在实际应用中,坐标转换、回归模型、数字地面模型和大地测量反演等平差模型的系数矩阵包含随机的观测误差,从而使得GMM扩展为随机系数矩阵的变量含误差(errors-invariables, EIV)模型[2]。文献[3]提出同时顾及观测向量和系数矩阵中随机误差的整体最小二乘(total least squares, TLS)估计算法。TLS的非线性特征导致其受制于计算机技术的发展,直至20世纪80年代,文献[4]将TLS引入数值分析领域并提出奇异值分解算法,TLS才开始广泛应用于各专业领域并取得丰富的研究成果。文献[2]中对TLS进行了改进和扩展;文献[5]从TLS的算法、统计特性和可靠性研究等方面综述了TLS方法的研究进展。当误差相关且精度不等时,采用加权整体最小二乘估计(weighted total least squares, WTLS)方法进行求解。文献[6]研究了基于高斯-牛顿迭代法的WTLS算法,该算法假设权矩阵为特殊情况,得到的解在形式上与最小二乘(least squares, LS)解相同;文献[7]研究了在任意权矩阵的一般情况下的WTLS算法;文献[8]研究了特殊结构下WTLS算法的迭代方法并将其应用于实际场景;文献[9-12]研究了附有等式和不等式约束情况下的WTLS算法;文献[13]研究了稳健WTLS算法。
通过对EIV模型的形式进行变换,文献[14]提出部分EIV(partial EIV, PEIV)模型,提高了系数矩阵仅含部分随机量情况下的计算效率。文献[15]对PEIV模型进行线性化,推导了PEIV模型的LS算法。文献[16-17]从模型的一般性出发,将EIV模型扩展至通用EIV模型,将经典平差的GHM中观测向量的系数矩阵和参数向量的系数矩阵由固定矩阵推广为随机矩阵,涵括随机系数矩阵的各类情况,同时推导了通用EIV模型在任意权矩阵情况下的一般性WTLS算法。
通用EIV模型的非线性使得该算法在估计量较多时计算量大。本文利用非线性平差原理,将通用EIV模型展开后的二阶项纳入平差方程的常数项,从而将其转化为GHM形式,推导出通用EIV模型的线性化整体最小二乘(linearized total least squares, LTLS)算法。相较于WTLS算法,LTLS算法提高了通用EIV模型的计算效率,当参数向量初始值与最优值相差较大时,提升了迭代收敛速度。
1 通用EIV平差模型及其WTLS估计
1.1 通用EIV平差模型
GHM的形式为:
$$ \mathit{\boldsymbol{A}}\left( {\mathit{\boldsymbol{y}} + {\mathit{\boldsymbol{v}}_\mathit{\boldsymbol{y}}}} \right) + \mathit{\boldsymbol{BX}} + \mathit{\boldsymbol{w}} = \mathit{\boldsymbol{0}} $$ (1) 式中,y和vy分别为n×1维观测值向量和观测值改正数向量;X为u×1维参数向量;A为观测值向量对应的f×n维系数矩阵;B为参数向量对应的f×u维系数矩阵;w为f×1维常数向量;在经典平差函数模型的定义中,A和B均不含随机误差,为固定矩阵。
当参数向量的系数矩阵B含随机误差时,GHM(式(1))扩展为经典EIV模型。当观测值向量的系数矩阵A和参数向量的系数矩阵B均含随机误差时,GHM(式(1))扩展为通用EIV平差模型[16]:
$$ \left( {\mathit{\boldsymbol{A}} + {\mathit{\boldsymbol{V}}_\mathit{\boldsymbol{A}}}} \right)\left( {\mathit{\boldsymbol{y}} + {\mathit{\boldsymbol{v}}_\mathit{\boldsymbol{y}}}} \right) + \left( {\mathit{\boldsymbol{B}} + {\mathit{\boldsymbol{V}}_\mathit{\boldsymbol{B}}}} \right)\mathit{\boldsymbol{X}} + \mathit{\boldsymbol{w}} = \mathit{\boldsymbol{0}} $$ (2) 式中,A和VA分别为观测值向量对应的f×n维系数矩阵及其改正数矩阵;B和VB分别为参数向量对应的f×u维系数矩阵及其改正数矩阵。由于A、B和y均为随机矩阵,则通用EIV的随机模型为:
$$ \mathit{\boldsymbol{L}} = \left[ {\begin{array}{*{20}{c}} {{\mathop{\rm vec}\nolimits} (\mathit{\boldsymbol{A}})}\\ {{\mathop{\rm vec}\nolimits} (\mathit{\boldsymbol{B}})}\\ \mathit{\boldsymbol{y}} \end{array}} \right],\mathit{\boldsymbol{v}} = \left[ {\begin{array}{*{20}{c}} {{\mathop{\rm vec}\nolimits} \left( {{\mathit{\boldsymbol{V}}_\mathit{\boldsymbol{A}}}} \right)}\\ {{\mathop{\rm vec}\nolimits} \left( {{\mathit{\boldsymbol{V}}_\mathit{\boldsymbol{B}}}} \right)}\\ {{\mathit{\boldsymbol{v}}_\mathit{\boldsymbol{y}}}} \end{array}} \right] = \left[ {\begin{array}{*{20}{l}} {{\mathit{\boldsymbol{v}}_\mathit{\boldsymbol{A}}}}\\ {{\mathit{\boldsymbol{v}}_\mathit{\boldsymbol{B}}}}\\ {{\mathit{\boldsymbol{v}}_\mathit{\boldsymbol{y}}}} \end{array}} \right] $$ (3) $$ \mathit{\boldsymbol{D}}(\mathit{\boldsymbol{L}}) = \delta _0^2{\mathit{\boldsymbol{P}}^{ - 1}} = \delta _0^2\mathit{\boldsymbol{Q}} = \delta _0^2\left[ {\begin{array}{*{20}{c}} {{\mathit{\boldsymbol{Q}}_\mathit{\boldsymbol{A}}}}&{{\mathit{\boldsymbol{Q}}_{\mathit{\boldsymbol{AB}}}}}&{{\mathit{\boldsymbol{Q}}_{\mathit{\boldsymbol{Ay}}}}}\\ {{\mathit{\boldsymbol{Q}}_{\mathit{\boldsymbol{BA}}}}}&{{\mathit{\boldsymbol{Q}}_\mathit{\boldsymbol{B}}}}&{{\mathit{\boldsymbol{Q}}_{\mathit{\boldsymbol{By}}}}}\\ {{\mathit{\boldsymbol{Q}}_{\mathit{\boldsymbol{yA}}}}}&{{\mathit{\boldsymbol{Q}}_{\mathit{\boldsymbol{yB}}}}}&{{\mathit{\boldsymbol{Q}}_\mathit{\boldsymbol{y}}}} \end{array}} \right] $$ (4) 式中,vec(.)表示将矩阵按列向量化;L和v分别为观测数据的k×1维观测值向量及其改正数向量,包括A、B和y中所有观测值及其改正数,其中k=fn+fu+n; P、Q和D(L)分别为L的权矩阵、协因数矩阵和方差协方差矩阵;δ02为单位权方差。
1.2 WTLS估计
根据TLS准则,通用EIV平差模型的求解可转化为最优化估计问题[16]:
$$ \left\{ {\begin{array}{*{20}{l}} {\min {\mathit{\boldsymbol{v}}^{\rm{T}}}\mathit{\boldsymbol{Pv}}}\\ {s.t.{\rm{ }}\left( {\mathit{\boldsymbol{A}} + {\mathit{\boldsymbol{V}}_\mathit{\boldsymbol{A}}}} \right)\left( {\mathit{\boldsymbol{y}} + {\mathit{\boldsymbol{v}}_\mathit{\boldsymbol{y}}}} \right) + \left( {\mathit{\boldsymbol{B}} + {\mathit{\boldsymbol{V}}_\mathit{\boldsymbol{B}}}} \right)\mathit{\boldsymbol{X}} + \mathit{\boldsymbol{w}} = \mathit{\boldsymbol{0}}} \end{array}} \right. $$ (5) 相应目标函数为:
$$ \begin{array}{*{20}{c}} {\mathit{\Phi }(\mathit{\boldsymbol{r}},\mathit{\boldsymbol{\lambda }},\mathit{\boldsymbol{X}}) = {\mathit{\boldsymbol{v}}^{\rm{T}}}\mathit{\boldsymbol{Pv}} + 2{\mathit{\boldsymbol{\lambda }}^{\rm{T}}}\left( {\mathit{\boldsymbol{Ay}} + \mathit{\boldsymbol{A}}{\mathit{\boldsymbol{v}}_\mathit{\boldsymbol{y}}} + } \right.}\\ {\left. {{\mathit{\boldsymbol{V}}_\mathit{\boldsymbol{A}}}\mathit{\boldsymbol{y}} + {\mathit{\boldsymbol{V}}_\mathit{\boldsymbol{A}}}{\mathit{\boldsymbol{v}}_\mathit{\boldsymbol{y}}} + \mathit{\boldsymbol{BX}} + {\mathit{\boldsymbol{V}}_\mathit{\boldsymbol{B}}}\mathit{\boldsymbol{X}} + \mathit{\boldsymbol{w}}} \right)} \end{array} $$ (6) 将目标函数对估计量分别求偏导并令其等于0,得到非线性方程组:
$$ \frac{{\partial \mathit{\Phi }}}{{\partial \mathit{\boldsymbol{\hat X}}}} = 2\left( {{\mathit{\boldsymbol{B}}^{\rm{T}}}\mathit{\boldsymbol{\hat \lambda }} + \mathit{\boldsymbol{\hat V}}_\mathit{\boldsymbol{B}}^{\rm{T}}\mathit{\boldsymbol{\hat \lambda }}} \right) = \mathit{\boldsymbol{0}} $$ (7) $$ \frac{{\partial \mathit{\Phi }}}{{\partial \mathit{\boldsymbol{\hat v}}}} = 2\left( {\mathit{\boldsymbol{P\hat v}} + {{\mathit{\boldsymbol{\hat C}}}^{\rm{T}}}\mathit{\boldsymbol{\hat \lambda }}} \right) = \mathit{\boldsymbol{0}} $$ (8) $$ \frac{{\partial \mathit{\Phi }}}{{\partial \mathit{\boldsymbol{\hat \lambda }}}} = 2(\mathit{\boldsymbol{Ay}} + \mathit{\boldsymbol{B\hat X}} + \mathit{\boldsymbol{\hat C\hat v}} + \mathit{\boldsymbol{w}}) = \mathit{\boldsymbol{0}} $$ (9) 式中,$ {\boldsymbol{C}}=\left[{\boldsymbol{y}}^{\mathrm{T}} \otimes {\boldsymbol{I}}_{f} \boldsymbol{X}^{\mathrm{T}} \otimes {\boldsymbol{I}}_{f} A+\boldsymbol{V}_{{\boldsymbol{A}}}\right] ; \hat{{\boldsymbol{v}}}, \hat{\boldsymbol{X}} $分别为观测值向量和参数向量的估计值。
根据式(7)~式(9)可导出:
$$ \mathit{\boldsymbol{\hat v}} = - \mathit{\boldsymbol{Q}}{\mathit{\boldsymbol{\hat C}}^{\rm{T}}}\mathit{\boldsymbol{\hat Q}}_\mathit{\boldsymbol{C}}^{ - 1}(\mathit{\boldsymbol{Ay}} + \mathit{\boldsymbol{B\hat X}} + \mathit{\boldsymbol{w}}) $$ (10) $$ \begin{array}{*{20}{c}} {\mathit{\boldsymbol{\hat X}} = - {{\left[ {\left( {{\mathit{\boldsymbol{B}}^{\rm{T}}} + \mathit{\boldsymbol{\hat V}}_\mathit{\boldsymbol{B}}^{\rm{T}}} \right)\mathit{\boldsymbol{\hat Q}}_\mathit{\boldsymbol{C}}^{ - 1}\mathit{\boldsymbol{B}}} \right]}^{ - 1}}\left( {{\mathit{\boldsymbol{B}}^{\rm{T}}} + } \right.}\\ {\left. {\mathit{\boldsymbol{\hat V}}_\mathit{\boldsymbol{B}}^{\rm{T}}} \right)\mathit{\boldsymbol{\hat Q}}_\mathit{\boldsymbol{C}}^{ - 1}(\mathit{\boldsymbol{Ay}} + \mathit{\boldsymbol{w}})} \end{array} $$ (11) 式中,$ \hat{\boldsymbol{Q}}_{C}=\hat{\boldsymbol{C}} \boldsymbol{Q} \hat{\boldsymbol{C}}^{\mathrm{T}} $。
以式(2)的LS解作为初始值,根据式(10)和式(11)进行迭代计算可得通用EIV模型的WTLS最优解。
2 通用EIV模型的线性化估计算法
通用EIV模型是非线性模型,观测值矩阵和系数矩阵均为随机量,WTLS算法的计算量随着待估量个数增多将迅速增加。将式(2)展开,利用非线性函数平差原理[18]将二阶项作为模型误差纳入方程的常数项,从而将通用EIV模型转化为线性的GHM,推导出通用EIV模型的LTLS算法。
令X=X0+x,将式(2)展开得:
$$ \begin{array}{c} \left( {{\mathit{\boldsymbol{V}}_\mathit{\boldsymbol{A}}}\mathit{\boldsymbol{y}} + {\mathit{\boldsymbol{V}}_\mathit{\boldsymbol{B}}}{\mathit{\boldsymbol{X}}_0} + \mathit{\boldsymbol{A}}{\mathit{\boldsymbol{v}}_\mathit{\boldsymbol{y}}}} \right) + \mathit{\boldsymbol{Bx}} + (\mathit{\boldsymbol{w}} + \mathit{\boldsymbol{Ay}} + \\ \left. {\mathit{\boldsymbol{B}}{\mathit{\boldsymbol{X}}_0} + {\mathit{\boldsymbol{V}}_\mathit{\boldsymbol{A}}}{\mathit{\boldsymbol{v}}_\mathit{\boldsymbol{y}}} + {\mathit{\boldsymbol{V}}_\mathit{\boldsymbol{B}}}\mathit{\boldsymbol{x}}} \right) = \mathit{\boldsymbol{0}} \end{array} $$ (12) 式(12)可表示为:
$$ \begin{array}{*{20}{c}} {\left[ {\left( {{\mathit{\boldsymbol{y}}^{\rm{T}}} \otimes {\mathit{\boldsymbol{I}}_\mathit{\boldsymbol{f}}}} \right){\mathop{\rm vec}\nolimits} \left( {{\mathit{\boldsymbol{V}}_\mathit{\boldsymbol{A}}}} \right) + \left( {\mathit{\boldsymbol{X}}_0^{\rm{T}} \otimes {\mathit{\boldsymbol{I}}_\mathit{\boldsymbol{f}}}} \right){\mathop{\rm vec}\nolimits} \left( {{\mathit{\boldsymbol{V}}_\mathit{\boldsymbol{B}}}} \right) + \mathit{\boldsymbol{A}}{\mathit{\boldsymbol{v}}_\mathit{\boldsymbol{y}}}} \right] + }\\ {\mathit{\boldsymbol{Bx}} + \left( {\mathit{\boldsymbol{w}} + \mathit{\boldsymbol{Ay}} + \mathit{\boldsymbol{B}}{\mathit{\boldsymbol{X}}_0} + {\mathit{\boldsymbol{V}}_\mathit{\boldsymbol{A}}}{\mathit{\boldsymbol{v}}_\mathit{\boldsymbol{y}}} + {\mathit{\boldsymbol{V}}_\mathit{\boldsymbol{B}}}\mathit{\boldsymbol{x}}} \right) = \mathit{\boldsymbol{0}}} \end{array} $$ (13) 则通用EIV模型的线性化形式为:
$$ {\mathit{\boldsymbol{A}}_\mathit{\boldsymbol{l}}}{\mathit{\boldsymbol{v}}_\mathit{\boldsymbol{l}}} + \mathit{\boldsymbol{Bx}} + {\mathit{\boldsymbol{w}}_\mathit{\boldsymbol{l}}} = \mathit{\boldsymbol{0}} $$ (14) 式中,$ {\boldsymbol{A}}_{{\boldsymbol{l}}}=\left[\begin{array}{llll} {\boldsymbol{y}}^{\mathrm{T}} \otimes {\boldsymbol{I_{f}}} & \boldsymbol{X}_{0}^{\mathrm{T}} & \otimes {\boldsymbol{I_{f}}} & {\boldsymbol{A}} \end{array}\right] ; \ {\boldsymbol{v_{l}}}= \left[\begin{array}{c} \operatorname{vec}\left(\boldsymbol{V}_{{\boldsymbol{A}}}\right) \\ \operatorname{vec}\left(\boldsymbol{V}_{{\boldsymbol{B}}}\right) \\ \boldsymbol{v}_{{\boldsymbol{y}}} \end{array}\right] ; \boldsymbol{w}_{{\boldsymbol{l}}}=\boldsymbol{w}+\boldsymbol{Ay} + {\boldsymbol{B}} \boldsymbol{X}_{0}+\boldsymbol{V}_{{\boldsymbol{A}}} \boldsymbol{v}_{{\boldsymbol{y}}}+\boldsymbol{V}_{{\boldsymbol{B}}} {\boldsymbol{x}}$为常数项,即将式(2)按泰勒展开略去的二阶项VAvy+VBx作为模型误差纳入常数项。
由式(14)可知,线性化后的通用EIV模型与GHM形式一致,可使用最小二乘法得到观测值向量和参数向量:
$$ \mathit{\boldsymbol{\hat x}} = - \mathit{\boldsymbol{\hat N}}_{\mathit{\boldsymbol{bb}}}^{ - 1}{\mathit{\boldsymbol{B}}^{\rm{T}}}\mathit{\boldsymbol{\hat N}}_{\mathit{\boldsymbol{aa}}}^{ - 1}{\mathit{\boldsymbol{w}}_\mathit{\boldsymbol{l}}} $$ (15) $$ {{\mathit{\boldsymbol{\hat v}}}_\mathit{\boldsymbol{l}}} = - \mathit{\boldsymbol{Q}}{{\mathit{\boldsymbol{\hat A}}}_\mathit{\boldsymbol{l}}}\mathit{\boldsymbol{\hat N}}_{\mathit{\boldsymbol{aa}}}^{ - 1}\left( {\mathit{\boldsymbol{B\hat x}} + {\mathit{\boldsymbol{w}}_\mathit{\boldsymbol{l}}}} \right) $$ (16) 式中,$ \boldsymbol{N}_{{\boldsymbol{a a}}}=\boldsymbol{A}_{{\boldsymbol{l}}} \boldsymbol{Q} \boldsymbol{A}_{{\boldsymbol{l}}}^{\mathrm{T}} ; \boldsymbol{N}_{{\boldsymbol{b b}}}= {\boldsymbol{B}}^{\mathrm{T}} \boldsymbol{N}_{{\boldsymbol{a a}}}^{-1} {\boldsymbol{B}} $; Q为观测值向量的协因数矩阵。
通用EIV模型的LTLS算法步骤如下:
1)将实际模型表示为式(2),将观测数据代入得到A、B和y矩阵,并给出观测值数据的协因数阵Q,包括观测值向量Qy、观测值向量系数矩阵QA、参数向量系数矩阵QB。
2)计算通用EIV模型的LS解作为初始参数解:$ \hat{\boldsymbol{X}}^{0}=-\left({\boldsymbol{B}}^{\mathrm{T}}\left({\boldsymbol{A }}\boldsymbol{Q}_{{\boldsymbol{y}}} {\boldsymbol{A}}^{\mathrm{T}}\right)^{-1} {\boldsymbol{B}}\right)^{-1} {\boldsymbol{B}}^{\mathrm{T}}\left({\boldsymbol{A}} \boldsymbol{Q}_{{\boldsymbol{y}}} {\boldsymbol{A}}^{\mathrm{T}}\right)^{-1} · ({\boldsymbol{A y}}+{\boldsymbol{w}})$, 观测值向量改正数初始值取0。
3)根据式(15)和式(16)进行迭代计算,每次迭代将上一次估计值作为初始值代入新的迭代过程,直至前后两次估计值之差小于设定阈值。
GHM按泰勒级数展开仅包含常数项、一阶项(二阶及以上项全部为零),将二阶项纳入线性化后的常数项,该方法极大地减弱了线性化引起的模型误差。因此,在同样以LS解作为初值的情况下,GHM线性化的LTLS解与WTLS解的收敛性一致。此外,根据文献[19]中EIV模型LS解偏差的研究结果,在当前测量技术手段和观测精度条件下,以有偏的LS解作为初值,能够保证TLS迭代计算收敛,除非出现极特殊情况导致LS初始解严重偏离最优值。
参考GHM,式(2)的LTLS算法估计结果的精度计算式为:
$$ \left\{ {\begin{array}{*{20}{l}} {\hat \delta _0^2 = \mathit{\boldsymbol{v}}_\mathit{\boldsymbol{l}}^{\rm{T}}\mathit{\boldsymbol{P}}{\mathit{\boldsymbol{v}}_\mathit{\boldsymbol{l}}}/\mathit{r}}\\ {\mathit{\boldsymbol{Q}}(\mathit{\boldsymbol{\hat x}}) = {{\left( {{\mathit{\boldsymbol{B}}^{\rm{T}}}{{\left( {{\mathit{\boldsymbol{A}}_\mathit{\boldsymbol{l}}}\mathit{\boldsymbol{QA}}_\mathit{\boldsymbol{l}}^{\rm{T}}} \right)}^{ - 1}}\mathit{\boldsymbol{B}}} \right)}^{ - 1}}}\\ {\mathit{\boldsymbol{Q}}(\mathit{\boldsymbol{\hat L}}) = \mathit{\boldsymbol{Q}} - \mathit{\boldsymbol{QA}}_\mathit{\boldsymbol{l}}^{\rm{T}}\left( {\mathit{\boldsymbol{N}}_\mathit{\boldsymbol{A}}^{ - 1}\left( {\mathit{\boldsymbol{I}} - \mathit{\boldsymbol{B}}{\mathit{\boldsymbol{Q}}_{\mathit{\boldsymbol{\hat x}}}}{\mathit{\boldsymbol{B}}^{\rm{T}}}\mathit{\boldsymbol{N}}_\mathit{\boldsymbol{A}}^{ - 1}} \right){\mathit{\boldsymbol{A}}_\mathit{\boldsymbol{l}}}\mathit{\boldsymbol{Q}}} \right)}\\ {\mathit{\boldsymbol{D}}(\mathit{\boldsymbol{\hat x}}) = \hat \delta _0^2\mathit{\boldsymbol{Q}}(\mathit{\boldsymbol{\hat x}})}\\ {\mathit{\boldsymbol{D}}(\mathit{\boldsymbol{\hat L}}) = \hat \delta _0^2\mathit{\boldsymbol{Q}}(\mathit{\boldsymbol{\hat L}})} \end{array}} \right. $$ (17) 式中,多余观测数r=n-t; n为观测值个数;t为必要观测值个数;r与GHM的多余观测数相同;$ \boldsymbol{N}_{{\boldsymbol{A}}}=\boldsymbol{A}_{{\boldsymbol{l}}} \boldsymbol{P}^{-1} \boldsymbol{A}_{{\boldsymbol{l}}}^{\mathrm{T}} $。
3 LTLS算法实例分析
按照LTLS算法步骤设计实验,比较LTLS算法与WTLS算法的计算结果,验证LTLS算法的正确性、高效性和可行性。实验1设计模拟数据,比较分析单组实验结果和1 000组实验统计结果,验证LTLS算法的正确性;实验2在待估计量数目取不同量级时,比较两种算法的计算时间,验证LTLS算法的高效性;实验3通过实例验证LTLS算法的可行性。
3.1 实验1
在通用EIV模型(式(2))中,设置参数真值X=[5 10]T,系数矩阵A和B中随机量的中误差分别设为0.01和0.02,观测向量y的中误差设为0.03。A、B、y和常数向量w的模拟数据如下:
$$ \mathit{\boldsymbol{A}} = \left[ {\begin{array}{*{20}{c}} {12.469}&{11.096}&{15.872}&{11.725}\\ {8.883}&{10.291}&{2.929}&{3.666}\\ {12.321}&{1.109}&{6.392}&{15.809}\\ {3.551}&{12.104}&{3.867}&{1.257} \end{array}} \right], $$ $$ \mathit{\boldsymbol{B}} = \left[ {\begin{array}{*{20}{l}} {10.410}&{17.544}\\ {18.033}&{15.171}\\ {18.631}&{15.855}\\ {15.671}&{11.878} \end{array}} \right], $$ $$ \mathit{\boldsymbol{y}} = \left[ {\begin{array}{*{20}{l}} {27.543}\\ {20.727}\\ {20.839}\\ {25.033} \end{array}} \right],\mathit{\boldsymbol{w}} = \left[ {\begin{array}{*{20}{c}} { - 1425.323}\\ { - 852.619}\\ { - 1142.913}\\ { - 658.407} \end{array}} \right]。 $$ 采用LTLS算法和WTLS算法的估计结果如表 1所示,LTLS参数解与WTLS参数解完全相等,验证了LTLS算法的正确性。
表 1 参数解及其方差估计值Table 1. Parameter Values and Mean Square Deviations算法 参数解 中误差 $ \hat {\boldsymbol{X}} _1 $ $ \hat {\boldsymbol{X}} _2 $ $ σ _{\hat{\boldsymbol{X}}_1} $ $ σ_ {\hat{\boldsymbol{X}}_2} $ LTLS算法 5.012 551 9.994 964 0.039 9 0.051 9 WTLS算法 5.012 551 9.994 964 0.039 9 0.051 9 为了进一步验证LTLS算法的正确性,首先采用模拟的1 000组数据计算LTLS和WTLS参数解的均值$ {\rm{avg}} (\hat {\boldsymbol{X}} _1) 和 {\rm{avg}} (\hat {\boldsymbol{X}} _2) $,并将参数解均值代入式(17),求得LTLS参数解的协因数阵估值$ {\boldsymbol{Q}}(\hat {\boldsymbol{X}} )$,然后利用参数真值求得精确的参数协因数阵$ \overline{\boldsymbol{Q}}(\hat{\boldsymbol{X}})={\boldsymbol{E}}_{{\boldsymbol{X}}}^{\mathrm{T}} \boldsymbol{E}_{{\boldsymbol{X}}} /(m-n) , {\boldsymbol{E}}_{{\boldsymbol{X}}}=\left[\begin{array}{ll} \hat{{\boldsymbol{X}}}_{1}^{(j)}-5 & \hat{{\boldsymbol{X}}}_{2}^{(j)}-10 \end{array}\right] $,计算结果见表 2。1 000组数据的LTLS参数解和WTLS参数解与参数真值偏差的统计分析见图 1和图 2。
表 2 1000组实验的参数解均值和协因数阵Table 2. Average Parameter Values and Co⁃variance Matrix in 1 000 Experiments算法 参数解均值 协因数阵 $ {\rm{avg}} ( \hat{\boldsymbol{X}}_1) $ $ {\rm{avg}} ( \hat{\boldsymbol{X}}_2) $ $ {\boldsymbol{Q }}( \hat{\boldsymbol{X}} ) $ $ \bar{ \boldsymbol{Q }}( \hat{\boldsymbol{X}} ) $ LTLS算法 5.009 427 9.998 257 0.004 3 −0.005 1 0.004 2 −0.004 9 −0.005 1 0.007 3 −0.004 9 0.007 2 WTLS算法 5.009 427 9.998 257 0.004 3 −0.005 1 0.004 2 −0.004 9 −0.005 1 0.007 3 −0.004 9 0.007 2 由表 2、图 1和图 2可以看出,LTLS算法与WTLS算法的统计结果完全一致,说明在每次实验中两种算法所求参数解均一致,验证了LTLS算法的正确性。同时两种计算协因数阵的方法结果非常相近,验证了参数协因数阵一阶近似估计公式(17)的有效性[17]。
3.2 实验2
为分析LTLS算法的计算效率,设计通用EIV模型中待估计量个数在不同的数量级情况,采用LTLS算法和WTLS算法计算100组模拟数据的平均迭代次数N、平均解算时间t和减少比例(LTLS算法较WTLS算法减少的平均解算时间与WTLS算法平均解算时间之比),结果见表 3。
表 3 LTLS算法和WTLS算法计算效率的比较Table 3. Comparison of Computational Efficiency Between LTLS Algorithm and WTLS Algorithm待估量数量 NLTLS NWTLS tLTLS tWTLS 减少比例/% 10 5.18 4.5 0.224 ms 0.191 ms − 100 5.04 6.36 0.681 ms 0.724 ms 5.9 1 000 5 6.75 0.033 s 0.044 s 25.0 10 000 5 7.5 2.681 s 3.909 s 31.4 从表 3可以看出,两种算法每次迭代的平均时间基本一致;当模型估计量数量较少时,两种算法的效率基本相当,随着估计量的数量级逐渐增大,LTLS算法的效率高于WTLS算法。原因在于GHM按泰勒级数展开后,仅包含常数项、一阶项(二阶及以上项全部为零),LTLS算法将二阶项纳入常数项,减小了线性化引起的模型误差,迭代计算收敛更快,迭代次数减少,使得计算效率提高。
3.3 实验3
本文采用的摄影测量实例示意图如图 3所示,由3个地面摄像机S1、S2和S3拍摄两个目标点P1和P2组成,相机主距f=100 mm,距离l1、l2、l3、l4、l5、l6、y1、y2的观测值和中误差见表 4。
表 4 距离观测值及其中误差Table 4. Distance Observations and Standard Deviations统计项 l1/mm l2/mm l3/mm l4/mm l5/mm l6/mm y1/m y2/m 观测值 14.1 16.6 6.1 7.1 22.1 26.3 10.0 8.0 中误差 0.10 0.10 0.10 0.10 0.10 0.10 0.05 0.05 根据图 3可得到误差方程:
$$ \left\{\begin{array}{l} l_{1} x_{2}-f x_{1}=0 \\ l_{2} x_{4}-f x_{3}=0 \\ l_{3} x_{2}+f y_{1}+f x_{1}=0 \\ l_{4} x_{4}+f y_{1}+f x_{3}=0 \\ l_{5} x_{2}-f y_{1}-f y_{2}+f x_{1}=0 \\ l_{6} x_{4}-f y_{1}-f y_{2}+f x_{3}=0 \end{array}\right. $$ (18) 构建通用EIV模型来估计点P1和点P2的坐标,由误差方程可得:
$$ \begin{array}{l} \mathit{\boldsymbol{A}} = \left[ {\begin{array}{*{20}{c}} 0&0\\ 0&0\\ { - f}&0\\ { - f}&0\\ { - f}&{ - f}\\ { - f}&{ - f} \end{array}} \right],\mathit{\boldsymbol{B}} = \left[ {\begin{array}{*{20}{c}} { - f}&{{l_1}}&0&0\\ 0&0&{ - f}&{{l_2}}\\ f&{{l_3}}&0&0\\ 0&0&f&{{l_4}}\\ f&{{l_5}}&0&0\\ 0&0&f&{{l_6}} \end{array}} \right],\\ \mathit{\boldsymbol{y}} = \left[ {\begin{array}{*{20}{l}} {{y_1}}\\ {{y_2}} \end{array}} \right],\mathit{\boldsymbol{x}} = \left[ {\begin{array}{*{20}{l}} {{x_1}}\\ {{x_2}}\\ {{x_3}}\\ {{x_4}} \end{array}} \right],\mathit{\boldsymbol{w}} = \left[ {\begin{array}{*{20}{l}} 0\\ 0\\ 0\\ 0\\ 0\\ 0 \end{array}} \right] \end{array} $$ (19) 由式(19)可知矩阵A不含有随机误差,则该矩阵的改正数矩阵为零矩阵。采用LTLS算法和WTLS算法解算,设置阈值为1×10-8,结果见表 5和表 6。两种方法所得坐标估值和距离观测值估值完全一致,该实例表示为通用EIV模型时系数矩阵中待估计量较少,所以两个算法收敛速度相差不大。
表 5 点P1和点P2的坐标估值/mTable 5. Coordinate Estimates of P1 and P2 /m算法 坐标估值 $ \hat x_1 $ $ \hat x_2 $ $ \hat x_3 $ $ \hat x_4 $ LTLS算法 6.995 056 5 49.715 632 6.981 465 5 41.968 315 9 WTLS算法 6.995 056 5 49.715 632 6.981 465 5 41.968 315 9 表 6 距离观测值估值Table 6. Estimation of Distance Observations算法 $ \hat l_1 $/mm $ \hat l_2 $/mm $ \hat l_3 $/mm $ \hat l_4 $/mm $ \hat l_5 $5/mm $ \hat l_6 $/mm $ \hat y_1 $/m $ \hat y_2 $/m LTLS算法 14.070 1 16.635 1 6.032 4 7.178 4 22.137 7 26.256 7 9.994 1 8.006 8 WTLS算法 14.070 1 16.635 1 6.032 4 7.178 4 22.137 7 26.256 7 9.994 1 8.006 8 4 结语
本文将通用EIV函数模型展开后的二阶项纳入模型的常数项,将通用EIV模型表示为线性形式的GHM,推导出通用EIV模型的线性化整体最小二乘算法和近似精度估计公式。实验结果表明,通用EIV模型的LTLS算法与WTLS算法结果一致,验证了该算法的正确性。此外,LTLS算法估计精度公式和WTLS估计精度公式均为一阶近似精度,因此两种算法参数的估计精度相同。当通用EIV模型的待估量数量较多时,LTLS算法比WTLS计算效率更高,在处理海量数据时更具有优势。
-
表 1 不同方法在各数据集场景下的ADE/m
Table 1 ADE of Several Models on Each Data Set /m
数据集场景 线性回归 LSTM S-LSTM SGAN 本文方法 ETH-UNIV 1.02 0.97 0.86 0.81 0.82 ETH-HOTEL 0.41 0.54 0.49 0.67 0.32 UCY-ZARA01 0.61 0.48 0.43 0.34 0.40 UCY-ZARA02 0.46 0.40 0.38 0.42 0.32 UCY-UNIV 0.74 0.69 0.61 0.60 0.50 平均值 0.65 0.62 0.55 0.58 0.47 表 2 不同方法在各数据集场景下的FDE/m
Table 2 FDE of Several Models on Each Data Set /m
数据集场景 线性回归 LSTM S-LSTM SGAN 本文模型方法 ETH-UNIV 2.18 1.80 1.77 1.52 1.72 ETH-HOTEL 0.84 1.15 1.00 1.37 0.62 UCY-ZARA01 1.19 1.01 0.91 0.69 0.87 UCY-ZARA02 0.90 0.81 0.80 0.84 0.71 UCY-UNIV 1.43 1.36 1.24 1.26 1.10 平均值 1.31 1.23 1.14 1.18 1.01 表 3 同伴损失函数验证结果(ADE/FDE) /m
Table 3 Verification Results of Peer Loss Function/m
数据集场景 含有同伴损失 不含同伴损失 ETH-UNIV 0.82/1.72 0.88/1.91 ETH-HOTEL 0.32/0.62 0.38/0.74 UCY-ZARA01 0.40/0.87 0.42/0.92 UCY-ZARA02 0.32/0.71 0.33/0.74 UCY-UNIV 0.50/1.10 0.53/1.16 平均值 0.47/1.01 0.51/1.10 -
[1] Badue C, Guidolini R, Carneiro R V, et al. Self-Driving Cars: A Survey[J]. Expert Systems with Applications, 2020, 165:113 816
[2] 赵青, 陈勇, 罗斌, 等.一种融合行人预测信息的局部路径规划算法[J].武汉大学学报·信息科学版, 2020, 45(5):667-675 doi: 10.13203/j.whugis20200105 Zhao Qing, Chen Yong, Luo Bin, et al. A Local Path Planning Algorithm Based on Pedestrian Prediction Information[J]. Geomatics and Information Science of Wuhan University, 2020, 45(5): 667-675 doi: 10.13203/j.whugis20200105
[3] 熊汉江, 郭胜, 郑先伟, 等.室内行人移动行为识别及轨迹追踪[J].武汉大学学报·信息科学版, 2018, 43(11):1 696-1 703 doi: 10.13203/j.whugis20170066 Xiong Hanjiang, Guo Sheng, Zheng Xianwei, et al. Indoor Pedestrian Mobile Activity Recognition and Trajectory Tracking[J]. Geomatics and Information Science of Wuhan University, 2018, 43(11): 1 696-1 703 doi: 10.13203/j.whugis20170066
[4] Alahi A, Goel K, Ramanathan V, et al. Social LSTM: Human Trajectory Prediction in Crowded Spaces[C].2016 IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, USA, 2016
[5] Gupta A, Johnson J, Fei F L, et al. Social GAN: Socially Acceptable Trajectories with Generative Adversarial Networks[C].2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 2018
[6] Fernando T, Denman S, Sridharan S, et al. Soft + Hardwired Attention: An LSTM Framework for Human Trajectory Prediction and Abnormal Event Detection[J]. Neural Networks, 2018, 108:466-478 doi: 10.1016/j.neunet.2018.09.002
[7] Vemula A, Muelling K, Oh J. Social Attention: Modeling Attention in Human Crowds[C]. IEEE International Conference on Robotics and Automation (ICRA), Brisbane, Australia, 2018
[8] 段炼, 胡涛, 朱欣焰, 等.顾及时空语义的疑犯位置时空预测[J].武汉大学学报·信息科学版, 2019, 44(5): 765-770 http://ch.whu.edu.cn/cn/search Duan Lian, Hu Tao, Zhu Xinyan, et al. Spatio-Temporal Prediction of Suspect Location by Spatio-Temporal Semantics[J]. Geomatics and Information Science of Wuhan University, 2019, 44(5): 765-770 http://ch.whu.edu.cn/cn/search
[9] Helbing D, Molnar P. Social Force Model for Pedestrian Dynamics[J]. Physical Review E, 1995, 51(5):4 282 doi: 10.1103/PhysRevE.51.4282
[10] Trautman P, Krause A.Unfreezing the Robot: Navigation in Dense, Interacting Crowds[C]. IEEE/RSJ International Conference on Intelligent Robots and Systems, Taipei, China, 2010
[11] Hochreiter S, Schmidhuber J U R. Long Short-Term Memory[J].Neural Computation, 1997, 9(8):1 735-1 780 doi: 10.1162/neco.1997.9.8.1735
[12] Chung J, Gulcehre C, Cho K H, et al. Empirical Evaluation of Gated Recurrent Neural Networks on Sequence Modeling[OL].http://arxiv.org/abs/1412.3555, 2014
[13] Sadeghian A, Kosaraju V, Sadeghian A, et al.Sophie: An Attentive Gan for Predicting Paths Compliant to Social and Physical Constraints[C].IEEE Conference on Computer Vision and Pattern Recognition, Long Beach, CA, USA, 2019
[14] Su H, Zhu J, Dong Y, et al. Forecast the Plausible Paths in Crowd Scenes[C]. 26th International Joint Conference on Artificial Intelligence, Melbourne, Australia, 2017
[15] Vaswani A, Shazeer N, Parmar N, et al. Attention is all You Need[C]. Advances in Neural Information Processing Systems, Long Beach, CA, USA, 2017
[16] Kipf T N, Welling M. Semi-supervised Classification with Graph Convolutional Networks[OL]. http://arxiv.org/abs/1609.02907, 2016
[17] Li Y, Yu R, Shahabi C, et al. Diffusion Convolutional Recurrent Neural Network: Data-Driven Traffic Forecasting[OL].http://arxiv.org/abs/1707.01926, 2017
[18] Yu B, Yin H, Zhu Z. Spatio-Temporal Graph Convolutional Networks: A Deep Learning Framework for Traffic Forecasting[OL].http://arxiv.org/abs/1709.04875, 2017
[19] Ying R, He R, Chen K, et al. Graph Convolutional Neural Networks for Web-Scale Recommender Systems[C].24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, London, UK, 2018
[20] 葛尧, 陈松灿.面向推荐系统的图卷积网络[J].软件学报, 2020, 31(4):1 101-1 112 Ge Yao, Chen Songcan. Graph Convolutional Network for Recommender Systems[J]. Journal of Software, 2020, 31(4):1 101-1 112
[21] Ge W, Collins R T, Ruback R B. Vision-Based Analysis of Small Groups in Pedestrian Crowds[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2012, 34(5): 1 003-1 016 doi: 10.1109/TPAMI.2011.176
[22] Lu L, Chan C Y, Wang J, et al. A Study of Pedestrian Group Behaviors in Crowd Evacuation Based on an Extended Floor Field Cellular Automaton Model[J].Transportation Research Part C:Emerging Technologies, 2017, 81: 317-329 doi: 10.1016/j.trc.2016.08.018
[23] Li Y, Tarlow D, Brockschmidt M, et al. Gated Graph Sequence Neural Networks[OL]. http://arxiv.org/abs/1511.05493, 2015
[24] Pellegrini S, Ess A, Schindler K, et al.You'll Never Walk Alone: Modeling Social Behavior for Multi-Target Tracking[C]. IEEE 12th International Conference on Computer Vision, Kyoto, Japan, 2009
[25] Lerner A, Chrysanthou Y, Lischinski D. Crowds by Example[M]//Computer Graphics Forum. Oxford, UK: Blackwell Publishing Ltd, 2007
-
期刊类型引用(6)
1. 杨根新,王友昆,谢正明. 基于广义EIV模型的矿区高程异常的无缝推估算法. 工程勘察. 2023(08): 46-51 . 百度学术
2. Jianjun ZHU,Leyang WANG,Jun HU,Bofeng LI,Haiqiang FU,Yibin YAO. Recent Advances in the Geodesy Data Processing. Journal of Geodesy and Geoinformation Science. 2023(03): 33-45 . 必应学术
3. 翁烨,陈丽,王岩. 线性化通用EIV平差模型的正则化解法. 勘察科学技术. 2023(05): 1-5 . 百度学术
4. 戴中东,孟良,高永攀,项伟. 加权整体最小二乘坐标匹配算法在机场道面测量中的应用. 测绘地理信息. 2022(02): 61-66 . 百度学术
5. 翁烨,邵德盛,甘淑. 线性化通用EIV平差模型的岭估计解法. 全球定位系统. 2022(02): 82-89 . 百度学术
6. 翁烨,邵德盛. 病态加权总体最小二乘的广义岭估计解法. 全球定位系统. 2021(06): 84-89 . 百度学术
其他类型引用(2)