# Data-Driven Simulation of Pedestrian Movement with Artificial Neural Network

Authors: Weili Wang; Jiayu Rong; Qinqin Fan; Jingjing Zhang; Xin Han; Beihua Cong
Journal: Journal of Advanced Transportation
 (2021)

---

## Abstract

To predict pedestrian movement is of vital importance in a wide range of applications. Recently, data-driven models are receiving increasing attention in pedestrian dynamics studies, demonstrating a great potential in enhancing simulation performance. This paper presents a pedestrian movement simulation model based on the artificial neural network, in which two submodels are, respectively, used to predict velocity displacement and velocity direction angle at each time step. Destination information, the pedestrian’s historical movement information, neighboring pedestrians, and environmental obstacles within a semicircular-shaped perception area are used as inputs to learn pedestrian movement behavioral rules. In the velocity direction angle submodel, a novel division method on pedestrian’s perception area is adopted. Specifically, perception radius is divided into several bands, and perception angle range is divided into a number of sectors, establishing a weighted spatial matrix to represent varied influences of neighboring pedestrians and obstacles. Experiments on two typical scenarios, the unidirectional flow and bidirectional flow in a long straight corridor, were conducted to obtain pedestrian movement datasets. Then, a series of simulation cases were conducted to investigate the proper values for critical parameters, including perception radius, perception angle division, weights of the spatial matrix, and historical movement adoption. In comparison of pedestrian trajectory between simulation results and real data, the mean trajectory error (MTE) and mean destination error (MDE) are, respectively, 0.114 m and 0.171 m in the unidirectional flow scenario, which are, respectively, 0.204 m and 0.362 m in the bidirectional flow scenario. In addition, the fundamental diagram representing density-velocity and density-flow relationships in simulation results agree well with that in real data. The results demonstrate great capacity and credibility of the presented model in simulating pedestrian movement in real applications.


---

## Body

## 1. Introduction

Walking is one of the most basic transportation modes. During the walking process, humans have the ability to navigate their ways through a crowded space. They obey a number of common-sense rules and dynamically interact with obstacles and other humans in the environment. It is important and valuable that modeling the rules and predicting pedestrian movement in a wide range of applications. For instance, to guide and improve pedestrian flows in buildings, to enhance pedestrian safety in the environment of unmanned vehicles, and to optimize robotic path planning.In the past few decades, hundreds of pedestrian movement models have been built. Typically, these models can be divided into two categories, namely, knowledge-driven models and data-driven models. The former predicts pedestrian movement by explicit rules learned from existing knowledge or common experience of pedestrians, in which force-based and grid-based models are the two main types. In terms of force-based models, the most well-known one is the Social Force (SF) model [1], in which pedestrians are self-driven particles subject to Newtonian mechanics. The social interactions of pedestrians are represented by various driving forces. The Cellular Automata (CA) model [2] and the Lattice Gas (LG) model [3] are typical examples of grid-based models. In these models, the simulation environment is discretized as uniform grids. Pedestrian movement is governed by the predefined updating rules [4]. In addition, agent-based models have also developed rapidly and been widely used in recent years. Pedestrians in these models are treated as autonomous entities with self-adaptation abilities, and the optimization approach is usually adopted to model their decision-making during the movement process. Since heterogeneity of pedestrian behavior can be explicitly considered, agent-based models show great flexibility and capacity to represent pedestrian movement in a natural manner [5]. For knowledge-based models, they are usually validated if collective behaviors, features, and phenomena can be simulated and well reflected, including the fundamental diagram relationships and self-organization phenomena, such as lane formation in a counter flow, herding, zipper effect, and faster-is-slower effect in and around bottlenecks [6]. However, due to the intrinsic complexity of pedestrian behavior, modeling rules cannot comprehensively represent all the knowledge behind their social interactions. It is therefore knowledge-based models suffer from limitations. For instance, unrealistic backward movement caused by unnecessary repulsive force in force-based models [7], and diagonal movement trajectories caused by discretization of space and time in grid-based models [7, 8]. In prediction of individual pedestrian movement details, especially the moving speed and direction in each time step, the precision of knowledge-based models remains inadequate [6, 9].To overcome these shortcomings, data-driven models have been introduced to solve pedestrian movement modeling problems. Generally, data-driven models use real data and introduce artificial intelligence approaches to predict the future trajectories of individuals [10]. In these models, historical movements of an individual, positions of his neighbors, the position of desired target, and the locations of environmental obstacles are used. For example, Ma et al. [11] proposed an artificial intelligence-based model for simulating pedestrian counter flow at a crosswalk, in which the collected real-life data was used to learn microscopic pedestrian movement behavior by the backpropagation (BP) training algorithm. Meantime, a data-driven model based on the neural network was proposed by Wei et al. [12] to learn pedestrian motion rules derived from real data. The results demonstrated good accuracy and authenticity of pedestrian movement. Song et al. [13] proposed a four-layer neural network for pedestrian motion modeling, normalization of relative positions among pedestrians, moving direction transfer, and path panning algorithms were used to increase credibility and adaptability of the model when applied to various scenarios. Recently, Martin and Parisi [14] proposed a data-driven approach using a generalized regression neural network (GRNN) for simulating pedestrian dynamics with one fixed obstacle. The model has only one free parameter; thus, relatively low number of (input/output) patterns is needed. Furthermore, deep learning-related approaches were introduced to predict pedestrian movement behavior. The pioneering work is Social-LSTM model proposed by Alahi et al. [15], in which each pedestrian is modeled by an individual LSTM. LSTMs are connected in the social pooling system, representing the influence of other pedestrians on the movement behavior of a pedestrian. Inspired by this study, several related models, such as SS-LSTM [16], Social GAN [17], SR-LSTM [18], and RAI (Recurrent Attention and Interaction) model [19] have been developed to predict pedestrian trajectories. Although the LSTM model is powerful for time series prediction, pedestrian trajectories are generated by the sequence-to-sequence prediction in these models, and existing knowledge and common experience of pedestrians are hardly considered.In review of the previous work, we notice that there is an increasing attention on data-driven model incorporated knowledge and experience of pedestrians. In the ANN-based pedestrian walking behavior model developed by Ma et al. [9], destination, pedestrian’s moving state, neighbors, obstacles, personal characteristics, and other external environmental information were specified in the input layer, and the network was trained with a large volume of real-life data. By learning realistic human knowledge, the simulation results exhibited great accuracy and realistic pedestrian behavior. In a convolutional LSTM model developed by Song et al. [20], a multichannel tensor was used to represent spatial information about crowds, including scenario map, neighboring pedestrians, fixed obstacles, relative position in the crowd, and destination. The network is deepened and trained to predict spatiotemporal trajectory sequences.Inspired by this, we develop an ANN-based pedestrian trajectory prediction model by incorporating knowledge and experience of pedestrians. Furthermore, microscopic pedestrian movement characteristics such as movement displacement and direction change are explicitly considered. The remainder of this paper is organized as follows. Section2 presents the ANN-based pedestrian movement simulation model. Section 3 introduces datasets and network training. In Section 4, influences of critical parameters are analyzed by a series of simulations in typical scenarios and the comparison of simulation results and real data on movement trajectory and the fundamental diagram is conducted in unidirectional and bidirectional flow scenarios. Section 5 concludes the paper.


## 2. Development of ANN-Based Pedestrian Movement Behavior Model

Generally, pedestrian trajectory is composed of sequential positions at different time steps. Since walking is a spatiotemporal activity, the decision-making regarding local movement of each pedestrian is mainly influenced by the following information.(1)
Destination information: each pedestrian usually tends to approach a specific destination during walking.(2)
Neighboring pedestrians: during walking, the pedestrian needs to interact with other pedestrians. In real life, pedestrians perceive information of neighboring pedestrians within a certain range.(3)
Environmental obstacles: when encountering environmental obstacles, the pedestrian needs to take actions to avoid collision, such as adjusting the walking direction and slowing the speed.(4)
The pedestrian’s historical movement information: pedestrians would not change their moving state, such as moving velocity abruptly or frequently, reflecting the inertia behavior.In an artificial neural network-based pedestrian movement model, the above information is taken as the input, which can be adjusted according to different environments. In previous works, trajectory position [15] and speed in the horizontal and vertical directions [13, 20] of a pedestrian at the next time step are usually chosen as the outputs. In the study of Zhao et al. [21], two submodels were developed to learn the magnitude and direction of pedestrian movement velocity, respectively. Inspired by this, two submodels are proposed to predict the velocity displacement and velocity direction angle of a pedestrian at each time step, respectively. Destination information, neighboring pedestrians, environmental obstacles, and subject pedestrian’s historical movement information are used as inputs for each submodel.


### 2.1. Velocity Displacement Submodel (VDSM)

