An novel indoor positioning method of pigsty based on Ultra Wideband (UWB) technology is proposed via reasonably arranging the base stations (BTS) and positioning tags, which can provide a strong support for the accurate positioning of specific pig pens in the pig house. The distribution of Dilution of Precision (DOP) values are analysed in different deployment schemes which includes the amount, the height, the deployment shape and distance of BTS, though positioning simulation. Moreover, the positioning effect of dynamic following positioning (DFP), the root-mean-square error (RMSE) and variance of static positioning (SP) are measured. It is noteworthy that Kalman filtering algorithm is adopted to smooth the DFP experimental data for reducing the positioning error. The simulated results show that the DOP values decrease with the increasing of the height and the distance, and these results and laws are consistent with the experimental results. However, the DOP values are reached best when the height is from 1.75 m to 2.75 m, and the distance is over 3.00 m. Furthermore, the DOP values of quadrilateral deployment is smaller than the one of triangle. In addition, variance of SP and DFP are decreased by utilizing Kalman filtering algorithm. Therefore, the excellent positioning system and its solutions in pigsty can be provided by our proposed indoor positioning method.