Localization of an ultra wide band wireless endoscopy capsule inside the human body using received signal strength and centroid algorithm

Wireless capsule endoscopy (WCE) is used for imaging and diagnosing diseases in the gastrointestinal (GI) system. The location of the disease detected by WCE is still an important problem. Location information is very important for the surgical or drug treatment of the detected disease. In this study, RSS-based centroid algorithm has been used in order to accurately predict the capsule position on a sample data set. The effect of different parameters such as number of sensors used on the proposed mathematical model, location of sensors on positioning is analyzed in detail. The results show that a precise position detection is possible with fewer sensors positioned correctly. As a result, the positioning error with the correctly selected sensors is reduced by approximately 55%. In addition, the performance of the proposed method was compared with the classical centroid algorithm and more than 50% improvement was achieved.


Introduction
Wireless capsule endoscopy (WCE) is fast becoming an important technique in modern medical imaging, allowing parts of the human body (such as the small intestine) that could not be effectively imaged using conventional techniques [1]. WCE allows the diagnosis of illnesses such as colorectal cancer, celiac disease, Crohn's disease, the sites of intestinal bleeding and other types of pathologies in the gastrointestinal (GI) tract [2,3]. A very attractive characteristic of WCE is that, unlike conventional endoscopy techniques, it causes little to no discomfort for the patient; the patient simply has to swallow a pill-shaped camera (i.e. the endoscopy capsule), which contains all the electronics for imaging and transmission of the image data to an on-body recording unit (see Figure 1 for the general system structure). The pill-shaped camera naturally moves through the GI tract and is naturally excreted out of the body. The images captured by the capsule are sent via an on-board radio transmitter to on-body receiving antennas and from there to a recording system. The images can then be reviewed offline by a medical specialist. Although the current generation of WCE systems use the medical implant communications system (MICS) band, there are proposals calling for the use of Ultra Wide Band (UWB) technology as well [4].
The primary advantage of UWB is the low power consumption due to simple transceiver structures required [5,6]. In another type of WCE, camera is replaced with sensors such as temperature, pressure, Potential of Hydrogen or light spectrum analyser sensors [7,8]. WCE could locate the abnormalities in GI system. Image processing algorithms detect diseases and notify the doctors [9]. Also, some works have focused on other external localization techniques based on magnetic field [10,11]. Current WCE systems have a significant problem in the sense that there is no way to localize the capsule as it moves through the GI tract [12]. This means that if any of the images reveal a potentially abnormal condition (such as a tumor or a lesion) there is no way to know just where in the GI tract the condition exists, making subsequent surgical interventions very difficult and more risky for the patient [13]. Thus, it is critical to come up with techniques to accurately localize the endoscopy capsule as it moves through the GI tract. Localization of a source emitting a radio frequency (RF) signal on the basis of received signal characteristics is a well-investigated topic that has received much attention in the literature [14,15]. One example of received signal characteristics that can be used for localization purposes is the received signal . The usage of the RSS for localization purposes is attractive, as RSS is a very simple parameter to measure. This is why RSS has been preferred for challenging applications such as indoor localization [16]. For the in-body localization of an endoscopy capsule, however, RSS-based localization can be challenging. The in-body environment is highly non-homogeneous, consisting of different types of tissue, whose electrical conductivity and permittivity are frequency-dependent. For example, tissues such as skin, muscle, kidney, liver may have higher dielectric constant and conductivity (since these tissues contain a high amount of water), while dielectric constant and conductivity in tissues such as fat and bone with less water content may be lower. It is important to note that these parameters are also dependent on frequency [17]. This non-homogeneous environment can seriously distort UWB signals as documented by several prior studies in this area [18,19,20]. One way to combat these detrimental effects and obtain consistent accuracy in localization is to use more sensors (more receiving antennas) distributed over the body surface. This can provide performance gains, in a similar fashion to the diversity concept commonly used in other types of wireless communication systems [21,22]. To explain this concept more clearly, consider the scenario of Figure 1, where the patient swallows the capsule and the signal emitted by the capsule is sensed by N antennas distributed over the body surface. Because of the inhomogeneity in the body environment, not all of these N antennas will be able to provide RSS measurements at the same quality; some will be of higher quality than others. The basic idea is to combine the measurements in such a way that higherquality measurements have more impact on the final location estimate, while the lower-quality measurements are de-emphasized or excluded from the final location estimate altogether. There are two key questions that need to be answered in this context. First, considering the inhomogeneous nature of the in-body environment, which and how many of these N sensors should be used? Second, how should the measurements be combined to give an accurate location estimate? In this paper, we address these questions. To address the first question, we present a systematic analysis of which sensors have the greatest contribution to a highaccuracy location estimate. To the best of our knowledge, this paper represents the first time in open literature that such a systematic analysis has been undertaken. For the second question, we propose a nonlinear analytical model for the RSS measurements, which can be used to estimate the location of the capsule. An analysis of the localization accuracy for the proposed model is also given, on the basis of a computerized 3-D body model. In this study, centroid algorithm was used to calculate the location of the capsule from the RSS measurement data on the human body model. Although the centroid algorithm was used mostly for indoor and WSN positioning operations [23,24], we used this algorithm for in-body localization. The rest of this paper is organized as follows. Section 2 gives details of the simulation environment which is used for performance evaluation and details the proposed nonlinear RSS model. Results are presented in Section 3. Section 4 concludes the paper.