The velocity displacement submodel is mainly developed to predict the velocity displacement based on the BP neural network. To determine the interacting pedestrians and obstacles, a space around the pedestrian is usually used. In most of the previous works, the space is a circle or a rectangle centered at the pedestrian [11–13]. However, a pedestrian mainly perceives the environment by visual information, that is, neighboring pedestrians and obstacles in his forward space are more important for movement decision-making. It is therefore a semicircular-shaped perception area is adopted in this paper, with his current walking direction as the bisector, as shown in Figure 1.Figure 1
Schematic diagram of a pedestrian’s perception area. The red circle represents the subject pedestrian and green and blue circles represent neighboring pedestrians and other pedestrians in the flow, respectively. The red semicircle represents the perception area of the subject pedestrian with the radius ofr.A three-layer BP neural network is chosen as the basic framework of the submodel. The output of the network is the pedestrians’ velocity displacement at the current time step. Details of the input and output parameters are illustrated in Table1.Table 1
Inputs and outputs of the VDSM.
LayerParameterMeaningInputDTit−ΔtDistance to the target point of the subject pedestrian at the last time stepDOi,kt−Δt, k=1,2,…,mDistance to thekth obstacle within the perception area of the subject pedestrian at the last time stepLxi,jt, j=1,2,…,nDistance along theX axis between the subject pedestrian and the jth neighboring pedestrian within the perception area at the current time stepLyi,jt, j=1,2,…,nDistance along theY axis between the subject pedestrian and the jth neighboring pedestrian within the perception area at the current time stepvxjt−Δt, j=1,2,…,nVelocity along theX axis of the jth neighboring pedestrian within the perception area at the last time stepvyjt−Δt, j=1,2,…,nVelocity along theY axis of the jth neighboring pedestrian within the perception area at the last time stepvit−Δt⋅l, l=1,2,…,5Velocity displacement of the subject pedestrian at the last five time stepsOutputvitVelocity displacement at the current time stepSpecifically, distances along theX and Y axes between the subject pedestrian and neighboring pedestrians within his perception area are used to represent the influence of neighboring pedestrians in this submodel, as shown in Figure 2. Different from existing studies that a fixed number of nearest neighboring pedestrians, such as 5 or 7 were used in the inputs of the neural network model [11, 20]; the number of input parameter in this submodel is not fixed. It is determined by the number of neighbors and the number of obstacles in the subject pedestrian’s perception area at each time step. To reflect the influence of the subject pedestrian’s historical movement, the velocity displacement of the subject pedestrian at the past five time steps are included in the inputs.Figure 2
Schematic diagram of the distance between the subject pedestrian and neighboring pedestrian in the perception area as well as velocity of the neighboring pedestrian along theX and Y axes. The orange circle represents the subject pedestrian, and green circles represent the neighboring pedestrian.The specific structure of the neural network model is shown in Figure3. The number of neurons in the input layer is Nin and the number of neurons in the output layer is Nout, determined by the system and equal to the number of input and output parameters, respectively. Due to the complexity of the research problem, hidden layers have to be used in the network model. If the number of neurons in the hidden layer is less as compared to the complexity of the problem, then “underfitting” may occur. If unnecessary more neurons are present in the network, then “overfitting” may occur [22]. Followed by the “rules of thumb” used in the study of Zhao et al. [21], the number of neurons in the hidden layer is estimated by the following equation:(1)Nh=Nin+Nout2.Figure 3
Architecture of the neural network in the velocity displacement submodel (VDSM).For example, if there are 5 neighbors and 2 obstacles in the subject pedestrian’s perception area at timet, then the number of neurons in input layer, output layer, and each hidden layer is 28, 1, and 15, respectively.


### 2.2. Velocity Direction Angle Submodel (VDASM)

The velocity direction submodel is mainly developed to predict the velocity direction angle based on the BP neural network. The velocity direction angle at timetβit refers to the angle rotating from direction vector v⟶it−Δt of pedestrian i at time t−Δt to the displacement vector Pit,Pit+Δt of pedestrian i. When pedestrians move forward, the value of βit ranges in −π,π. To facilitate calculation, θit ranging in 0,π is used in this submodel. When the pedestrian moves down the corridor from left to right, θit is calculated with the angle rotating from vector (0, −1) to direction vector v⟶it−Δt. While the pedestrian moves down the corridor from right to left, θit is the angle rotating from vector (0, 1) to direction vector v⟶it−Δt, as shown in Figure 4.Figure 4
Schematic diagram of the velocity direction angle of the pedestrian at the time stept−Δt. θit−Δt represents the angle between the vector of (0, −1) and the pedestrian direction vector v⟶it−Δt.To quantify the spatial distribution of the neighboring pedestrians, square grids were usually used in previous studies [20, 21]. In this submodel, we adopt a radial-based method to divide a pedestrian’s perception area. The perception radius consists of n bands with width of 0.3 m, and the semicircle angle range is divided into m sectors. To make the area of each division equal, the overlap area of the second band and each sector is further divided into 3 parts. Similarly, the overlap area of the third band and each sector is further divided into 5 parts. For the overlap area of the nth band, each sector is further divided into 2n−1 parts. Accordingly, the number of divisions in the spatial distribution matrix is NSM=n2Δm. For example, if a perception area consists of 7 bands and 4 sectors, that is, radius of the perception area is 2.1 m, angle of each fan-shaped sector is 45°, and number of divisions in the spatial matrix is 196. The schematic diagram of the perception area division is shown in Figure 5. If there is a pedestrian in the opposite moving direction or an obstacle locating in the division, the value of the division will be −1. If the division is occupied by a pedestrian in the uniform direction, its value will be 1. Otherwise, the value of a division will be 0 in the matrix. And, if a division is out of the environmental boundary, its value will also be −1.Figure 5
Schematic diagram of perception area division and weight matrix.During social interactions, pedestrians and obstacles in the front area of the subject pedestrian have a higher impact on his local movement than those located in the front left or front right area. In addition, pedestrians and obstacles which are closer to the subject pedestrian have a greater influence on his local movement [23]. Different weights are used to represent the influence of spatial distribution. Accordingly, ωb1>ωb2>ωb3, ωv2=ωv3, and ωv2>ωv1. The final weight for a specific division is ωnm=ωbn×ωvm. The influence of weights on model performance will be discussed in detail in Section 4.2.Similar to VDSM, a three-layer BP neural network is adopted as the basic framework in the submodel, as shown in Figure6. The output of the network is the pedestrians’ velocity direction angle at the current time step t. It can be determined by the target, and spatial distribution of neighboring pedestrians and obstacles within the perception is of the subject pedestrian and his historical movements. Details of the input and output parameters are illustrated in Table 2.Figure 6
Architecture of the neural network in the velocity direction angle submodel (VDASM).Table 2
Inputs and outputs of the VDSM.
LayerParameterMeaningInputATit−ΔtAngle between the target direction and walking direction of the subject pedestrian at the last time stepSMit−ΔtSpatial distribution of neighboring pedestrians and obstacles within the perception area of the subject pedestrian at the last time stepθit−Δt⋅l, l=1,2,…,5Velocity direction angle of the subject pedestrian at the last five time stepsOutputθitVelocity direction angle of the subject pedestrian at the current time step


## 2.1. Velocity Displacement Submodel (VDSM)

