## 1 Introduction  
In the past decade, with the increasingly precise technical demand for location perception and path tracking of production and living factors such as personnel, machines, and materials, the positioning scene expanded from outdoor to indoor. Indoor positioning technologies such as WiFi, Bluetooth, Zigbee, RFID, and UWB were widely used in various applications such as emergency management, smart energy management, smart HVAC controls, and occupancy detection. In emergency management, Bluetooth can help detect priority areas by estimating the occupancy of indoor areas and allocated pedestrians in an efficient manner [1]. In smart energy management, an indoor positioning system can obtain high-resolution occupancy information for plug load management [2]. WiFi positioning has the advantages of wide range of use, low cost, and good portability, but its accuracy is relatively large at the meter level, hardly meeting the needs of high-precision applications. ZigBee has the advantages of low cost, small size, and low power, but it is vulnerable to the interference of multipath effect and position movement, which would reduce accuracy. RFID can be transmitted in non-line-of-sight and has the advantages of fast identification, low cost, and small size. However, many positioning beacons have to be set in the measurement areas, which might affect the accuracy. Bluetoothusually is used in smartphone devices for short distance positioning, as well as its low cost and power demand, while its stability and anti-interference ability are poor [3]. Among these indoor positioning technologies, ultra-wideband (UWB) has attracted attention due to its advantages of low power, small size, strong penetration, high precision (centimeter level), high real-time performance, and high cost performance [4; 5]. Most scholars worldwide have focused on the method of multi-sensor fusion to improve the positioning accuracy of the UWB. At present, UWB and IMU fusion is becoming a hotspot because of its higher accuracy supported by IMU-positioning in a short time. However, due to the obvious drift of angular velocity and acceleration measured by an IMU, there always exists large errors in the data obtained by quadratic integration [6]. Hence, this study improved the EKF algorithm based on the traditional UWB/IMU compact positioning model and constructed a double-loop cumulative error dynamics model to quantitatively analyze the convergence and controllability of the positioning errors of the system in three steps: (1) the distance information obtained by the UWB under the NLOS condition was optimized by quadratic integration of the acceleration value measured by an IMU; (2) the EKF technology was used to fuse the UWB and IMU to correct the position error, improve the positioning precision of the UWB range, and enhance the continuity, stability, and reliability of the positioning system; (3) the effectiveness of this model was demonstrated and verified by simulation experiments. The main contributions of this study are as follows: (1) To address the accumulated error of IMU in indoor positioning due to the conventional tight combination UWB and IMU model, this study improved the tight combination positioning model. Thereby, IMU could assist UWB to optimize NLOS data before their tight combination for less errors. (2) We calculated the IMU quadratic integral cumulative error and EKF positive feedback cumulative error, which could support the quantitative positioning-error analysis. (3) To enhance the positioning accuracy, a dynamics model of double-loop cumulative error was established to quantitatively analyze the convergence and controllability of the positioning error of the positioning system.