1. Introduction
The nasogastric tube (NGT) is a flexible rubber or plastic tube which is used for medical purposes such as treatment of ileus or bowel obstruction, stomach lavage, administration of medications, and delivery of nutrients [
1]. The NGT is manually inserted through the nose into the stomach often without direct visualization of the location of its tip. Because the tube tip location is unknown, misplacement of the tube is relatively common and it can cause fatal complications [
1,
2,
3]. For instance, there is some possibility of the NGT entering the trachea and the lung instead of the esophagus, resulting in pneumothorax or pneumonia which could be fatal [
4].
The pH test is one bedside method to assess the NGT position. The procedure involves aspiration of fluid from the tube and the tube is considered inside the stomach if a pH of 1–5.5 is obtained [
5]. However, a misleading pH can be recorded for the patients with hiatus hernia and gastro-oesophageal reflux [
4]. Patients taking proton pump inhibitors or requiring continuous enteral feeds could have unexpected pH results [
6]. Using an X-ray is an accurate method to confirm the NGT position since the whole length of the tube can be visualized. However, it is reported that misinterpretation of X-rays is the main causal factor of adverse events [
5]. The X-ray confirmed tube location is only true at the time the X-ray is taken. If patients have symptoms such as coughing, retching, or vomiting, the X-ray may need to be repeated and there is a small increase of carcinogenic risk. Besides, subsequent clinical procedures are then delayed due to the extra time incurred for patient transfer to the radiology room and for procedures of taking and interpreting X-rays. The delay can take away time crucial for feeding, hydration, and medication [
4]. Most importantly, both pH tests and X-ray are only performed post tube insertion. Therefore, harm caused in the midst of the insertion cannot be detected/avoided.
In contrast, electromagnetic (EM) tracking systems, or specifically, electromagnetic sensor guided enteral access systems (EMS-EAS), are able to provide real-time 3D (the anterior and cross-sectional) path of the NGT during the insertion process. Studies showed that 98% of the tube position from EMS-EAS and X-ray corresponded and the remaining 2% can be considered to be caused by the relocation of the tube between EMS-EAS and X-ray, misuse of EMS-EAS system, and misinterpretation of the X-ray [
2,
7]. Thus, EM tracking can realize a safer and more reliable insertion process and can potentially replace X-ray to reduce the risk of complication, time to next clinical procedure, and cost [
8]. However, EM tracking systems are still expensive. For example, CORTRAK EMS-EAS (Avanos Medical, USA) costs £12,000 [
9]. The system requires a dedicated single-patient-use tube with a wired sensor head and therefore, the cost for each use is not low.
Passive magnet tracking is another feasible method of NGT tracking. While the EM tracking systems require an active magnetic field generator (external system) and magnetic field receiver (tracking object), the passive magnet tracking system employs external magnetic sensors and a permanent magnet as a tracking target. Various passive magnet tracking methods have been investigated especially in the field of endoscope capsule tracking [
10,
11,
12,
13,
14]. However, the size of the permanent magnet used for the tracking is usually large and not suitable for NGT insertion. Sun et al. developed a wearable sensor system around the neck to track a permanent magnet embedded at the tip of the NGT [
15]. The tube placement is suspected to be incorrect if the sagittal axis position deviates from the expected path because there are distinct position differences between the paths to the esophagus and to the trachea/bronchi. The insertion is considered erroneous if the frontal plane position shifts sideways since the trachea splits laterally into the two primary bronchi. Although the system has a root mean square error (RMSE) of less than 5.3 mm, the accuracy was only verified from −70 to 50 mm from the sensors along the longitudinal axis and the accuracy decreases as the target goes further away from the sensors. Since the average length of the trachea is roughly 100 mm, the tracking up to the bronchi could be difficult to achieve considering anatomical variations [
16]. The tracking speed achieved by their system is 10 Hz.
We have previously developed a passive magnet tracking method based on two magnetic sensors, for tracking the magnetically inflatable intragastric balloon capsule (MIBC) [
17]. The system uses two three-axis magnetic sensors placed in front and back of the patient. By using the grid search method, the algorithm estimates the position of the magnet embedded in the capsule by searching the sensed magnetic field from a table with a pre-calculated magnetic field. To improve the tracking stability and accuracy, the search range was actively adjusted based on the anatomy of the esophagus and the search threshold was modulated. We demonstrated that the proposed method was able to track the position of the MIBC along the esophagus with a 3.5 mm mean absolute error. However, it could only provide sagittal plane tracking. To detect the deviation of the NGT position toward the lung, frontal plane tracking is required. In addition, for the NGT application, as the magnet size is limited by the NGT size that is smaller than the MIBC size, the tracking becomes more challenging. Therefore, the system from our previous work is not suitable for NGT tracking.
In this work, we aim to achieve inexpensive real-time tracking of NGT insertion, point of care test NGT insertion by implementing a two-sensor-based magnetic tracking method. By introducing the new sensor orientation and modifying the tracking algorithm, we track the frontal plane position of the NGT with a permanent magnet embedded at the tip. By providing real-time visual information of the tip’s position, the user can avoid erroneous insertion of the NGT into the lung and hence, the risks associated with NGT insertion can be reduced. Compared to the EM tracking systems, our approach may not be able to achieve as accurate or as large range tracking due to the nature of the passive magnet tracking method. However, the accuracy and tracking range can be adequate for the NGT tracking application. Since only two sensors are required for tracking, the cost and complexity of the setup is minimal. Additionally, our approach is beneficial because it does not require wiring for the tracking object (permanent magnet). This paper is organized as follows.
Section 2 presents the setup of our two-sensor-based tracking system, details of the tracking algorithm, and experimental setup to evaluate our approach.
Section 3 presents the results of the experiments followed by the discussion in
Section 4.
Section 5 provides conclusion and future work.
3. Results
The result of testing tracking accuracy are presented in
Figure 6. The average estimated magnet position and the SD for each axis are plotted together with the true magnet position. For most of the positions, the estimation is very close to the actual position of the magnet except when z = 250 mm where z and y position errors appear to suddenly increase. The y and z-axis errors along the z position are plotted in
Figure 7. While there is no obvious trend of y position error change along z-axis, z-position error suddenly increases for z = 250 mm. This could be because the magnet is too far from the sensors and the magnetic field is too small to provide an accurate estimation.
Table 4 shows the RMSE of y and z position as well as the RMSE when the result of z = 250 mm is excluded. For both L = 80 mm and 100 mm, we observed decent y tracking accuracy with below 3 mm RMSE. When the average of all the experiments are taken, z position RMSE for L = 80 and 100 mm are 3.55 mm and 5.50 mm. On the contrary, when disregarding the result of z = 250 mm, the z tracking RMSE becomes less than 2 mm.
The result of the tracking when NGT is inserted into the dimensionally correct mock-up esophagus and airways is shown in
Figure 8 and
Figure 9 (for L = 80 and 100 mm respectively). Since the NGT is smaller than the size of the mock-up esophagus and airways, the insertion path is different for every trial. It is observed that the tracking for all the trials stays mostly within the vertical dashed lines which indicate the inner diameter of the esophagus when the NGT is inserted into the esophagus. When the NGT goes into the airways, we observe large deviations of the y position which are right below the sensor level (
z = 100 mm) and outside the vertical dashed lines. As this deviation is very distinct, it can be used to determine the erroneous insertion. Although the tracking may go beyond the vertical dashed lines for esophagus insertion, it only happens near
z = 250 mm and therefore, it should not be considered as misinsertion.
4. Discussion
In this work, a laptop PC with a relatively high-performance CPU is used. The NDI Aurora system has a 40 Hz update rate which is considered adequate for real-time tracking [
15]. Since the current system achieved a tracking frequency from 50 to 70 Hz, there is a potential to meet the requirement of real-time tracking by using even lower-performing, lower-cost PCs.
The experiments indicated the z-axis tracking accuracy decreased below z = 250 mm. Although the magnitude is different, a similar trend was observed for both L = 80 and 100 mm. If the error increases in a spatially consistent manner, the error might be compensated. We plan to use a neural network or machine learning to identify the spatial characteristic of the error along the z-axis.
The experiments were performed without biological tissue in between the sensors and the NGT. This is because it was found that the tracking performance will not be affected by the biological tissue in the study we previously carried out [
17]. The magnetic field generated by live humans ranges from 20 fT to 1 nT [
37]. Therefore, it is out of the sensible range of the sensor we employed and it will not affect the tracking performance.
Metal implants may affect the tracking performance depending on the material, size, and location. Therefore, we will investigate to determine whether the system can be appliable for patients with implants.
In this work, the system was tested at room temperature (25 °C). For the real application, the magnet’s temperature will increase due to the body core temperature which is about 37 °C. Since the strength of the magnetic field is dependent on temperature, the effect of the temperature on the tracking performance needs to be investigated.
Our system is compared to the one developed in [
15] side-by-side in
Table 5. The number of sensors required for our system is about one-fifth of that in the latter system. Since the tracking volume is not specifically stated in their work, it was deduced from the experimental setup and results. Although the tracking volume may be similar, coverage of the airway beyond the main bronchi or the entire esophagus is lacking, due to its placement at the neck. The RMSE of our system is slightly worse when considering the entire range but excluding
z = 250 mm, our system may outperform their system.
One limitation is our approach will not work when the magnet/NGT is already inside the tracking range as the initialization or offsetting of the background magnetic field is unable to be performed. This means the presented approach is not capable of confirming the location of the already inserted NGT which is necessary for patients with NGT for the long term. In addition, since the magnet is embedded inside the NGT, the patients with these NGT are not able to take MRI scans when necessary. Therefore, it would be advantageous to make the magnet removable and re-insertable.
The other limitation is that no tracking is available beyond the EG junction (cardia). This is enough to fulfill the goals of this work, but providing tracking for the rest of the stomach can be useful in confirming the final location of the NGT, for increased patient safety. Furthermore, when the tubes need to be delivered to the deeper GI tract such as nasoduodenal and nasojejunal intubations, the tracking range needs to be amplified further. It can be done by employing more accurate sensors and a stronger permanent magnet (i.e., N55 grade) or another set of sensors placed around the stomach area.
5. Conclusions
This work presents a low-cost, two-sensor-based magnetic tracking system for NGT insertion. Using the grid search combined with a dynamically adjusted search range and PD threshold modulator, we achieved real-time tracking of a magnet embedded at the tip of the NGT. The tracking accuracy and range obtained from the experiments indicate that the presented system is capable of detecting the deviation of the position in the frontal plane to determine when the tube wrongly progresses into the bronchi.
To move forward, the system needs to be tested in humans. For safety, it is ideal to make the magnet removable after NGT insertion. Therefore, a magnet should be connected to a guidewire instead of embedding in the NGT. The coating/material of the magnet and the guidewire should be carefully selected to ensure biocompatibility with and resistance against gastric acid.
Although this work focuses on the application for NGT insertion, the proposed system could be applied for tracking the MIBC, endoscopic capsules, and other medical devices [
38,
39,
40].