The velocity displacement submodel is mainly developed to predict the velocity displacement based on the BP neural network. To determine the interacting pedestrians and obstacles, a space around the pedestrian is usually used. In most of the previous works, the space is a circle or a rectangle centered at the pedestrian [11–13]. However, a pedestrian mainly perceives the environment by visual information, that is, neighboring pedestrians and obstacles in his forward space are more important for movement decision-making. It is therefore a semicircular-shaped perception area is adopted in this paper, with his current walking direction as the bisector, as shown in Figure 1.Figure 1
Schematic diagram of a pedestrian’s perception area. The red circle represents the subject pedestrian and green and blue circles represent neighboring pedestrians and other pedestrians in the flow, respectively. The red semicircle represents the perception area of the subject pedestrian with the radius ofr.A three-layer BP neural network is chosen as the basic framework of the submodel. The output of the network is the pedestrians’ velocity displacement at the current time step. Details of the input and output parameters are illustrated in Table1.Table 1
Inputs and outputs of the VDSM.
LayerParameterMeaningInputDTit−ΔtDistance to the target point of the subject pedestrian at the last time stepDOi,kt−Δt, k=1,2,…,mDistance to thekth obstacle within the perception area of the subject pedestrian at the last time stepLxi,jt, j=1,2,…,nDistance along theX axis between the subject pedestrian and the jth neighboring pedestrian within the perception area at the current time stepLyi,jt, j=1,2,…,nDistance along theY axis between the subject pedestrian and the jth neighboring pedestrian within the perception area at the current time stepvxjt−Δt, j=1,2,…,nVelocity along theX axis of the jth neighboring pedestrian within the perception area at the last time stepvyjt−Δt, j=1,2,…,nVelocity along theY axis of the jth neighboring pedestrian within the perception area at the last time stepvit−Δt⋅l, l=1,2,…,5Velocity displacement of the subject pedestrian at the last five time stepsOutputvitVelocity displacement at the current time stepSpecifically, distances along theX and Y axes between the subject pedestrian and neighboring pedestrians within his perception area are used to represent the influence of neighboring pedestrians in this submodel, as shown in Figure 2. Different from existing studies that a fixed number of nearest neighboring pedestrians, such as 5 or 7 were used in the inputs of the neural network model [11, 20]; the number of input parameter in this submodel is not fixed. It is determined by the number of neighbors and the number of obstacles in the subject pedestrian’s perception area at each time step. To reflect the influence of the subject pedestrian’s historical movement, the velocity displacement of the subject pedestrian at the past five time steps are included in the inputs.Figure 2
Schematic diagram of the distance between the subject pedestrian and neighboring pedestrian in the perception area as well as velocity of the neighboring pedestrian along theX and Y axes. The orange circle represents the subject pedestrian, and green circles represent the neighboring pedestrian.The specific structure of the neural network model is shown in Figure3. The number of neurons in the input layer is Nin and the number of neurons in the output layer is Nout, determined by the system and equal to the number of input and output parameters, respectively. Due to the complexity of the research problem, hidden layers have to be used in the network model. If the number of neurons in the hidden layer is less as compared to the complexity of the problem, then “underfitting” may occur. If unnecessary more neurons are present in the network, then “overfitting” may occur [22]. Followed by the “rules of thumb” used in the study of Zhao et al. [21], the number of neurons in the hidden layer is estimated by the following equation:(1)Nh=Nin+Nout2.Figure 3
Architecture of the neural network in the velocity displacement submodel (VDSM).For example, if there are 5 neighbors and 2 obstacles in the subject pedestrian’s perception area at timet, then the number of neurons in input layer, output layer, and each hidden layer is 28, 1, and 15, respectively.


## 2.2. Velocity Direction Angle Submodel (VDASM)

The velocity direction submodel is mainly developed to predict the velocity direction angle based on the BP neural network. The velocity direction angle at timetβit refers to the angle rotating from direction vector v⟶it−Δt of pedestrian i at time t−Δt to the displacement vector Pit,Pit+Δt of pedestrian i. When pedestrians move forward, the value of βit ranges in −π,π. To facilitate calculation, θit ranging in 0,π is used in this submodel. When the pedestrian moves down the corridor from left to right, θit is calculated with the angle rotating from vector (0, −1) to direction vector v⟶it−Δt. While the pedestrian moves down the corridor from right to left, θit is the angle rotating from vector (0, 1) to direction vector v⟶it−Δt, as shown in Figure 4.Figure 4
Schematic diagram of the velocity direction angle of the pedestrian at the time stept−Δt. θit−Δt represents the angle between the vector of (0, −1) and the pedestrian direction vector v⟶it−Δt.To quantify the spatial distribution of the neighboring pedestrians, square grids were usually used in previous studies [20, 21]. In this submodel, we adopt a radial-based method to divide a pedestrian’s perception area. The perception radius consists of n bands with width of 0.3 m, and the semicircle angle range is divided into m sectors. To make the area of each division equal, the overlap area of the second band and each sector is further divided into 3 parts. Similarly, the overlap area of the third band and each sector is further divided into 5 parts. For the overlap area of the nth band, each sector is further divided into 2n−1 parts. Accordingly, the number of divisions in the spatial distribution matrix is NSM=n2Δm. For example, if a perception area consists of 7 bands and 4 sectors, that is, radius of the perception area is 2.1 m, angle of each fan-shaped sector is 45°, and number of divisions in the spatial matrix is 196. The schematic diagram of the perception area division is shown in Figure 5. If there is a pedestrian in the opposite moving direction or an obstacle locating in the division, the value of the division will be −1. If the division is occupied by a pedestrian in the uniform direction, its value will be 1. Otherwise, the value of a division will be 0 in the matrix. And, if a division is out of the environmental boundary, its value will also be −1.Figure 5
Schematic diagram of perception area division and weight matrix.During social interactions, pedestrians and obstacles in the front area of the subject pedestrian have a higher impact on his local movement than those located in the front left or front right area. In addition, pedestrians and obstacles which are closer to the subject pedestrian have a greater influence on his local movement [23]. Different weights are used to represent the influence of spatial distribution. Accordingly, ωb1>ωb2>ωb3, ωv2=ωv3, and ωv2>ωv1. The final weight for a specific division is ωnm=ωbn×ωvm. The influence of weights on model performance will be discussed in detail in Section 4.2.Similar to VDSM, a three-layer BP neural network is adopted as the basic framework in the submodel, as shown in Figure6. The output of the network is the pedestrians’ velocity direction angle at the current time step t. It can be determined by the target, and spatial distribution of neighboring pedestrians and obstacles within the perception is of the subject pedestrian and his historical movements. Details of the input and output parameters are illustrated in Table 2.Figure 6
Architecture of the neural network in the velocity direction angle submodel (VDASM).Table 2
Inputs and outputs of the VDSM.
LayerParameterMeaningInputATit−ΔtAngle between the target direction and walking direction of the subject pedestrian at the last time stepSMit−ΔtSpatial distribution of neighboring pedestrians and obstacles within the perception area of the subject pedestrian at the last time stepθit−Δt⋅l, l=1,2,…,5Velocity direction angle of the subject pedestrian at the last five time stepsOutputθitVelocity direction angle of the subject pedestrian at the current time step


## 3. Datasets and Network Training

Datasets used in model training and evaluation are obtained from pedestrian walking experiments conducted in Shanghai Maritime University. Both unidirectional flow and bidirectional flow scenarios were considered in the experiments, each of which was performed three times.


### 3.1. Datasets

The pedestrian flow experiment scenario is a long straight corridor with the length of 12 m and the width of 3 m, as shown in Figure7. A total of 106 university students participated in the experiments. Two video cameras were mounted on the 4th floor of a student apartment, which was approximately 10.5 m above the ground. The resolution was 1920 by 1080 pixels, and the frame rate was 30 fps. At the beginning of an experiment, the participants stood in orderly rows in the waiting area, with four people in a row. When a voice instruction was given, 106 participants walked along the corridor from right to left in the unidirectional flow scenario. For the bidirectional flow scenario, 53 participants walked along the corridor from right to left, and the other 53 participants walked along the corridor from left to right.Figure 7
The sketch and screenshot of the experiment setup. It is a long straight corridor with the length of 12 m and the width of 3 m, and the central area with 2 m × 3 m of the corridor is marked as the “measurement area.” The waiting area locates to the west of the corridor, where the participants stood in orderly rows.The video recordings were firstly separated into frames, the pedestrians can be detected, and their movement trajectories in the image space can be extracted using the PeTrack software [24], see Figure 8(a). Then, the coordinates of the pedestrians from the image space (Uo’V coordinates, see Figure 8(b)) can be transformed into real space (XOY coordinates, see Figure 8(c)) using the direct linear transformation method [25].Figure 8
Pedestrian movement trajectories in the image space and real space. (a) Movement trajectory of a typical pedestrian walking in the straight corridor. (b) The movement trajectory is plotted in the image space. (c) The movement trajectory is mapped into the real space.
(a)(b)(c)


### 3.2. Data Processing

During the walking process, the pedestrian steps out his left and right legs in shifts to move forward; thus, natural oscillation can commonly be observed. To eliminate the effect of body swaying and reduce the data extraction error, pedestrian trajectories were smoothed accordingly. Since the body swaying direction is perpendicular to the walking direction of a pedestrian, onlyy coordinates were processed in this paper. The mean filter method is adopted for data smoothing, that is, the coordinates of a pedestrian at the current time step t is replaced by the mean value of the coordinates at the last time step t−1, the current time step t, and the next time step t+1. Since pedestrian movement around the two ends of the corridor is not stable, pedestrians’ movement trajectories in the corridor section 2m,10m were used for network training.


### 3.3. Network Training

