# A Particle PHD Filter for Dynamic Grid Map Building towards Indoor Environment
## 4 Simulation
### Speed Estimation of the Dynamic Objects Entering and Leaving the Robot's Sensing Area  
The simulation experiment here is mainly to analyze the performance of the algorithm for estimating the speed of dynamic objects when objects enter and leave the robot's sensing range. The experimental setup is shown in Figure 14. Figure 14 shows the Gazebo simulation environment, and Figure 14 shows the Rviz interactive interface. The robot's sensing range is 14 m, and the size of the dynamic grid map is 28 \(\times\) 28 square meters. The dynamic object moves back and forth in a straight line between the red dots. The blue dotted line is the robot's sensing range, and the robot is in a static state. Figure 15 is the speed estimation result in the case of using a fixed number of particles and constant velocity motion model (the method adopted by [16], referred to as the Nuss's method). In the simulation, the number of newborn particles and persistent particles are fixed to 30,000 and 300,000 respectively. For the disappearance and appearance of dynamic objects, the speed estimation of the algorithm is as shown in the partial zoom figure. When no dynamic objects are detected (disappearing in the robot's perception range), the speed estimation value and error value are both set to 0. It can be seen from the Figure 15 that the speed estimation curve of [PERSON]'s method changes relatively smoothly, and it takes a long time to track the true velocity value. The speed estimation result using the algorithm proposed in this paper is shown in Figure 16, and the simulation parameter settings are the same as Table 1. In the x-movement direction of a dynamic object, since the maximum absolute value of velocity is relatively large (1.5 m/s and 1.8 m/s in the uniform speed stage, respectively), the influence of the small amplitude jitter error is negligible. In the y-direction of motion, the maximum absolute value of the motion velocity is only 0.75 and 0.15, respectively. This small amplitude jitter error will increase the ratio between it and the dynamic object's own motion velocity, but the overall error value can still be controlled within a relatively small range. Figure 16: Comparison of filter speed estimation using the method proposed in this paper and true value speed when dynamic objects enter and leave the robot’s perception area. (**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. Figure 15: Comparison of filter speed estimation using [PERSON]’s method and true value speed when dynamic objects enter and leave the robot’s perception area. (**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. After a dynamic object appears, the maximum absolute value of the algorithm velocity estimation error is regarded as the peak error, and the time taken for the algorithm velocity estimation to stably converge to 90% of the true value is regarded as the convergence time of the algorithm. The comparison results are shown in Table 4. It can be seen that although the algorithm proposed in this paper has no advantages in terms of peak error, the advantage of this paper is that the convergence time is significantly faster than [PERSON]'s method, which is very useful for indoor environments with limited space. The number of newborn particles and persistent particles involved in processing each frame of laser scan data (an algorithm running cycle) and the processing time are shown in Figure 17. It can be seen from the Figure 17b that the number of newborn particles and persistent particles using the algorithm proposed in this paper will change with the number of dynamic objects. When there are few dynamic objects, the calculation load will be greatly reduced.