# A Particle PHD Filter for Dynamic Grid Map Building towards Indoor Environment
## 4 Simulation
### Accuracy Comparison of Speed Estimation
#### 4.2.1 The Robot Is Stationary  
In front of the robot, the dynamic object is set (box and cylinder) to reciprocate in the x-direction. The movement process includes acceleration, deceleration, and uniform motion stages. The simulation environment built in Gazebo is shown in Figure 8a. The movement direction of dynamic object is shown in Figure 8b.  
Using Equations (37) and (38), we can get the overall average speed of the dynamic object. However, the speed estimated here is based on the grid, which needs to be multiplied by the resolution of the dynamic grid map and converted to metric units. At the same time, it needs to be converted from the speed in the dynamic grid coordinate system to the speed in the global coordinate system using Equation (21). In the ROS environment, by subscribing to the topic of dynamic object status information published by Gazebo, we can directly obtain its true displacement and velocity. The comparison between speed estimation of the filter with the constant-velocity motion model and the true value is shown in Figure 9. Figure 9a is a comparison of the estimated speed with the true value of a box object in the x-direction and Figure 9c is the same comparison in the y-direction. Figure 9b,d are the comparison of the estimated velocity and the true value of the cylinder object in the x and y-directions, respectively.  
Figure 8: (**a**) Simulation environment in Gazebo; (**b**) Control interface in Rviz.  
Figure 9: _Cont._The speed estimation using the filter with combining the CV and CS motion model proposed in this paper is shown in Figure 10. In order to verify the effectiveness of the algorithm, we use the metric speed error to represent the accuracy of the speed estimation. It can be seen that the absolute value of the speed estimation error of the box object is reduced from more than 1.5 m/s in Figure 9a to less than 0.5 m/s in Figure 10a in the x-direction and the same result is for the cylinder. In the y-direction, the true velocity of the dynamic object is constant zero, and both estimates are relatively accurate. However, in order to improve the estimation effect of the dynamic characteristics of the object, the filter with the proposed motion model introduces acceleration information, which makes the estimation effect worse than that of the filter with using the constant-velocity motion model. Since the measured part of the box and cylinder object did not change significantly when the robot is stationary during the simulation process, the estimation effect of the filter on them does not show an obvious difference.  
Figure 10: _Cont._  
Figure 9: Comparison of filter speed estimation using the CV motion model and true value speed when the robot is stationary. (**a**) Velocity comparison in the x-direction of the box; (**b**) Velocity comparison in the x-direction of the cylinder; (**c**) Velocity comparison in the y-direction of the box; (**d**) Velocity comparison in the y-direction of the cylinder.  
We evaluate RMSE, Mean Error, and Standard Deviation (S.D.) of the metric absolute speed error in the result. In addition, the improvement values are calculated as shown:  
\[\eta=(1-\frac{\beta}{\alpha})\times 100\% \tag{40}\]  
where \(\alpha\) is the value of CV motion model, and \(\beta\) is the value of the system. The comparison results are shown in Table 2. The improvement of the system can reach 70% on average in the main direction x of movement.