In a video recording with the frame rate of 30 fps, time interval between two consecutive frames is only 1/30 s, which is too brief to observe a pedestrian movement. Due to the extraction error in each frame, velocity calculated by the position coordinates of a pedestrian in two consecutive frames could be inaccurate. Accordingly, 0.4 s is commonly adopted as the time interval for calculating individual’s instantaneous velocity [26, 27], that is, position coordinates of a pedestrian at the time t+Δt/2 and t−Δt/2 is used to obtain his instantaneous velocity at time t, and Δt is 0.4 s. In this paper, we chose a time step every 12 frames (about 0.4 s) from the videos to generate training samples. The numbers of training samples in unidirectional flow scenario and bidirectional flow scenario are 14861 and 9673, respectively.The training samples were divided into a training set, a validation set, and a testing set. The proportions are 75%, 15%, and 15%, respectively. The BP training network adopts optimization algorithm and activation functions to adjust the connection weights. The continuous modification to the connection weights of the network is aimed at achieving the minimum mean square error (MSE), which is the sum of the squares of the differences between the predicted value and the true value. This training process stops when the predefined number of epochs is performed or the MSE drops below a certain threshold. In this paper, the predefined number of epochs is 1000, the threshold of gradient is 0.00001, and the threshold of validation checks is 6. Other key training parameters and functions are as follows.(1)
Optimization algorithm: resilient backpropagation.(2)
Learning rate: it controls the rate at which the model learns. If it is too large, the learning speed will be fast, at the cost of arriving on a suboptimal final set of weights. Conversely, if it is too little, the model is allowed to learn a more optimal set of weights, but the learning or converging speed will be too slow. Based on these considerations, 0.01 is used in this paper.(3)
Activation function: the sigmoid function (Logsig) is adopted for the input and first hidden layers as well as the first and second hidden layers, and the linear transfer function (Purelin) is used for the output layer.


## 3.1. Datasets

The pedestrian flow experiment scenario is a long straight corridor with the length of 12 m and the width of 3 m, as shown in Figure7. A total of 106 university students participated in the experiments. Two video cameras were mounted on the 4th floor of a student apartment, which was approximately 10.5 m above the ground. The resolution was 1920 by 1080 pixels, and the frame rate was 30 fps. At the beginning of an experiment, the participants stood in orderly rows in the waiting area, with four people in a row. When a voice instruction was given, 106 participants walked along the corridor from right to left in the unidirectional flow scenario. For the bidirectional flow scenario, 53 participants walked along the corridor from right to left, and the other 53 participants walked along the corridor from left to right.Figure 7
The sketch and screenshot of the experiment setup. It is a long straight corridor with the length of 12 m and the width of 3 m, and the central area with 2 m × 3 m of the corridor is marked as the “measurement area.” The waiting area locates to the west of the corridor, where the participants stood in orderly rows.The video recordings were firstly separated into frames, the pedestrians can be detected, and their movement trajectories in the image space can be extracted using the PeTrack software [24], see Figure 8(a). Then, the coordinates of the pedestrians from the image space (Uo’V coordinates, see Figure 8(b)) can be transformed into real space (XOY coordinates, see Figure 8(c)) using the direct linear transformation method [25].Figure 8
Pedestrian movement trajectories in the image space and real space. (a) Movement trajectory of a typical pedestrian walking in the straight corridor. (b) The movement trajectory is plotted in the image space. (c) The movement trajectory is mapped into the real space.
(a)(b)(c)


## 3.2. Data Processing

During the walking process, the pedestrian steps out his left and right legs in shifts to move forward; thus, natural oscillation can commonly be observed. To eliminate the effect of body swaying and reduce the data extraction error, pedestrian trajectories were smoothed accordingly. Since the body swaying direction is perpendicular to the walking direction of a pedestrian, onlyy coordinates were processed in this paper. The mean filter method is adopted for data smoothing, that is, the coordinates of a pedestrian at the current time step t is replaced by the mean value of the coordinates at the last time step t−1, the current time step t, and the next time step t+1. Since pedestrian movement around the two ends of the corridor is not stable, pedestrians’ movement trajectories in the corridor section 2m,10m were used for network training.


## 3.3. Network Training

In a video recording with the frame rate of 30 fps, time interval between two consecutive frames is only 1/30 s, which is too brief to observe a pedestrian movement. Due to the extraction error in each frame, velocity calculated by the position coordinates of a pedestrian in two consecutive frames could be inaccurate. Accordingly, 0.4 s is commonly adopted as the time interval for calculating individual’s instantaneous velocity [26, 27], that is, position coordinates of a pedestrian at the time t+Δt/2 and t−Δt/2 is used to obtain his instantaneous velocity at time t, and Δt is 0.4 s. In this paper, we chose a time step every 12 frames (about 0.4 s) from the videos to generate training samples. The numbers of training samples in unidirectional flow scenario and bidirectional flow scenario are 14861 and 9673, respectively.The training samples were divided into a training set, a validation set, and a testing set. The proportions are 75%, 15%, and 15%, respectively. The BP training network adopts optimization algorithm and activation functions to adjust the connection weights. The continuous modification to the connection weights of the network is aimed at achieving the minimum mean square error (MSE), which is the sum of the squares of the differences between the predicted value and the true value. This training process stops when the predefined number of epochs is performed or the MSE drops below a certain threshold. In this paper, the predefined number of epochs is 1000, the threshold of gradient is 0.00001, and the threshold of validation checks is 6. Other key training parameters and functions are as follows.(1)
Optimization algorithm: resilient backpropagation.(2)
Learning rate: it controls the rate at which the model learns. If it is too large, the learning speed will be fast, at the cost of arriving on a suboptimal final set of weights. Conversely, if it is too little, the model is allowed to learn a more optimal set of weights, but the learning or converging speed will be too slow. Based on these considerations, 0.01 is used in this paper.(3)
Activation function: the sigmoid function (Logsig) is adopted for the input and first hidden layers as well as the first and second hidden layers, and the linear transfer function (Purelin) is used for the output layer.


## 4. Results and Discussion

The trained ANN-based model was applied to simulate pedestrian movement behavior in a unidirectional flow scenario and a bidirectional flow scenario. In the simulation, the initial position and time of each pedestrian enters the corridor is the same as those in the experiment. Then, the future position at each time step of each pedestrian is predicted by the model. Specifically, velocity displacement and velocity direction angle are predicted by VDSM and VDASM, respectively. The simulation time step for is 0.4 s (12 frames), and the parallel update is used to update the pedestrians’ locations.


### 4.1. Evaluation Indicators

In order to evaluate the model performance and accurately quantify the trajectory error between simulation results and experiment data, the following two evaluation indicators were adopted.(1)
The mean trajectory error (MTE) is calculated by the following equation:(2)MTE=1TS∑t=1TSxit,yittrue−xit,yitsim,wherexit,yittrue represents position coordinates of pedestrian i at the time t obtained from the experiment data, xit,yitsim represents the predicted position coordinates of pedestrian i at the time t from the simulation results, and TS represents the total time step. The mean of MTE is calculated by the following equation:(3)MTE¯=1N∑i=1NMTE,whereN represents the total number of pedestrians.(2)
The mean destination error (MDE) is calculated by the following equation:(4)MDE=1N∑i=1NxiTS,yiTStrue−xiTS,yiTSsim,wherexiTS,yiTStrue represents position coordinates of pedestrian i at the last time step TS obtained from the experiment data, which should be at one end of the corridor, and xiTS,yiTSsim represents the predicted position coordinates of pedestrian i at the time TS from the simulation results.


### 4.2. Parameter Sensitivity Analyses

Perceived information is vital for making movement decisions. In terms of the perception area, the radius consists ofn bands with width of 0.3 m, and the angle range is divided into m sectors. Accordingly, performance of VDASM can be influenced by the following factors: the number of bands for perception radius determination, the number of sectors for perception angle division, and the weight matrix determining the spatial distribution influence of neighboring pedestrians and obstacles. In addition, historical movement is also an important reference for predicting pedestrian’s future movement. The influences of these factors on model performance are analyzed as follows.


#### 4.2.1. Perception Radius and Angle Division

