In this paper, the Gedney-perfectly matched layer(PML) absorbing boundary condition for the finite-difference time-domain(FDTD) method is implemented and validated. And also,the Gedney-PML parameters are optimized. The results show that the numerical reflection is lower than other absorbing boundaries. The optimization of the thickness of the medium and the conductance distributing factor are in agreement with Gedney’s empirical values. The module of this PML is added into the homemade software CHIPIC and enables the latter better wave absorbing than MAGIC. In addition, this module is proved applicable by simulating the model of magnetron in 2D polar coordinates system.