The simulation environment
In order to evaluate positioning performance within the body, a 3-D voxel model of the human body is required first. For this purpose, 3-D human model obtained from Visible Human Project is used [25]. The 3-D human body model adopted for this study came integrated into the analysis software. This model contains the location of all tissues in the human body as well as all electromagnetic properties of all tissues such as dielectric permittivity and conductivity. Since this study focused on the small intestine region, the organs such as the head, arm and leg were not included in the model in order to reduce simulation time. Figure 2 shows the 3-D voxel model of the whole body and the truncated body model to reduce the simulation time, respectively. To analyze the behavior of the electromagnetic signals in the voxel model, XFDTD TM software from Remcom Inc. was used. This software uses Finite Difference Time Domain (FDTD) techniques to numerically solve Maxwell equations and obtain the electric and magnetic field intensities in the working area by considering material properties and boundary conditions. In order to solve Maxwell's equations numerically, the body model is divided into small parts, or cells. The size of these cells, or cell size, must be calculated based on the smallest wavelength value of the signal. This constraint, called the Courant limit, is "10 cells per wavelength", meaning that the side of each cell should be 10  or less at the highest frequency (shortest wavelength) of interest [18,26]. In accordance with the Courant limit, the FDTD cell size used in the simulation was set to 1.2 mm in the x, y and z directions. The Perfectly Matched Layer (PML) boundary condition with 7 absorbing layers was also applied to prevent the reflection of the signals to the body environment. After defining the body model, the elliptic dipole type UWB antenna was placed in the simulation model. This antenna, which measures 20x12x4 mm, consists of two elliptical conductors and a dielectric case that isolates it from the body tissues [27]. A modulated gaussian pulse with center frequency of 4.1 GHz and -10 dB band width of 1.4 GHz was applied to the gap between two ellipses of the antenna. Also, the antenna input impedance was set to 50 ohm and the input power was fixed at 1mW. This applied signal satisfies to the frequency between 3.1 GHz and 4.8 GHz that known as "UWB Low Band" [28]. This band is in a range where signal attenuation is less when compared to the entire UWB band. In the simulations, the antenna was placed in 64 different positions in the small intestine characterize the electric and magnetic field intensities within this region, as shown in Figure 3. The data for 48 of these 64 antenna position was used to optimize the parameter set for the localization algorithm and the remaining 16 positions were used to test the performance of the algorithm. In Figure 3, red and green antenna positions indicate the training and testing localizations, respectively. In order to determine the position of the wireless capsule within the small intestine, 256 point sensors are defined in the software on the body surface to observe the electric and magnetic field intensition. In telecommunications, particularly in radio, signal strength refers to the magnitude of the electric field at a reference point that is at a significant distance from the transmitting antenna. This structure, defined as a point sensor in the program, represents small-size sensors that measure the amplitude and strength of electromagnetic signals in the time domain. As shown in Figure 4, each point sensor is on the body surface and sensors are arranged in 8 rows. The sensors were distributed around the body with 48 sensors on the front side, 80 on the back, 48 on the right side and 48 on the left.