Perceived information is vital for making movement decisions. In terms of the perception area, the radius consists ofn bands with width of 0.3m, and the angle range is divided into m sectors. Accordingly, performance of VDASM can be influenced by the following factors: the number of bands for perception radius determination, the number of sectors for perception angle division, and the weight matrix determining the spatial distribution influence of neighboring pedestrians and obstacles. In addition, historical movement is also an important reference for predicting pedestrian’s future movement. The influences of these factors on model performance are analyzed as follows.In VDASM, perception radius is set with 0.6 m to 2.1 m by increment of 0.3 m in each simulation case. For the spatial matrix, weight of the first bandωb1 is 1, and the increment from the closer band to the farther band is Δωv=−0.15, that is, weight of the second band is 0.85, and so on. Similarly, weight of the sectors that are closest to the central line is 1, that is, ωvm/2=ωvm/2+1=1, and the increment from the central sectors to the adjacent outer ones is Δωv=−0.1.Table3 lists mean trajectory error and mean destination error in each case for the unidirectional flow scenario. We can find when perception radius is set as 0.6m, the model performance is the best. It is probably because pedestrians in the experiments are moving in files. That is to say, the local interactions among pedestrians are mainly longitudinal, and the pedestrian’s motion is greatly influenced by that of the predecessor especially when the spatial headway is limited [28]. If pedestrians move in files with a larger headway, the best fitted perception radius should be a greater value. In terms of the perception sector angle, simulation results with the perception angle divided into 2 sectors (i.e., each sector angle is 90°) or 6 sectors (i.e., each sector angle is 30°) outperform those with other perception angle division methods.Table 3
MTE and MDE of simulation cases with different perception radius and sector angles for the unidirectional flow scenario.
Perception sector angle (°)Perception radius (m)0.60.91.21.51.82.1MTE900.11550.12690.14260.15250.14910.1388450.12510.13040.14450.15430.14350.1695300.11730.12590.13290.13400.15540.163122.50.12140.12720.13510.15220.14950.1541180.12030.13290.13590.15000.14840.1554MDE900.17900.19440.22770.25920.24200.2256450.19630.21550.23470.25770.23140.2846300.17760.20190.20880.21150.25320.2571900.18800.20100.22180.25300.23520.2515450.18450.21340.21870.24870.23550.2502The minimum values of MTE and MDE among all the simulation cases are given in bold.In addition, model simulation performance of each case for the bidirectional flow scenario is also investigated. Results show that 0.6m is the best perception radius and 22.5° is the best sector angle for pedestrians in the bidirectional flow. Since pedestrians in the bidirectional flow need to take pedestrians in the counterflow into account for collision avoidance purpose, a finer perception angle division will facilitate decision on the velocity direction angle.


#### 4.2.2. Weight Matrix of Spatial Distribution

For the unidirectional flow scenario, perception radius is set as 0.6 m, and sector angle is set as 30° in the simulation cases. The increment of perception distance weight Δωb ranges in [−0.9, −0.1] and perception angle weight Δωv ranges in [−0.4, −0.1]. Simulation results of each case are shown in Table 4. Since a short perception radius is adopted, the model has the best performance when Δωb=−0.1 and Δωv=−0.3, demonstrating a major influence from the front forward area on pedestrian movement.Table 4
MTE and MDE of simulation cases with varied spatial matrix weights for the unidirectional flow scenario.
ΔωvΔωb−0.1−0.2−0.3−0.4−0.5−0.6−0.7−0.8−0.9MTE−0.10.12470.12390.11980.12090.11450.12100.11440.12500.1230−0.20.12700.12630.11940.12380.12860.12020.11990.12720.1269−0.30.12170.12910.12340.12720.12230.12210.12560.12050.1224−0.40.12690.12320.12370.12280.12130.12340.11960.12370.1244MDE−0.10.19560.18900.18180.18670.17380.18420.17140.19460.1879−0.20.19580.19280.18710.19380.20220.18480.18710.19920.1980−0.30.18630.20130.19130.19740.18980.19320.19510.18440.1868−0.40.20020.19190.19140.19280.18670.19330.18390.19180.1925For the bidirectional flow scenario, weight increment between the adjacent two bands isΔωb=−0.2 and weight increment from the central sectors to the adjacent outer ones is Δωv=−0.2.


#### 4.2.3. Historical Movement

When different numbers of historical movement information were used, the length of predicted movement path can be varied. Specifically, ifnh time steps are used as historical movement for the reference of initial simulation, then the actual length of predicted path can be calculated with the following equation:(5)Lap=Lp−nh⋅∑t=1nhvdi,t,where Lp represents the predicted length of corridor, that is, 8m in this paper and vdi represents the velocity displacement of pedestrian i at the first nh time steps. Since MTE and MDE can only reflect absolute error in trajectory prediction, another two evaluation indicators named mean trajectory error rate (MTEA) and mean destination error rate (MDEA) are proposed, which are calculated as follows:(6)MTEA=MTELap,MDEA=MDELap.For both unidirectional follow and bidirectional flow scenarios, different numbers of historical steps were investigated. For the unidirectional flow scenario, perception radius is0.6m with the perception angle divided into 6 sectors, and the spatial matrix with best performance obtained in section 4.2.2 is used in each simulation case. For the bidirectional flow scenario, perception radius is set as 0.6m with perception angle divided into 8 sectors, Δωb=−0.2, and Δωv=−0.2. Simulation results are represented in Table 5.Table 5
MTEA and MDEA of simulation cases considering different numbers of historical movement steps.
nhUnidirectional flowBidirectional flowMTEAMDEAMTEAMDEA50.02860.04560.04580.082060.03000.04630.04830.085670.03140.04970.05020.090880.03060.04960.05240.094990.03080.04890.05580.1003100.03420.0550.05900.1050The minimum values of MTEA and MDEA among all the simulation cases.


### 4.3. Simulation of Pedestrian Movement in Unidirectional and Bidirectional Flow Scenarios

#### 4.3.1. Unidirectional Pedestrian Flow Scenario

In the unidirectional pedestrian flow scenario, pedestrians entered the corridor from the right end and walked down the corridor to the left end. Since the experiment data are position coordinates extracted from pedestrian trajectories every few frames, the curve formed by direct connection of these discrete points cannot reproduce the real trajectories. To improve the naturality of the predicted pedestrian trajectory, the predicted discrete position coordinates were interpolated, as shown in Figure9.Figure 9
Predicted pedestrian trajectories formed by interpolation of discrete position coordinates.Using parameter values investigated in Section4.2, the simulated pedestrian trajectories are presented in Figure 10. We can see that the predicted pedestrian trajectories are basically consistent with the real trajectories in corresponding experiments.Figure 10
Comparison of predicted and real pedestrian trajectories in the unidirectional flow scenario, in which pedestrian positions of the first five time steps are used as historical movement for the reference of initial simulation. (a) Pedestrian trajectories in the experiment. (b) Pedestrian trajectories in the simulation.
(a)(b)Figure11 represents the histograms of velocity displacement distribution and velocity direction angle distribution in the unidirectional flow scenario. It can be seen that the simulation results on velocity displacement are basically consistent with the real data, but simulation results on the velocity direction angle towards left forward underperform those on the velocity direction angle towards right forward.Figure 11
Distribution histogram of velocity displacement and velocity direction angle in the unidirectional flow scenario. (a) Velocity displacement distribution of real data. (b) Velocity displacement distribution of simulation results. (c) Velocity direction angle distribution of real data. (d) Velocity direction angle of simulation results.
(a)(b)(c)(d)The mean trajectory error is 0.114 m, about 1.43% of the length of the corridor section for prediction (8 m). And, the mean destination error is 0.171m, which is about 2.14% of the length of the corridor section for prediction. Figure 12 shows the MTE-frequency and MDE-frequency histograms of the unidirectional flow scenario.Figure 12
MTE frequency and MDE frequency of the unidirectional flow scenario. (a) MTE frequency. (b) MDE frequency.
(a)(b)In addition, the fundamental diagram presenting basic relationships between density and speed or flow rate is a commonly adopted means to evaluate the performance of pedestrian simulation models. Simulated results and empirical data on the density-velocity relationship and density-flow relationship in the unidirectional flow scenario are presented in Figure13. Specifically, the density and speed data both in simulations and experiments are extracted in a 2 m × 3 m rectangle measurement area shown in Figure 7. The density and speed are calculated using the method in [29]. The overall distribution of data points in simulations basically consists of those in the experiments. It should be noted that pedestrians stood in orderly rows in the waiting area at the beginning of the experiment and walked along the corridor from right to left in four files. Thus, a relatively concentrated distribution of data in the diagram of the density-velocity relationship can be observed.Figure 13
Comparison on density-velocity and density-flow relationships between simulated results and empirical data in the unidirectional flow scenario. (a) Density-velocity relationship. (b) Density-flow relationship.
(a)(b)


#### 4.3.2. Bidirectional Pedestrian Flow Scenario

In the bidirectional pedestrian flow scenario, 53 pedestrians walked in three files from right to left, and the other 53 pedestrians walked also in three files from left to right. The predicted pedestrian trajectories are basically consistent with the real data, as shown in Figure14.Figure 14
Comparison of predicted and real pedestrian trajectories in the bidirectional flow scenario, in which pedestrian positions of the first five time steps are used as historical movement for the reference of initial simulation. (a) Pedestrian trajectories in the experiment. (b) Pedestrian trajectories in the simulation.
(a)(b)In the bidirectional pedestrian flow scenario, the mean trajectory error is0.204m, which is about 2.55% of the length of the corridor section for prediction 8m. And, the mean destination error is 0.362m, about 4.53% of the prediction length. Figure 15 shows the MTE-frequency and MDE-frequency histograms of the bidirectional flow scenario.Figure 15
MTE frequency and MDE frequency of the bidirectional flow scenario. (a) MTE frequency. (b) MDE frequency.
(a)(b)In addition, pedestrian movement data in the bidirectional flow scenario are extracted in the measurement area. Simulation results on the density-velocity and density-flow relationships of the bidirectional flow scenario agree with the real data, as shown in Figure16.Figure 16
Comparison on density-velocity and density-flow relationships between simulated results and empirical data in the bidirectional flow scenario. (a) Density-velocity relationship. (b) Density-flow relationship.
(a)(b)


