## 2 System Design and Implementation
### Tracking and Fusing  
Based on the UWB technology, the tracking system consists of two modules: The Mini3 UWB (Mini3 UWB, Mini3 Plus and DW1000 are developed by YCHIOT, a company in Wenzhou, Zhejiang, China) signal transmitting module (Tag) and the Mini3 Plus fixed position sensor (base station). The tag consists of a ceramic antenna, an RF circuit, the DW1000 peripheral circuit, a lithium battery charge and discharge circuit and the clock circuit. The communication rate is 110 kbit/s, 6.8 Mbit/s, and the working frequency is 3.5-6.5 GHz. There is a built-in 250 mAh lithium battery, and its normal working time is more than four hours, and the effective communication distance is over 150 meters. The communication distance is greater than 100 meters in the case of being blocked by cloth. The system is based on TWR (Two-Way Ranging), TOF (Time of Flight) positioning technology and three-sided ranging algorithm in order to obtain the coordinate position of the tag in the screen's 2D plane. The signal flight time between the tag and the base station is obtained by the transceiving response frame gap between the base station and the tag, while the calculation process is shown as Figure 3, but when there are multiple base stations, the calculation process is shown as Figure 4 and Equations (2)-(4), and the used positioning frame follows the IEEE 802.15.4 protocol. Figure 4: Signal flight time between Multi-Base station. Figure 3: The calculation process of the signal flight time. \[T_{propA} = \frac{T_{round1A}\times T_{round2A}-T_{reply1A}\times T_{reply2A}}{T_{ round1A}+T_{round2A}+T_{reply1A}+T_{reply2A}} \tag{2}\] \[T_{propB} = \frac{T_{round1B}\times T_{round2B}-T_{reply1B}\times T_{reply2B}}{ T_{round1B}+T_{round2B}+T_{reply1B}+T_{reply2B}}\] (3) \[T_{propC} = \frac{T_{round1C}\times T_{round2C}-T_{reply1C}\times T_{reply2C}}{ T_{round1C}+T_{round2C}+T_{reply1C}+T_{reply2C}} \tag{4}\]  
The signal flight distance can be calculated by using the flight time between the tag and the base station from the formula:  
\[\text{S}=\text{C}\times[(\text{T}_{a2}-\text{T}_{a1})-(\text{T}_{b2}-\text{T} _{b1})]/2 \tag{5}\]  
Wherein, C represents the speed of light, and T\({}_{a1}\) is the time at which the pulse signal of the request property transmitted by the tag arrives at the base station, and T\({}_{a2}\) is the time by which the response signal of the base station is received at the time point of its own time stamp, and T\({}_{b}\) is the same. After obtaining the distance between each base station and the tag, the X and Y values of the position of the tag can be derived by three-side ranging combined with the coordinate X\(\backslash\)Y value set by each base station (as shown in Figure 5). \[\left\{ \begin{array}{l}\sqrt{\left(X-X_{a}\right)^{2}+\left(Y-Y_{a}\right)^{ 2}}=d_{a}\\ \sqrt{\left(X-X_{b}\right)^{2}+\left(Y-Y_{b}\right)^{2}}=d_{b}\\ \sqrt{\left(X-X_{c}\right)^{2}+\left(Y-Y_{c}\right)^{2}}=d_{c}\end{array} \right. \tag{6}\]  
\[\left( \begin{array}{c}\text{X}\\ \text{Y}\end{array} \right)=\left( \begin{array}{cc}2(X_{a}-X_{c})&2(Y_{a}-Y_ {c})\\ 2(X_{b}-X_{c})&2(Y_{b}-Y_{c})\end{array} \right)^{-1}\left( \begin{array}{c}X_{ a}^{2}-X_{c}^{2}+Y_{a}^{2}-Y_{c}^{2}+d_{c}^{2}-d_{a}^{2}\\ X_{a}^{2}-X_{c}^{2}+Y_{b}^{2}-Y_{c}^{2}+d_{c}^{2}-d_{b}^{2}\end{array} \right) \tag{7}\]  
After one has obtained the (X, Y) value of the actor carrying the tag, it will be matched to the size of the screen. So in the installation step, it is necessary to measure the actual distance D1 of the base station to the base station with the set coordinates of (0, 0), being the actual width D2 of the stage display screen. (D1/D2) * display width resolution to obtain the label in the corresponding position on the screen. The error of the system ranging is about 10 cm, and the positioning error is about 15 cm (increased slightly as the occlusion situation). In actually, this error has almost no negative impact on the match between the effect and the position of the actor on the stage of the actual performance of 15 meters wide.