Figure 4. Sensor placement on the body model
Sensors placed on the body were used to calculate the Poynting vector. The Poynting vector, which is the vector cross product of the electric field and magnetic field intensity, is defined as, The energy density values obtained from the sensors were used to determine the position of the wireless capsule in the small intestine. Thus, the antenna position estimation was performed using a RSS-based mathematical model determined in the next section.

RSS-based in body localization using the centroid algorithm
In RSS-based positioning, energy values measured by the sensors placed on the body and the location of the sensors are used to obtain the localization of the capsule. The centroid algorithm used in positioning calculation has some similarities to the calculation of the center of the gravity for an object [29]. In this model, the energy intensity value measured by all sensors is associated with their location and the energy intensity center is calculated. Later, the position of this X Y Z center point is determined as the position of the transmitter capsule antenna. In order to derive the RSS based mathematical model, the following template was proposed.
( ) where ( )ˆ, Thus, in the estimation of the antenna position, the effect of sensors with higher energy density values were higher, while those with lower energy density were ignored. In addition, the vector of exponents  , which model the nonlinear effects of the human body environment on energy density [19], increases the sensitivity of the RSS-based model. There are different types of tissues in the body and the behavior of each one is frequency dependent. This makes the human body extremely nonlinear from the perspective of electromagnetic wave propagation [19]. For this reason, nonlinearity parameter was added to the proposed model and the results were examined. In the next section, the effect of  on positioning accuracy is examined in more detail. The performance of the localization model was evaluated together with range estimation errors. The localization error can be calculated using the following equation: where ( ) ,, k k k X Y Z is the real antenna location and k  is the localization error of k-th antenna location.

Results
The results obtained in this article are examined under three main headings. For the best performance, the results for the number of sensors, sensor topology and  parameters are examined. Firstly, how many of the 256 point sensors placed on the body will be used in the positioning calculation is determined. Then, effect of the sensors distributed around the body on the positioning accuracy is examined according to the body region where the sensor is located. Finally, the effect of parameter  , described in the previous section, on positioning accuracy was examined. These 3 topics are discussed in detail in this section.   Figure 5, it is clearly seen that using a large number of sensors (N) does not affect the positioning error after a certain point. There is a 2.6% difference between using 20 sensors and 256 sensors in the model. Therefore, N=20 was selected in the following sections to reduce the complexity of the model. On the other hand, another important issue is that the X, Y and Z errors are different in the antenna position estimation. The next question is: what is the reason for these high localization errors? To answer this question coordinate estimation errors are calculated separately and plotted in Figure 6. As seen in Figure 6, the highest contribution to the localization error is from the Y coordinate estimate.

Effect of the number of sensors
When N parameter set to 20, the total localization error is 79.77 mm while the X, Y and Z antenna position estimation errors are 34.62 mm, 69.85 mm and 16.89 mm respectively. To improve these results, we have noticed that it is not sufficient to just change the number of sensors, and therefore different processes will be performed for estimating each coordinate of the capsule in the following sections.

Effect of the selected sensor region
As the localization error was very high in the previous section, we tried to reduce this error with new approaches. In order to determine the location of the capsule in the intestine, the region of the sensors were also taken into account. In other words, the effect of sensors located in different parts of the body on positioning performance has been examined.  The results of Table 1 indicate that the body region on which the sensors are placed has a great influence on the positioning error. The bold marked values in the table represent the lowest errors obtained in the relevant coordinate. When the 80 sensors in front of the body are used, the X position error is 15.45 mm and the Z position error is 16.24 mm, which means a 55.4% and 3.8% improvement respectively compared to results presented in Figure 6. Also in case of the 48 sensors on the left side of the body being used, the Y position error is 28.14 mm and this provides a 59.7% improvement. According to the coordinate system given in Figure 4, the Y coordinate gives the depth information towards the inside of the body and the positioning error is higher compared to the X and Z coordinates. This is because the body is not homogeneous, and the sensor spacing and number are not the same in the lateral and anterior planes. On the other hand, it is seen that the Right-side sensors have a negative effect on the calculation of the X position and the Back sensors on the Y, Z positions. As a result, some sensors provide the better results for some coordinates, while they may have a negative impact on the other coordinates. Therefore, using all sensors together doesn't make any sense for localization estimate. The data taken from the sensors which are based on the RSS-based measurement were subjected to a flow diagram as in Figure 7. The main takeaways from these results so far are as follows. First, it does not make sense to just use all the sensors distributed on the body surface, as they do not all provide measurements at the same quality. The use of a more limited subset (selected in accordance with the flow diagram of Figure 7 will result in more accurate estimates of the capsule location. Furthermore, it is possible to accomplish this accuracy improvement at a lower overall system cost, as less on-body sensors will now need to be used. Having said that, it is possible to improve the accuracy even further by making adjustments on how the energy readings from the various sensors are incorporated into the final location estimate, as will become clear from the results of the next section.