## 4.1. Evaluation Indicators

In order to evaluate the model performance and accurately quantify the trajectory error between simulation results and experiment data, the following two evaluation indicators were adopted.(1)
The mean trajectory error (MTE) is calculated by the following equation:(2)MTE=1TS∑t=1TSxit,yittrue−xit,yitsim,wherexit,yittrue represents position coordinates of pedestrian i at the time t obtained from the experiment data, xit,yitsim represents the predicted position coordinates of pedestrian i at the time t from the simulation results, and TS represents the total time step. The mean of MTE is calculated by the following equation:(3)MTE¯=1N∑i=1NMTE,whereN represents the total number of pedestrians.(2)
The mean destination error (MDE) is calculated by the following equation:(4)MDE=1N∑i=1NxiTS,yiTStrue−xiTS,yiTSsim,wherexiTS,yiTStrue represents position coordinates of pedestrian i at the last time step TS obtained from the experiment data, which should be at one end of the corridor, and xiTS,yiTSsim represents the predicted position coordinates of pedestrian i at the time TS from the simulation results.


## 4.2. Parameter Sensitivity Analyses

Perceived information is vital for making movement decisions. In terms of the perception area, the radius consists ofn bands with width of 0.3 m, and the angle range is divided into m sectors. Accordingly, performance of VDASM can be influenced by the following factors: the number of bands for perception radius determination, the number of sectors for perception angle division, and the weight matrix determining the spatial distribution influence of neighboring pedestrians and obstacles. In addition, historical movement is also an important reference for predicting pedestrian’s future movement. The influences of these factors on model performance are analyzed as follows.


### 4.2.1. Perception Radius and Angle Division

Perceived information is vital for making movement decisions. In terms of the perception area, the radius consists ofn bands with width of 0.3m, and the angle range is divided into m sectors. Accordingly, performance of VDASM can be influenced by the following factors: the number of bands for perception radius determination, the number of sectors for perception angle division, and the weight matrix determining the spatial distribution influence of neighboring pedestrians and obstacles. In addition, historical movement is also an important reference for predicting pedestrian’s future movement. The influences of these factors on model performance are analyzed as follows.In VDASM, perception radius is set with 0.6 m to 2.1 m by increment of 0.3 m in each simulation case. For the spatial matrix, weight of the first bandωb1 is 1, and the increment from the closer band to the farther band is Δωv=−0.15, that is, weight of the second band is 0.85, and so on. Similarly, weight of the sectors that are closest to the central line is 1, that is, ωvm/2=ωvm/2+1=1, and the increment from the central sectors to the adjacent outer ones is Δωv=−0.1.Table3 lists mean trajectory error and mean destination error in each case for the unidirectional flow scenario. We can find when perception radius is set as 0.6m, the model performance is the best. It is probably because pedestrians in the experiments are moving in files. That is to say, the local interactions among pedestrians are mainly longitudinal, and the pedestrian’s motion is greatly influenced by that of the predecessor especially when the spatial headway is limited [28]. If pedestrians move in files with a larger headway, the best fitted perception radius should be a greater value. In terms of the perception sector angle, simulation results with the perception angle divided into 2 sectors (i.e., each sector angle is 90°) or 6 sectors (i.e., each sector angle is 30°) outperform those with other perception angle division methods.Table 3
MTE and MDE of simulation cases with different perception radius and sector angles for the unidirectional flow scenario.
Perception sector angle (°)Perception radius (m)0.60.91.21.51.82.1MTE900.11550.12690.14260.15250.14910.1388450.12510.13040.14450.15430.14350.1695300.11730.12590.13290.13400.15540.163122.50.12140.12720.13510.15220.14950.1541180.12030.13290.13590.15000.14840.1554MDE900.17900.19440.22770.25920.24200.2256450.19630.21550.23470.25770.23140.2846300.17760.20190.20880.21150.25320.2571900.18800.20100.22180.25300.23520.2515450.18450.21340.21870.24870.23550.2502The minimum values of MTE and MDE among all the simulation cases are given in bold.In addition, model simulation performance of each case for the bidirectional flow scenario is also investigated. Results show that 0.6m is the best perception radius and 22.5° is the best sector angle for pedestrians in the bidirectional flow. Since pedestrians in the bidirectional flow need to take pedestrians in the counterflow into account for collision avoidance purpose, a finer perception angle division will facilitate decision on the velocity direction angle.


### 4.2.2. Weight Matrix of Spatial Distribution

For the unidirectional flow scenario, perception radius is set as 0.6 m, and sector angle is set as 30° in the simulation cases. The increment of perception distance weight Δωb ranges in [−0.9, −0.1] and perception angle weight Δωv ranges in [−0.4, −0.1]. Simulation results of each case are shown in Table 4. Since a short perception radius is adopted, the model has the best performance when Δωb=−0.1 and Δωv=−0.3, demonstrating a major influence from the front forward area on pedestrian movement.Table 4
MTE and MDE of simulation cases with varied spatial matrix weights for the unidirectional flow scenario.
ΔωvΔωb−0.1−0.2−0.3−0.4−0.5−0.6−0.7−0.8−0.9MTE−0.10.12470.12390.11980.12090.11450.12100.11440.12500.1230−0.20.12700.12630.11940.12380.12860.12020.11990.12720.1269−0.30.12170.12910.12340.12720.12230.12210.12560.12050.1224−0.40.12690.12320.12370.12280.12130.12340.11960.12370.1244MDE−0.10.19560.18900.18180.18670.17380.18420.17140.19460.1879−0.20.19580.19280.18710.19380.20220.18480.18710.19920.1980−0.30.18630.20130.19130.19740.18980.19320.19510.18440.1868−0.40.20020.19190.19140.19280.18670.19330.18390.19180.1925For the bidirectional flow scenario, weight increment between the adjacent two bands isΔωb=−0.2 and weight increment from the central sectors to the adjacent outer ones is Δωv=−0.2.


### 4.2.3. Historical Movement

When different numbers of historical movement information were used, the length of predicted movement path can be varied. Specifically, ifnh time steps are used as historical movement for the reference of initial simulation, then the actual length of predicted path can be calculated with the following equation:(5)Lap=Lp−nh⋅∑t=1nhvdi,t,where Lp represents the predicted length of corridor, that is, 8m in this paper and vdi represents the velocity displacement of pedestrian i at the first nh time steps. Since MTE and MDE can only reflect absolute error in trajectory prediction, another two evaluation indicators named mean trajectory error rate (MTEA) and mean destination error rate (MDEA) are proposed, which are calculated as follows:(6)MTEA=MTELap,MDEA=MDELap.For both unidirectional follow and bidirectional flow scenarios, different numbers of historical steps were investigated. For the unidirectional flow scenario, perception radius is0.6m with the perception angle divided into 6 sectors, and the spatial matrix with best performance obtained in section 4.2.2 is used in each simulation case. For the bidirectional flow scenario, perception radius is set as 0.6m with perception angle divided into 8 sectors, Δωb=−0.2, and Δωv=−0.2. Simulation results are represented in Table 5.Table 5
MTEA and MDEA of simulation cases considering different numbers of historical movement steps.
nhUnidirectional flowBidirectional flowMTEAMDEAMTEAMDEA50.02860.04560.04580.082060.03000.04630.04830.085670.03140.04970.05020.090880.03060.04960.05240.094990.03080.04890.05580.1003100.03420.0550.05900.1050The minimum values of MTEA and MDEA among all the simulation cases.


## 4.2.1. Perception Radius and Angle Division

