# A Rectangular Toroidal Current-Based Approach for Lung Biopsy Needle Tracking
## 1 Introduction
In contrast, an electromagnetic tracking system demonstrates an average localization error of less than 2 mm, without requiring a line of sight and with minimal mechanical constraints. These advantages make it particularly well suited for in situ lung biopsy procedures, where internal access and soft tissue deformation pose significant challenges to traditional techniques. Magnetic tracking is widely adopted in medical applications due to its inherent advantages, such as minimal distortion when passing through the human body and its harmlessness to living tissues [19]. One approach to magnetic tracking involves embedding magnetic sensors within a device to measure the surrounding magnetic field and determine its position [20; 21]. By comparing sensor measurements with a pre-characterized magnetic field distribution within the workspace, the target can be accurately tracked [22]. However, internal magnetic sensors require onboard transmission circuits and batteries to support the measurements, which reduces the available space inside the capsule. Another magnetic tracking method employs an external sensor array to capture the magnetic field generated by magnets embedded in the device. Sensor arrays have been developed for applications such as force sensing and in vivo muscle tension monitoring and remain a promising approach for active capsule tracking [23]. These arrays are externally powered and do not require onboard components, allowing for the integration of functional units such as biopsy tools and drug delivery chambers [24]. The electromagnetic tracking system consists of three main components: a magnetic field transmitter, a magnetic field sensor, and a computer control unit. The magnetic field transmitter generates alternating electromagnetic signals, which induce a voltage in the sensor. The computer control unit estimates the spatial position of the sensor by solving an inverse problem based on the relationship between the induced voltage and the electromagnetic field distribution [25, 26]. Search coil technology has a long history, but in 2014, [PERSON] et al. proposed an electromagnetic tracking system, where signals of different frequency must be simultaneously fed to the tri-axial transmitting coils [27]. [PERSON] et al. adopted three coils as a tri-axial magnetic dipole source, but the inducing sensor was composed of two non-orthogonal coils [28]. In [29], an analytical algorithm for magnetic tracking and orientation is presented, and orthogonal tri-axial coils are used as the transmitting coils and sensing coils. [PERSON] presented a novel electromagnetic tracking system (EMTS), whose induction coils are separated from the control unit; hence, wireless pose tracking (six-degree-of-freedom) can be achieved [29]. The transmitting coils are simultaneously excited by nine-channel sinusoidal signals with different frequencies, instead of the switching channels in the chronological order. Inspired by the idea of frequency division, we designed our model accordingly. [PERSON] designed an accurate magnetic field modeling method that can attenuate the electromagnets' hysteresis and provide a precise actuation field estimation [30]. [PERSON] proposed a ResNet-LM algorithm, based on the fusion of the deep learning algorithm and optimization algorithm, to improve permanent magnet-based tracking (PMT) performance [31, 32]. To enhance both accuracy and system simplicity, we propose a rectangular circulating current-based magnetic field tracking system. In this study, we develop a model of the rectangular circulating emitted magnetic field to determine the relative position of the biopsy needle within the tracking system. The main focus of this research is on establishing a model based on a rectangular circulating magnetic field that accurately represents the position of the biopsy needle while minimizing computational load. We also present an experimental setup for a lung puncture biopsy needle motion tracking system, which is based on electromagnetic tracking using a rectangular toroidal current.