The effect of the  parameter
All the data so far has been obtained for 1  In order to achieve the final improvement rate, these  values were used at the test locations as shown in Table  2. As a result, the RMS localization errors obtained for the number of N=20 sensors (explained in Section 3.1), the sensors selected from the body regions shown in Figure 7 (explained in Section 3.2) and the calculated optimum  values are given in Table 2.

Comparison of the proposed algorithm with the classical centroid algorithm
Although the centroid algorithm is frequently used in indoor positioning and WSN (Wireless Sensor Network) scenarios, it is not widely used in in-body localization. It may be instructive to compare the results to other UWB-based localization of the endoscopic capsule in the small intestine operating for the in-body context. Unfortunately, in the course of our literature search, we were unable to find any other works except [30] dealing with UWB-based in-body localization throuh centroid algorithm that would allow a direct comparison. In the [30], the path loss model was used together with the centroid algorithm for positioning, but the effects of body tissues and sensor topology on positioning were not studied. In this respect, our study fills the gap in the literature in terms of both using a realistic human model and providing capsule positioning using the RSS data directly in the centroid algorithm. For these reasons, we compared the proposed centroid algorithm with the classical centroid algorithm used in indoor positioning and examined its performance.
The classical centroid algorithm used in [31,32] studies is given as in Eq. 5.
where N is sensor number, ( )ˆ,  Figure 9. As can be seen in the Figure 9, errors are higher in the classical centroid algorithm. In terms of RMS values of X, Y, and Z localization error, the error values of the proposed centroid algorithm are 59.5%, 58.8% and 3.9% less than classic centroid algorithm, respectively. In another comparison, the cumulative probability function of the distance estimation errors was obtained as in Figure 10.  Figure 10 is examined, the distance estimation error of the classical centroid algorithm is much higher, for example, the distance estimation error with 80% probability is below 44mm for the proposed centroid algorithm, while the error in the classical algorithm is below 104mm under the same conditions. We end this section with comments as to how the techniques outlined in this paper can be applied in practice. If this technique is used in real life, it is possible to localize the capsule that moves within the intestine with a low error with the sensor set physically placed on the body and the simple centroid algorithm. The proposed Centroid algorithm implementation is simple, has low computational load and provides positioning with only energy density measurements. The disadvantage of this algorithm is that if the sensor positions are measured incorrectly, the positioning performance will be greatly reduced.

Conclusion
In this paper, we have presented a detailed study on a new RSS-based mathematical model applicable for UWB-based wireless capsule localization in the small intestine. Relationships for the mathematical model parameters, namely the N sensor number, the exponent  and the energy density have been presented. We have used the proposed mathematical model to determine the optimal location and number of the received signal sensors to improve localization accuracy. The results indicate that usage of a large number of sensors distributed all over the body surface has no beneficial impact on positioning accuracy, as all the sensors will not provide measurements at the same quality. Opportunistic deployment of a lesser number of sensors in certain parts of the body (such as the front and left sides of the torso), are seen to result in a reduction of the overall localization error, and will no doubt reduce the overall system-cost. In addition, the performance of the proposed method was compared with the classical centroid algorithm and more than 50% improvement was achieved. These results shed light on precise, cost-effective positioning of the wireless endoscopy capsule in the gastrointestinal tract with a simple RSS technique in the future.