Perceived information is vital for making movement decisions. In terms of the perception area, the radius consists ofn bands with width of 0.3m, and the angle range is divided into m sectors. Accordingly, performance of VDASM can be influenced by the following factors: the number of bands for perception radius determination, the number of sectors for perception angle division, and the weight matrix determining the spatial distribution influence of neighboring pedestrians and obstacles. In addition, historical movement is also an important reference for predicting pedestrian’s future movement. The influences of these factors on model performance are analyzed as follows.In VDASM, perception radius is set with 0.6 m to 2.1 m by increment of 0.3 m in each simulation case. For the spatial matrix, weight of the first bandωb1 is 1, and the increment from the closer band to the farther band is Δωv=−0.15, that is, weight of the second band is 0.85, and so on. Similarly, weight of the sectors that are closest to the central line is 1, that is, ωvm/2=ωvm/2+1=1, and the increment from the central sectors to the adjacent outer ones is Δωv=−0.1.Table3 lists mean trajectory error and mean destination error in each case for the unidirectional flow scenario. We can find when perception radius is set as 0.6m, the model performance is the best. It is probably because pedestrians in the experiments are moving in files. That is to say, the local interactions among pedestrians are mainly longitudinal, and the pedestrian’s motion is greatly influenced by that of the predecessor especially when the spatial headway is limited [28]. If pedestrians move in files with a larger headway, the best fitted perception radius should be a greater value. In terms of the perception sector angle, simulation results with the perception angle divided into 2 sectors (i.e., each sector angle is 90°) or 6 sectors (i.e., each sector angle is 30°) outperform those with other perception angle division methods.Table 3
MTE and MDE of simulation cases with different perception radius and sector angles for the unidirectional flow scenario.
Perception sector angle (°)Perception radius (m)0.60.91.21.51.82.1MTE900.11550.12690.14260.15250.14910.1388450.12510.13040.14450.15430.14350.1695300.11730.12590.13290.13400.15540.163122.50.12140.12720.13510.15220.14950.1541180.12030.13290.13590.15000.14840.1554MDE900.17900.19440.22770.25920.24200.2256450.19630.21550.23470.25770.23140.2846300.17760.20190.20880.21150.25320.2571900.18800.20100.22180.25300.23520.2515450.18450.21340.21870.24870.23550.2502The minimum values of MTE and MDE among all the simulation cases are given in bold.In addition, model simulation performance of each case for the bidirectional flow scenario is also investigated. Results show that 0.6m is the best perception radius and 22.5° is the best sector angle for pedestrians in the bidirectional flow. Since pedestrians in the bidirectional flow need to take pedestrians in the counterflow into account for collision avoidance purpose, a finer perception angle division will facilitate decision on the velocity direction angle.


## 4.2.2. Weight Matrix of Spatial Distribution

For the unidirectional flow scenario, perception radius is set as 0.6 m, and sector angle is set as 30° in the simulation cases. The increment of perception distance weight Δωb ranges in [−0.9, −0.1] and perception angle weight Δωv ranges in [−0.4, −0.1]. Simulation results of each case are shown in Table 4. Since a short perception radius is adopted, the model has the best performance when Δωb=−0.1 and Δωv=−0.3, demonstrating a major influence from the front forward area on pedestrian movement.Table 4
MTE and MDE of simulation cases with varied spatial matrix weights for the unidirectional flow scenario.
ΔωvΔωb−0.1−0.2−0.3−0.4−0.5−0.6−0.7−0.8−0.9MTE−0.10.12470.12390.11980.12090.11450.12100.11440.12500.1230−0.20.12700.12630.11940.12380.12860.12020.11990.12720.1269−0.30.12170.12910.12340.12720.12230.12210.12560.12050.1224−0.40.12690.12320.12370.12280.12130.12340.11960.12370.1244MDE−0.10.19560.18900.18180.18670.17380.18420.17140.19460.1879−0.20.19580.19280.18710.19380.20220.18480.18710.19920.1980−0.30.18630.20130.19130.19740.18980.19320.19510.18440.1868−0.40.20020.19190.19140.19280.18670.19330.18390.19180.1925For the bidirectional flow scenario, weight increment between the adjacent two bands isΔωb=−0.2 and weight increment from the central sectors to the adjacent outer ones is Δωv=−0.2.


## 4.2.3. Historical Movement

When different numbers of historical movement information were used, the length of predicted movement path can be varied. Specifically, ifnh time steps are used as historical movement for the reference of initial simulation, then the actual length of predicted path can be calculated with the following equation:(5)Lap=Lp−nh⋅∑t=1nhvdi,t,where Lp represents the predicted length of corridor, that is, 8m in this paper and vdi represents the velocity displacement of pedestrian i at the first nh time steps. Since MTE and MDE can only reflect absolute error in trajectory prediction, another two evaluation indicators named mean trajectory error rate (MTEA) and mean destination error rate (MDEA) are proposed, which are calculated as follows:(6)MTEA=MTELap,MDEA=MDELap.For both unidirectional follow and bidirectional flow scenarios, different numbers of historical steps were investigated. For the unidirectional flow scenario, perception radius is0.6m with the perception angle divided into 6 sectors, and the spatial matrix with best performance obtained in section 4.2.2 is used in each simulation case. For the bidirectional flow scenario, perception radius is set as 0.6m with perception angle divided into 8 sectors, Δωb=−0.2, and Δωv=−0.2. Simulation results are represented in Table 5.Table 5
MTEA and MDEA of simulation cases considering different numbers of historical movement steps.
nhUnidirectional flowBidirectional flowMTEAMDEAMTEAMDEA50.02860.04560.04580.082060.03000.04630.04830.085670.03140.04970.05020.090880.03060.04960.05240.094990.03080.04890.05580.1003100.03420.0550.05900.1050The minimum values of MTEA and MDEA among all the simulation cases.


## 4.3. Simulation of Pedestrian Movement in Unidirectional and Bidirectional Flow Scenarios

### 4.3.1. Unidirectional Pedestrian Flow Scenario

In the unidirectional pedestrian flow scenario, pedestrians entered the corridor from the right end and walked down the corridor to the left end. Since the experiment data are position coordinates extracted from pedestrian trajectories every few frames, the curve formed by direct connection of these discrete points cannot reproduce the real trajectories. To improve the naturality of the predicted pedestrian trajectory, the predicted discrete position coordinates were interpolated, as shown in Figure9.Figure 9
Predicted pedestrian trajectories formed by interpolation of discrete position coordinates.Using parameter values investigated in Section4.2, the simulated pedestrian trajectories are presented in Figure 10. We can see that the predicted pedestrian trajectories are basically consistent with the real trajectories in corresponding experiments.Figure 10
Comparison of predicted and real pedestrian trajectories in the unidirectional flow scenario, in which pedestrian positions of the first five time steps are used as historical movement for the reference of initial simulation. (a) Pedestrian trajectories in the experiment. (b) Pedestrian trajectories in the simulation.
(a)(b)Figure11 represents the histograms of velocity displacement distribution and velocity direction angle distribution in the unidirectional flow scenario. It can be seen that the simulation results on velocity displacement are basically consistent with the real data, but simulation results on the velocity direction angle towards left forward underperform those on the velocity direction angle towards right forward.Figure 11
Distribution histogram of velocity displacement and velocity direction angle in the unidirectional flow scenario. (a) Velocity displacement distribution of real data. (b) Velocity displacement distribution of simulation results. (c) Velocity direction angle distribution of real data. (d) Velocity direction angle of simulation results.
(a)(b)(c)(d)The mean trajectory error is 0.114 m, about 1.43% of the length of the corridor section for prediction (8 m). And, the mean destination error is 0.171m, which is about 2.14% of the length of the corridor section for prediction. Figure 12 shows the MTE-frequency and MDE-frequency histograms of the unidirectional flow scenario.Figure 12
MTE frequency and MDE frequency of the unidirectional flow scenario. (a) MTE frequency. (b) MDE frequency.
(a)(b)In addition, the fundamental diagram presenting basic relationships between density and speed or flow rate is a commonly adopted means to evaluate the performance of pedestrian simulation models. Simulated results and empirical data on the density-velocity relationship and density-flow relationship in the unidirectional flow scenario are presented in Figure13. Specifically, the density and speed data both in simulations and experiments are extracted in a 2 m × 3 m rectangle measurement area shown in Figure 7. The density and speed are calculated using the method in [29]. The overall distribution of data points in simulations basically consists of those in the experiments. It should be noted that pedestrians stood in orderly rows in the waiting area at the beginning of the experiment and walked along the corridor from right to left in four files. Thus, a relatively concentrated distribution of data in the diagram of the density-velocity relationship can be observed.Figure 13
Comparison on density-velocity and density-flow relationships between simulated results and empirical data in the unidirectional flow scenario. (a) Density-velocity relationship. (b) Density-flow relationship.
(a)(b)


### 4.3.2. Bidirectional Pedestrian Flow Scenario

In the bidirectional pedestrian flow scenario, 53 pedestrians walked in three files from right to left, and the other 53 pedestrians walked also in three files from left to right. The predicted pedestrian trajectories are basically consistent with the real data, as shown in Figure14.Figure 14
Comparison of predicted and real pedestrian trajectories in the bidirectional flow scenario, in which pedestrian positions of the first five time steps are used as historical movement for the reference of initial simulation. (a) Pedestrian trajectories in the experiment. (b) Pedestrian trajectories in the simulation.
(a)(b)In the bidirectional pedestrian flow scenario, the mean trajectory error is0.204m, which is about 2.55% of the length of the corridor section for prediction 8m. And, the mean destination error is 0.362m, about 4.53% of the prediction length. Figure 15 shows the MTE-frequency and MDE-frequency histograms of the bidirectional flow scenario.Figure 15
MTE frequency and MDE frequency of the bidirectional flow scenario. (a) MTE frequency. (b) MDE frequency.
(a)(b)In addition, pedestrian movement data in the bidirectional flow scenario are extracted in the measurement area. Simulation results on the density-velocity and density-flow relationships of the bidirectional flow scenario agree with the real data, as shown in Figure16.Figure 16
Comparison on density-velocity and density-flow relationships between simulated results and empirical data in the bidirectional flow scenario. (a) Density-velocity relationship. (b) Density-flow relationship.
(a)(b)


## 4.3.1. Unidirectional Pedestrian Flow Scenario

In the unidirectional pedestrian flow scenario, pedestrians entered the corridor from the right end and walked down the corridor to the left end. Since the experiment data are position coordinates extracted from pedestrian trajectories every few frames, the curve formed by direct connection of these discrete points cannot reproduce the real trajectories. To improve the naturality of the predicted pedestrian trajectory, the predicted discrete position coordinates were interpolated, as shown in Figure9.Figure 9
Predicted pedestrian trajectories formed by interpolation of discrete position coordinates.Using parameter values investigated in Section4.2, the simulated pedestrian trajectories are presented in Figure 10. We can see that the predicted pedestrian trajectories are basically consistent with the real trajectories in corresponding experiments.Figure 10
Comparison of predicted and real pedestrian trajectories in the unidirectional flow scenario, in which pedestrian positions of the first five time steps are used as historical movement for the reference of initial simulation. (a) Pedestrian trajectories in the experiment. (b) Pedestrian trajectories in the simulation.
(a)(b)Figure11 represents the histograms of velocity displacement distribution and velocity direction angle distribution in the unidirectional flow scenario. It can be seen that the simulation results on velocity displacement are basically consistent with the real data, but simulation results on the velocity direction angle towards left forward underperform those on the velocity direction angle towards right forward.Figure 11
Distribution histogram of velocity displacement and velocity direction angle in the unidirectional flow scenario. (a) Velocity displacement distribution of real data. (b) Velocity displacement distribution of simulation results. (c) Velocity direction angle distribution of real data. (d) Velocity direction angle of simulation results.
(a)(b)(c)(d)The mean trajectory error is 0.114 m, about 1.43% of the length of the corridor section for prediction (8 m). And, the mean destination error is 0.171m, which is about 2.14% of the length of the corridor section for prediction. Figure 12 shows the MTE-frequency and MDE-frequency histograms of the unidirectional flow scenario.Figure 12
MTE frequency and MDE frequency of the unidirectional flow scenario. (a) MTE frequency. (b) MDE frequency.
(a)(b)In addition, the fundamental diagram presenting basic relationships between density and speed or flow rate is a commonly adopted means to evaluate the performance of pedestrian simulation models. Simulated results and empirical data on the density-velocity relationship and density-flow relationship in the unidirectional flow scenario are presented in Figure13. Specifically, the density and speed data both in simulations and experiments are extracted in a 2 m × 3 m rectangle measurement area shown in Figure 7. The density and speed are calculated using the method in [29]. The overall distribution of data points in simulations basically consists of those in the experiments. It should be noted that pedestrians stood in orderly rows in the waiting area at the beginning of the experiment and walked along the corridor from right to left in four files. Thus, a relatively concentrated distribution of data in the diagram of the density-velocity relationship can be observed.Figure 13
Comparison on density-velocity and density-flow relationships between simulated results and empirical data in the unidirectional flow scenario. (a) Density-velocity relationship. (b) Density-flow relationship.
(a)(b)


## 4.3.2. Bidirectional Pedestrian Flow Scenario

In the bidirectional pedestrian flow scenario, 53 pedestrians walked in three files from right to left, and the other 53 pedestrians walked also in three files from left to right. The predicted pedestrian trajectories are basically consistent with the real data, as shown in Figure14.Figure 14
Comparison of predicted and real pedestrian trajectories in the bidirectional flow scenario, in which pedestrian positions of the first five time steps are used as historical movement for the reference of initial simulation. (a) Pedestrian trajectories in the experiment. (b) Pedestrian trajectories in the simulation.
(a)(b)In the bidirectional pedestrian flow scenario, the mean trajectory error is0.204m, which is about 2.55% of the length of the corridor section for prediction 8m. And, the mean destination error is 0.362m, about 4.53% of the prediction length. Figure 15 shows the MTE-frequency and MDE-frequency histograms of the bidirectional flow scenario.Figure 15
MTE frequency and MDE frequency of the bidirectional flow scenario. (a) MTE frequency. (b) MDE frequency.
(a)(b)In addition, pedestrian movement data in the bidirectional flow scenario are extracted in the measurement area. Simulation results on the density-velocity and density-flow relationships of the bidirectional flow scenario agree with the real data, as shown in Figure16.Figure 16
Comparison on density-velocity and density-flow relationships between simulated results and empirical data in the bidirectional flow scenario. (a) Density-velocity relationship. (b) Density-flow relationship.
(a)(b)


## 5. Conclusions

This paper presents a pedestrian movement simulation model based on the artificial neural network, consisting of two submodels that are, respectively, used to predict velocity displacement and velocity direction angle at each time step. A semicircular-shaped perception area is adopted in each submodel; only pedestrians and obstacles within this perception area are considered for movement decision-making. In the velocity displacement submodel (VDSM), a three-layer BP neural network is chosen as the basic framework. Distance to the target point, distance to the obstacle, distances along theX and Y axes between the subject pedestrian and neighboring pedestrians within his perception area, velocity of the neighboring pedestrians at the last time step, and velocity displacement of the subject pedestrian at the last five time steps are used as model inputs to learn the velocity displacement of the subject pedestrian at the current time step. Since the number of neighboring pedestrians can be varied for different pedestrians and at different time steps, the number of input parameters is not fixed. In the velocity direction angle submodel (VDASM), a radial-based method is adopted to divide pedestrian’s perception area. Perception radius consists of n bands with width of 0.3 m, and the semicircle angle range is divided into m sectors, establishing in a spatial matrix containing n2Δm divisions. Considering distance and direction play important roles in social interactions, different weights are used to represent the influence of spatial distribution. The angle between target direction and walking direction, spatial distribution of neighboring pedestrians and obstacles, and velocity direction angle of the subject pedestrian at the last five time steps are used as inputs to learn velocity direction angle of the subject pedestrian at the current time step.Pedestrian walking experiments on two typical scenarios, unidirectional pedestrian flow and bidirectional pedestrian flow in a long straight corridor, were conducted, and datasets were extracted for model training, validation, and testing. Furthermore, a series of simulation cases were conducted to investigate the influence of critical parameters, including perception radius, perception angle division, weight matrix determining spatial distribution influence, and historical movement adoption. Proper parameter values for the unidirectional flow and bidirectional flow scenarios are identified. Lastly, simulation results are compared with experiment data on pedestrian movement trajectory and the fundamental diagram showing density-velocity and density-flow relationships. Two evaluation indicators, mean trajectory error (MTE) and mean destination error (MDE), are adopted in this paper. For the unidirectional flow scenario, the simulated results from two submodels on histograms of velocity displacement distribution and velocity direction angle distribution are basically consistent with the real data. In addition, MTE is0.114m, about 1.43% of the length of the corridor section for prediction 8m. And, MDE is 0.171m, about 2.14% of the length for prediction. In the bidirectional pedestrian flow scenario, MTE is 0.204m, about 2.55% of the length for prediction. And, MDE is 0.362m, about 4.53% of the length for prediction. The rectangle measurement area with the dimension of 2m × 3m is used to extract the density and speed data. It can be observed that density-velocity and density-flow relationships in simulation results agree well with those in real data. The results demonstrate that the presented model has a good performance on simulating pedestrian movement behavior in both unidirectional flow and bidirectional flow scenarios.The spatial matrix based on pedestrian’s perception area is proposed for velocity direction angle determination in this paper, and influences of different division and weight assignment methods on model simulation performance have been investigated. However, datasets and experiment scenarios are still limited. More scenarios including pedestrian flow with obstacles and intersecting flows will be studied in our future work.The potential applications of the proposed model may include the following aspects.(1)
Making real-time predictions of pedestrian trajectories and providing early warning for crowd safety management(2)
Anticipating motion of surrounding pedestrians and avoiding collisions for safe and efficient motion planning of service robots(3)
Understanding future trajectories of pedestrians for self-driving vehicles



---

*Source: 5580910-2021-08-29.xml*