Research Article An Adaptive Linearized Method for...

19
Research Article An Adaptive Linearized Method for Localizing Video Endoscopic Capsule Using Weighted Centroid Algorithm Umma Hany 1 and Khan A. Wahid 2 1 Department of Electrical and Electronic Engineering, Bangladesh University of Engineering and Technology, Dhaka, Bangladesh 2 Department of Electrical and Computer Engineering, University of Saskatchewan, Saskatoon, SK, Canada S7N 5A9 Correspondence should be addressed to Khan A. Wahid; [email protected] Received 22 September 2014; Accepted 26 January 2015 Academic Editor: Chih-Yung Chang Copyright © 2015 U. Hany and K. A. Wahid. is is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. Video Capsule Endoscope (VCE) sends images of abnormalities in the gastrointestinal (GI) tract. While the physicians receive these images, they have little idea of their exact location which is needed for proper treatment. e proposed localization system consists of a 3D antenna array (with 8 receiver sensors) and one transmitter embedded inside the electronic capsule. We propose an adaptive linearized method of localization using Weighted Centroid Localization (WCL) where the position is calculated by averaging the weighted sum of the reference positions. In our proposed system, first we identify the path loss attenuation exponents using linear least square regression of the collected data (RSSI versus distance). en the path loss model is linearized to minimize the path loss deviation which is mainly caused due to the nonhomogeneous environment of radio propagation. en the instantaneous path loss (PL) measured by the sensors is attenuated to the above linearized model and considered as the weight of the sensors to find the location of the capsule using WCL. Finally a calibration process is applied using linear least square regression. To assess the performance, we model the path loss and implement the algorithm in Matlab for 2,530 possible positions with a resolution of 1 mm. e results show that the algorithm achieves high localization accuracy compared with other related methods when simulated using a 3D small intestine model. 1. Introduction Video capsule endoscopes (VCE) are used to diagnose lesions along digestive tracts. ey send clear images of abnormalities in the gastrointestinal tract (GI tract). While the physicians receive the clear images of the abnormalities, they have little idea of their exact location [1]. us, it is necessary to know the exact location of the endoscopic capsule inside the GI tract for proper diagnosis of the intestinal abnormalities. e current literature is very rich in algorithms designed for localization outside the human body. Very few localization methods [24] are available in the literature to localize endoscopic capsule which are based on electromagnetic field and magnetic field strength. As RSSI based techniques are cost-effective and have no adverse health effects, they have also been chosen for use with the Smart pill capsule [5] in USA and the M2A capsule [6] in Israel. RF localization schemes include both range-based [79] and range-free [1017] algorithms. Within those, range-free positioning schemes, such as Centroid Localization schemes [10, 11], have attracted a lot of interests because of their simplicity and robustness to changes in wireless propagation properties such as path loss. Centroid Localization (CL) [10] localizes the transmitting source of a message to the coordi- nate obtained from averaging the coordinates of all receiving devices within range. Weighted Centroid Localization (WCL) [12] localizes the active tag as the weighted average of the sensors positions within its range. WCL proposed in [18] assigns a weight to each of the receiver coordinates, inversely proportional to either the known transmitter-receiver (T- R) distance or the link quality indicator available in the ZigBee/IEEE 802.15.4 sensor networks [19]. In [20, 21], the WCL mechanism is extended using normalized values of the link quality indicator and RSSI. e authors in [22] conducted an indoor experiment to determine a set of fixed parameters Hindawi Publishing Corporation International Journal of Distributed Sensor Networks Volume 2015, Article ID 342428, 18 pages http://dx.doi.org/10.1155/2015/342428

Transcript of Research Article An Adaptive Linearized Method for...

Page 1: Research Article An Adaptive Linearized Method for ...downloads.hindawi.com/journals/ijdsn/2015/342428.pdfResearch Article An Adaptive Linearized Method for Localizing Video Endoscopic

Research ArticleAn Adaptive Linearized Method for Localizing Video EndoscopicCapsule Using Weighted Centroid Algorithm

Umma Hany1 and Khan A. Wahid2

1Department of Electrical and Electronic Engineering, Bangladesh University of Engineering and Technology, Dhaka, Bangladesh2Department of Electrical and Computer Engineering, University of Saskatchewan, Saskatoon, SK, Canada S7N 5A9

Correspondence should be addressed to Khan A. Wahid; [email protected]

Received 22 September 2014; Accepted 26 January 2015

Academic Editor: Chih-Yung Chang

Copyright © 2015 U. Hany and K. A. Wahid. This is an open access article distributed under the Creative Commons AttributionLicense, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properlycited.

Video Capsule Endoscope (VCE) sends images of abnormalities in the gastrointestinal (GI) tract.While the physicians receive theseimages, they have little idea of their exact location which is needed for proper treatment.The proposed localization system consistsof a 3D antenna array (with 8 receiver sensors) and one transmitter embedded inside the electronic capsule.We propose an adaptivelinearized method of localization using Weighted Centroid Localization (WCL) where the position is calculated by averaging theweighted sum of the reference positions. In our proposed system, first we identify the path loss attenuation exponents using linearleast square regression of the collected data (RSSI versus distance). Then the path loss model is linearized to minimize the pathloss deviation which is mainly caused due to the nonhomogeneous environment of radio propagation.Then the instantaneous pathloss (PL) measured by the sensors is attenuated to the above linearized model and considered as the weight of the sensors to findthe location of the capsule using WCL. Finally a calibration process is applied using linear least square regression. To assess theperformance, wemodel the path loss and implement the algorithm inMatlab for 2,530 possible positions with a resolution of 1mm.The results show that the algorithm achieves high localization accuracy comparedwith other relatedmethods when simulated usinga 3D small intestine model.

1. Introduction

Video capsule endoscopes (VCE) are used to diagnoselesions along digestive tracts. They send clear images ofabnormalities in the gastrointestinal tract (GI tract). Whilethe physicians receive the clear images of the abnormalities,they have little idea of their exact location [1]. Thus, itis necessary to know the exact location of the endoscopiccapsule inside the GI tract for proper diagnosis of theintestinal abnormalities. The current literature is very richin algorithms designed for localization outside the humanbody. Very few localization methods [2–4] are available inthe literature to localize endoscopic capsule which are basedon electromagnetic field and magnetic field strength. AsRSSI based techniques are cost-effective and have no adversehealth effects, they have also been chosen for use with theSmart pill capsule [5] in USA and the M2A capsule [6] inIsrael.

RF localization schemes include both range-based [7–9]and range-free [10–17] algorithms. Within those, range-freepositioning schemes, such as Centroid Localization schemes[10, 11], have attracted a lot of interests because of theirsimplicity and robustness to changes in wireless propagationproperties such as path loss. Centroid Localization (CL) [10]localizes the transmitting source of a message to the coordi-nate obtained from averaging the coordinates of all receivingdevices within range.WeightedCentroid Localization (WCL)[12] localizes the active tag as the weighted average of thesensors positions within its range. WCL proposed in [18]assigns a weight to each of the receiver coordinates, inverselyproportional to either the known transmitter-receiver (T-R) distance or the link quality indicator available in theZigBee/IEEE 802.15.4 sensor networks [19]. In [20, 21], theWCL mechanism is extended using normalized values of thelink quality indicator andRSSI.The authors in [22] conductedan indoor experiment to determine a set of fixed parameters

Hindawi Publishing CorporationInternational Journal of Distributed Sensor NetworksVolume 2015, Article ID 342428, 18 pageshttp://dx.doi.org/10.1155/2015/342428

Page 2: Research Article An Adaptive Linearized Method for ...downloads.hindawi.com/journals/ijdsn/2015/342428.pdfResearch Article An Adaptive Linearized Method for Localizing Video Endoscopic

2 International Journal of Distributed Sensor Networks

for an exponential inverse relation between T-R distancesand the corresponding weights used with WCL. Orooji andAbolhassani [23] suggested a T-R distance-weighted averagedcoordinates scheme where the receivers are closely colocatedand the T-R separation distance to at least one of the receiversis known a priori.

However, due to the lack of movement position map ofthe VCE and the channel models to relate the location toRF propagation, all of the above localization algorithms havenot been verified for use inside the human body. Most ofthe available capsule localization systems are based on range-based techniques [24, 25]. Frisch et al. [24] proposed a 2DRF localization system using triangulationmethod to localizethe in vivo signal using wearable external antenna array thatmeasures signal strength of capsule transmissions at multiplepoints and uses this information to estimate the distance.The average experimental error is reported to be 37.7mm[25]. In [26], the authors proposed an adaptive linearizedmethod of 2D localization of the moving telemetry capsuleusing RSS based triangulation method. They reported anaverage error of about 25%. Based on the statistical implantpath loss model developed in [27], the authors in [28, 29]use RSS based triangulation technique to analyze possiblecapsule localization accuracy at various organs in theGI tract.They reported average localization error 50mm in all organsand more than 32 sensors on body surface are needed forachieving satisfying localization accuracy. Wang et al. [30]have developed the Cramer-Rao bound (CRB) calculation forsingle pill situation which quantifies the limits of localizationaccuracy with certain reference-points topology, implantpath loss model, and number of pills in cooperation. In [31],the authors present a novel method and implementation ofa high resolution localization system based on UHF bandRFID. They propose a location estimation algorithm bycalculating center of gravity of antennas which have detectedthe tag, and the results show amean localization error of 2 cm.

In this paper, we focus on improving the localizationaccuracy of VCE localization inside the small intestine usingan adaptive linearized method of Weighted Centroid Local-ization (WCL) algorithm. In our proposed WCL approach,the capsule transmits RF signal which is received by eightbody mounted sensors. Then the path loss (PL) is calculatedusing the measured RSSI of the sensors and the weight ofthe sensors is calculated. Then finally the position of VCEis calculated using WCL algorithm. A major challenge inthis approach lies in the shadow fading effect due to thenonhomogeneous environment inside the human body.Thusthe same path loss cannot assure the same distance or thesame weight for different surroundings. Therefore it is notappropriate that the weight is calculated using uniform pathloss in the nonhomogeneous environment as human body.To address this issue, we calculate the statistics of the pathloss model for different scenarios using the experimentallycollected data sets (path loss versus distance) so as to identifymore rational path loss attenuation exponents where the tar-get stays and models the path loss for different scenarios. Weobserve that the path loss is scattered around a mean due tothe random path loss deviations. Tominimize the deviations,

we linearize the model considering minimum deviations byfitting a least squares regression line through the scatteredpath loss such that the root mean square deviation of samplepoints about the regression line is minimized. Now, weuse the attenuated path loss to calculate the weight of thesensors for VCE localization using WCL. As there is alinear relationship observed between the estimated and realpositions, finally a calibration process has been applied usingthe linear relationship to find more accurate location of theVCE. We simulate our proposed adaptive linearized WCLalgorithm using Matlab to verify the localization accuracy.The results show significant accuracy improvement in 3Dposition estimation inside the small intestine. As our path lossmodel has not been designed for implant communication, weverify the accuracy using the statistics of the implant path lossmodel [27] used for medical implant communication service(MICS) and observed the same accuracy in 3D locationestimation.

2. System Overview

Figure 1 shows the system of localizing a capsule transmittingsignal source inside the small intestine with a wearableantenna array of eight RF receivers. The system consistsof a RF transmitter, 8 RF receiver modules, RSSI reader,and the data processing and localization tool. As RSSI islocation dependent which is affected by factors such asdistance from the transmitter and attenuates due to themedium of propagation, we consider the respective RSSI asa measure of the distance between Tx and Rx. The receiversreceive the transmitted signal of the capsule and measure thecorresponding received signal strength (RSSI).ThemeasuredRSSI is then sent to the CPU by the RSSI reader. Finally theRSSI is processed and the three-dimensional position of thecapsule is calculated from the known coordinate sets of thereceiver antennas.

Figure 2 shows the system flow block diagram of ourproposed system. The system may be subdivided into RFcommunication, RSSI reader, and data processing and local-ization subsystems.

The RF communication system consists of the wirelessendoscopic capsule embedded with a microcontroller oper-ated RF transmitter module and eight RF receivers of thereceiver array and the microcontrollers (MCUs) to operateand configure the transceivers. The RSSI reader consists ofthe microcontroller (MCU) and EEPROM. The MCU readsthemeasured RSSI from the SPI interface of the receivers andsends it to the data processing module (PC) through UARTinterface. Then the data is processed and the location of thecapsule is estimated using the localization tool which may bedeveloped using Matlab.

3. Radio Propagation Path Loss Model

The free space radio propagation model is used to predictreceived signal strength when the transmitter and receiverhave a clear, unobstructed line of sight path between them.This free space power received by a receiver antenna which is

Page 3: Research Article An Adaptive Linearized Method for ...downloads.hindawi.com/journals/ijdsn/2015/342428.pdfResearch Article An Adaptive Linearized Method for Localizing Video Endoscopic

International Journal of Distributed Sensor Networks 3

RSSI reader

Data processing module

3D location estimation

Wireless capsule endoscope

Small intestine Receiver

Figure 1: Illustration of the localization system for VCE used in this work: a virtual 3D box around small intestine with 8 receiver nodes.

Application processor and RSSI

reader

Mic

roco

ntro

ller

Mic

roco

ntro

ller

Data processing and

3D location estimation

EEPROM

SPI

inte

rface

3D receiver array

Receiver 1

Register banks

wake-up Rx

Receiver 2

Receiver 3

Receiver 8

Receiver 7

SPI

inte

rface

Register banks

Battery

Wireless endoscopic capsule

RF transmitter

wake-up Tx

Wake-uplink

2.48 GHz

2.48 GHz

· · ·

Figure 2: System block diagram.

separated from a transmitter antenna by a distance 𝑑 is givenby the free space equation

𝑃𝑅 (𝑑) =

𝑃𝑇𝐺𝑡𝐺𝑟𝜆2

(4𝜋2) 𝑑2𝐿

, (1)

where 𝑃𝑅(𝑑) is the received power which is a function of 𝑑,

𝑃𝑇is the transmitted power, 𝑑 is the T-R separation distance,

𝐺𝑡is the transmitter antenna gain, 𝐺

𝑟is the receiver antenna

gain, 𝐿 is the path loss for a reference distance, and 𝜆 is thewavelength of the signal.

The signal propagation path loss for T-R separationdistance 𝑑 is expressed as

Path loss,PL (𝑑) =(4𝜋2) 𝑑2𝐿

𝜆2. (2)

Page 4: Research Article An Adaptive Linearized Method for ...downloads.hindawi.com/journals/ijdsn/2015/342428.pdfResearch Article An Adaptive Linearized Method for Localizing Video Endoscopic

4 International Journal of Distributed Sensor Networks

For Medical Implant Communication Services (MICS), thetransmitting antenna is considered to be part of the channel[27]. For the MICS channel, the path loss includes thetransmitter antenna gain:

PL (𝑑) =𝐺𝑡(4𝜋2) 𝑑2𝐿

𝜆2. (3)

The received power can be expressed as

𝑃𝑅 (𝑑) =

𝑃𝑇𝐺𝑟

PL (𝑑). (4)

The received signal strength in dBm can simply be expressedas follows:

RSSI (in dBm) = (𝐺𝑟 + 𝑃𝑇) (in dBm) − PL (in dBm) .(5)

The most widely used path loss lognormal shadowing sig-nal propagation model includes the path loss attenuationsexponents which are different for different surroundings andvaries due to the medium of propagation. The path loss indB at some distance 𝑑 can statistically be modeled by thefollowing path loss lognormal shadowing equation:

PL (𝑑) = PL (𝑑0) + 10𝛼log

10

𝑑

𝑑0

+ 𝑆. (6)

𝑑0is the reference distance (where 𝑑 ≥ 𝑑

0) and 𝛼 is the path

loss exponent which heavily depends on the environmentwhere RF signal is propagating through. For example, it iswell-known that, for free space, 𝑛 = 2. Human body is anextremely lossy environment; therefore, much higher valuefor the path loss exponent is expected. 𝑆(0, 𝜎RSS

2) is the

random scatter around the mean with standard deviation𝜎RSS in dB caused by different materials and antenna gain indifferent directions.

4. Proposed Localization Algorithm

Weighted Centroid Localization (WCL) calculates the posi-tion of the target node using the sum of the weightedaverage of the reference nodes positions. WCL introducedthe quantification of the nodes position depending on theirdistance to the target node. The aim is to give more influenceto those nodes which are nearer to the target. The three-dimensional position of the target is calculated using WCLas follows:

𝑃𝑚(𝑥est, 𝑦est, 𝑧est) =

∑𝑁

𝑖=1𝑊𝑖,𝑚𝐵𝑖(𝑥, 𝑦, 𝑧)

∑𝑁

𝑖=1𝑊𝑖,𝑚

=∑𝑁

𝑖=1(1/distance

𝑖,𝑚) 𝐵𝑖(𝑥, 𝑦, 𝑧)

∑𝑁

𝑖=1(1/distance

𝑖,𝑚)

,

(7)

where 𝑃𝑚(𝑥est, 𝑦est, 𝑧est) is the estimated location for the 𝑚th

position of the target. distance𝑖,𝑚

denotes the distance of the𝑖th reference node from the target’s𝑚th position.𝐵

𝑖(𝑥, 𝑦, 𝑧) is

the known position of 𝑖th reference node;𝑁 is the number ofreference nodes in the communication range (in our system𝑁 = 8).

4.1. Linear Least Square-WCL (LLS-WCL): AVCELocalizationApproach. In our proposed VCE localization approach, wehave usedWCL algorithm to calculate the three-dimensionalposition of the VCE using the corresponding weight ofthe reference nodes and their known positions. Figure 3demonstrates our proposed approach of WCL to localize theVCE where the red object indicates the target VCE and theblue tags indicate the reference nodes. The VCE is equippedwith a RF transmitter tag. As shown in Figure 3, a 3D receiverarray of 8 RF receiver (Rx) nodes has been used to localizethe mobile VCE at (𝑥, 𝑦, 𝑧) position. The dimension of the3D array is 300mm × 300mm × 300mm. The receivers areplaced as the reference nodes at (𝑥

𝑖, 𝑦𝑖, 𝑧𝑖) positions.

𝑑𝑖indicates the distance of the receivers from the VCE

which is used to calculate the weight of the sensors whichis inversely proportional to the distance. In radio signalpropagation, the received signal strength decreases as thedistance of the Tx-Rx increases as in (1). Therefore, we haveused the radio propagation model to calculate the distance 𝑑

𝑖

from the path loss PL(𝑑) using (6) where PL(𝑑) is calculatedfrom the received signal strength RSSI using (5). In ourproposed approach, the VCE transmits RF signal and the 8receivers measure the signal strength (RSSI) of the receivedsignal. The path loss PL(𝑑) is calculated from the RSSI whichis an identifier of distance 𝑑

𝑖. Finally the weight of the

sensors is calculated using (8) and the position of the VCEis calculated using WCL algorithm using (9). Consider

𝑊𝑖,𝑚=

1

PL (𝑑𝑖,𝑚), (8)

where𝑊𝑖,𝑚

is the weight of the 𝑖th sensor for𝑚th position ofthe VCE. Consider

𝑥est =∑𝑁

𝑖=1𝑊𝑖,𝑚𝑥𝑖

∑𝑁

𝑖=1𝑊𝑖,𝑚

,

𝑦est =∑𝑁

𝑖=1𝑊𝑖,𝑚𝑦𝑖

∑𝑁

𝑖=1𝑊𝑖,𝑚

,

𝑧est =∑𝑁

𝑖=1𝑊𝑖,𝑚𝑧𝑖

∑𝑁

𝑖=1𝑊𝑖,𝑚

.

(9)

Figure 4 shows the simulation results using WCL for 2530sample positions of the VCE where we can observe that thereoccurs a linear relationship between the estimated and realpositions. We can express the relation of the estimated andreal position by the following equation:

𝑃𝐴,𝑚

(𝑥, 𝑦, 𝑧) = 𝐶 ⋅ 𝑃est,𝑚 (𝑥est, 𝑦est, 𝑧est) , (10)

where 𝑃𝐴,𝑚

and 𝑃est,𝑚 are the real and estimated positions(coordinates) for 𝑚 possible positions of the target. Usingthis linear relationship, a calibration process is applied usinglinear least square regression of the estimated and reallocations to calculate the calibration coefficient, 𝐶. Finally𝐶 is used to calibrate the locations to find more accuratelocation of VCE which is indicated as the red line in Figure 4.We call this process of localization linear least square-WCL(LLS-WCL).

Page 5: Research Article An Adaptive Linearized Method for ...downloads.hindawi.com/journals/ijdsn/2015/342428.pdfResearch Article An Adaptive Linearized Method for Localizing Video Endoscopic

International Journal of Distributed Sensor Networks 5

A major challenge in this approach of VCE localizationis that the weight calculated using uniform path loss cannotassure the same distance for different surroundings in thenonhomogeneous environment as human body. As we cansee from (6) the path loss attenuation exponents (PL(𝑑

0), 𝛼

and 𝑆) are important factors for distance calculation fromthe radio propagationmodel. Path loss attenuation exponentsvary due to the environment and medium of propagation.Thus, to calculate the distance accurately, first we have toidentify the path loss attenuation exponents for differentsurroundings where the target stays. The second issue inthis regard is the random deviation of attenuation 𝑆(0, 𝜎RSS

2)

which is mainly caused due to the multipath and shadowfading effects.The path loss is scattered around amean due tothe deviations affecting the accuracy in weight calculation aswell as the position estimation using WCL. As we can see inFigure 4, the estimated locations are scattered around ameanwhich is due to the random path loss deviations 𝑆(0, 𝜎RSS

2).

Thus, the path loss deviations must be minimized to improvethe localization accuracy.

4.2. Adaptive Linearized LLS-WCL: An Improved Methodof VCE Localization. The adaptive linearized LLS-WCLincludes the following steps of improvements.

(1) Statistical Path LossModeling.Thestatistics of the path lossmodel for specific surroundings is adaptively identified usinglinear least square regression of the experimentally collecteddata sets.

(2) Path Loss Linearization.This step is to minimize the pathloss deviations by linearizing the path loss model consideringminimum deviations.

(3) Weight Calculation and Position Estimation. In this step,theweight of the sensors is calculated from the linearized pathloss and the position is estimated using WCL algorithm.

(4) Position Calibration. The final step is to identify thecalibration coefficient (𝐶) using the linear relationship ofthe estimated and real locations and then to calibrate theestimated positions using 𝐶 to improve the localizationaccuracy.

The steps are briefly explained below.

4.2.1. Statistical Path Loss Modeling. We use the lognormalshadowing signal propagation model (as shown in (6)) tomodel the path loss for two different scenarios assuming𝜎RSS

2

deviations with 0 mean. Consider

PL (𝑑) = PL (𝑑0) + 10𝛼log

10

𝑑

𝑑0

+ 𝑆 (0, 𝜎RSS2) . (11)

The path loss may be modelled using two different methods.The first method requires experimental data sets (path lossfor variable Tx-Rx separation distances) for different sur-roundings to find the statistics of the path loss model. How-ever, no such reference data sets are currently available formedical implant communication service (MICS).The secondmethod is simulation based [27] where the characteristics of

(x6, y6, z6)

(xx

, y

y

, z

z

)

(x1, y1, z1)Rx 1

(x3, y3, z3)Rx 3

(x4, y4, z4)Rx 4

(x5, y5, z5)Rx 5

Rx 6

(x7, y7, z7)Rx 7

(x8, y8, z8)Rx 8

Capsule Tx(x2, y2, z2)

Rx 2

d1

d2

d3

d4

d5

d6

d7

d8

Figure 3: WCL algorithm.

radio propagation are analyzed using electromagnetic fieldsimulator by setting different statistics of path loss model fordifferent locations of the human body model. Such statisticaldata sets are available for MICS in [27].

Hence we follow the first method to model the path lossusing our experimentally collected data sets (path loss versusdistance) for two scenarios. We have also modelled the pathloss using the statistics available in [27] for the MICS. Thestatistics (PL(𝑑

0), 𝛼 and 𝜎RSS) of the path loss model can

adaptively be identified for different scenario using linearleast square regression of the entire data sets as follows.

We consider the signal propagation model of (11) as alinear system of equation in matrix form as follows:

𝐵 = 𝐴𝑋

[[[[[[

[

PL (𝑑1)

PL (𝑑2)

.

.

.

PL (𝑑𝑚)

]]]]]]

]

=

[[[[[[

[

1 10log10(𝑑1) 1

1 10log10(𝑑2) 1

.

.

....

.

.

.

1 10log10(𝑑𝑚) 1

]]]]]]

]

[[

[

𝑃 (𝑑0)

𝛼

𝜎RSS

]]

]

,

(12)

where PL(𝑑) is the path loss calculated using (5) from themeasured RSSI of the sensors for variable distances 𝑑 for𝑚 several positions of the target. As 𝐵 is only approximatedue to the random deviations, the problem requires thedetermination of 𝑋 such that 𝐵 ≈ 𝐴𝑋, where 𝐵 − 𝐴𝑋 is theresiduals.

Minimizing the sum of the squares of the residuals leadsto a normal equation as follows:

𝐴𝑇𝐴𝑋 = 𝐴

𝑇𝐵,

𝑋 = (𝐴𝑇𝐴)−1

𝐴𝑇𝐵.

(13)

Page 6: Research Article An Adaptive Linearized Method for ...downloads.hindawi.com/journals/ijdsn/2015/342428.pdfResearch Article An Adaptive Linearized Method for Localizing Video Endoscopic

6 International Journal of Distributed Sensor Networks

EstimatedCalibrated

EstimatedCalibrated

EstimatedCalibrated

−10 −5 0 5 10

(mm)

−150

−100

−50

0

50

100

150

−10 −5 0 5 10

(mm)

0

−150

−100

−50

50

100

150

−10 −5 0 5 10

(mm)

0

−150

−100

−50

50

100

150

xest yest zest

x(m

m)

y(m

m)

z(m

m)

Figure 4: Position estimation and calibration using LLS-WCL.

Thus, we can calculate the path loss attenuation exponents(PL(𝑑

0), 𝛼 and 𝜎RSS) for different scenario using the exper-

imental data sets as follows:

[[

[

𝑃 (𝑑0)

𝛼

𝜎RSS

]]

]

=(

(

[[[[[[

[

1 10log10(𝑑1) 1

1 10log10(𝑑2) 1

.

.

....

.

.

.

1 10log10(𝑑𝑚) 1

]]]]]]

]

𝑇

[[[[[[

[

1 10log10(𝑑1) 1

1 10log10(𝑑2) 1

.

.

....

.

.

.

1 10log10(𝑑𝑚) 1

]]]]]]

]

)

)

−1

[[[[[[

[

1 10log10(𝑑1) 1

1 10log10(𝑑2) 1

.

.

....

.

.

.

1 10log10(𝑑𝑚) 1

]]]]]]

]

𝑇

[[[[[[

[

PL (𝑑1)

PL (𝑑2)

.

.

.

PL (𝑑𝑚)

]]]]]]

]

.

(14)

4.2.2. Path Loss Linearization. Using the adaptively identifiedstatistics (PL(𝑑

0), 𝛼 and 𝜎RSS) of different scenario, the path

loss is linearized tominimize the deviations.The linearized ormean path loss is obtained considering minimum deviations

(𝜎RSS = 0). After completion of this step the path loss isadaptively linearized. Consider

[[[[[[

[

PL (𝑑1)lin

PL (𝑑2)lin

.

.

.

PL (𝑑𝑚)lin

]]]]]]

]

=

[[[[[[

[

1 10log10(𝑑1)

1 10log10(𝑑2)

.

.

....

1 10log10(𝑑𝑚)

]]]]]]

]

[PL (𝑑0)

∝] , (15)

where PL(𝑑𝑚)lin is the linearized path loss for 𝑚 possible

positions of the target.

4.2.3. Weight Calculation and Position Estimation. The scat-tered path loss is attenuated to the adaptively linearized pathloss and then used to calculate the weight of the sensors using(16). Consider

𝑊𝑖,𝑚=

1

PL(𝑑𝑖,𝑚)lin, (16)

where𝑊𝑖,𝑚

is the weight of the 𝑖th sensor for𝑚th position ofthe target and PL(𝑑

𝑖,𝑚)lin is the linearized path loss of the 𝑖th

sensor for𝑚th position of the target.Using the weight of the sensors and their reference posi-

tions, the VCE is localized using WCL as follows using (17)

Page 7: Research Article An Adaptive Linearized Method for ...downloads.hindawi.com/journals/ijdsn/2015/342428.pdfResearch Article An Adaptive Linearized Method for Localizing Video Endoscopic

International Journal of Distributed Sensor Networks 7

−150

−100

−50

0

50

100

150

x(m

m)

−10 −5 0 5 10

(mm)xest

(a)

−150

−100

−50

0

50

100

150

y(m

m)

−10 −5 0 5 10

(mm)yest

(b)

−150

−100

−50

0

50

100

150

z(m

m)

−10 −5 0 5 10

(mm)zest

(c)

Figure 5: Linear relationship between real and estimated position across 𝑥-𝑦-𝑧-axis (simulated 2,530 samples positions).

where the weight is calculated using adaptively linearizedpath loss. Consider

𝑥est =∑𝑁

𝑖=1𝑊𝑖,𝑚𝑥𝑖

∑𝑁

𝑖=1𝑊𝑖,𝑚

,

𝑦est =∑𝑁

𝑖=1𝑊𝑖,𝑚𝑦𝑖

∑𝑁

𝑖=1𝑊𝑖,𝑚

,

𝑧est =∑𝑁

𝑖=1𝑊𝑖,𝑚𝑧𝑖

∑𝑁

𝑖=1𝑊𝑖,𝑚

.

(17)

4.2.4. Estimated Position Calibration. We can observe fromthe simulation results of adative linearized WCL that there isa linear relationship between the estimated and real positions

as shown in Figure 5 which can be written as a linear systemof equation as in (18). Consider

𝑃𝐴,𝑚

(𝑥, 𝑦, 𝑧) = 𝐶 ⋅ 𝑃est,𝑚 (𝑥est, 𝑦est, 𝑧est) . (18)

𝑃𝐴,𝑚

and 𝑃est,𝑚 are all the actual and estimated coordinatesin three dimensions for 𝑚 possible positions of the tar-get. Figure 5 shows the linear relationship of the real andestimated positions for 2,530 possible sample positions ofthe VCE. As we can see that, it is possible to calibrate theestimated positions using (19) to find amore accurate locationof VCE if the calibration coefficient 𝐶 is identified. Consider

𝑃𝐶,𝑚

(𝑥, 𝑦, 𝑧) = 𝐶 ⋅ 𝑃est,𝑚 (𝑥est, 𝑦est, 𝑧est) , (19)

where𝑃𝐶,𝑚(𝑥, 𝑦, 𝑧) is the calibrated position for𝑚th position.

Page 8: Research Article An Adaptive Linearized Method for ...downloads.hindawi.com/journals/ijdsn/2015/342428.pdfResearch Article An Adaptive Linearized Method for Localizing Video Endoscopic

8 International Journal of Distributed Sensor Networks

UART interfacePuTTY

Collected data

ARM Cortex-M4microcontrollerRFM70 transceiver moduleRuler for distance measurement

Figure 6: Scenario 1: measurement setup for data collection using Air to Air interface.

We can calculate 𝐶 using linear least square regression ofall estimated and real positions if (18) is considered as a linearsystem of equation in matrix form,

𝑃𝐴= 𝑃𝐸⋅ 𝐶, (20)

where𝑃𝐴is the actual positions,𝑃

𝐸is estimated positions, and

𝐶 is the calibration coefficient.As 𝑃𝐴is approximate due to the standard deviations, the

problem requires the determination of 𝐶 such that 𝑃𝐸𝐶 ≈ 𝑃

𝐴

and 𝑒 = 𝑃𝐴−𝑃𝐸𝐶where 𝑒 is the residuals.Minimizing the sum

of the squares of the residuals leads to a normal equation

𝑃𝐸

𝑇𝑃𝐸𝐶 = 𝑃

𝐸

𝑇𝑃𝐴

or

𝐶 = (𝑃𝐸

𝑇𝑃𝐸)−1

𝑃𝐸

𝑇𝑃𝐴.

(21)

Thus, the coefficient 𝐶 is calculated using all the estimatedand real positions using (22) and then a calibration process isapplied using (23) to find more accurate location of the VCEusing adaptive linearized LLS-WCL. Consider

𝐶 =(

(

[[[[[[

[

𝑥est1 𝑦est1 𝑧est1

𝑥est2 𝑦est2 𝑧est2

.

.

....

.

.

.

𝑥est𝑚 𝑦est𝑚 𝑧est𝑚

]]]]]]

]

𝑇

[[[[[[

[

𝑥est1 𝑦est1 𝑧est1

𝑥est2 𝑦est2 𝑧est2

.

.

....

.

.

.

𝑥est𝑚 𝑦est𝑚 𝑧est𝑚

]]]]]]

]

)

)

−1

[[[[[[

[

𝑥est1 𝑦est1 𝑧est1

𝑥est2 𝑦est2 𝑧est2

.

.

....

.

.

.

𝑥est𝑚 𝑦est𝑚 𝑧est𝑚

]]]]]]

]

𝑇

[[[[[[

[

𝑥𝐴1

𝑦𝐴1

𝑧𝐴1

𝑥𝐴2

𝑦𝐴2

𝑧𝐴2

.

.

....

.

.

.

𝑥𝐴𝑚

𝑦𝐴𝑚

𝑧𝐴𝑚

]]]]]]

]

,

(22)

[[[[[[

[

𝑥𝑐1

𝑦𝑐1

𝑧𝑐1

𝑥𝑐2

𝑦𝑐2

𝑧𝑐2

.

.

....

.

.

.

𝑥𝑐𝑚

𝑦𝑐𝑚

𝑧𝑐𝑚

]]]]]]

]

=

[[[[[[

[

𝑥est1 𝑦est1 𝑧est1

𝑥est2 𝑦est2 𝑧est2

.

.

....

.

.

.

𝑥est𝑚 𝑦est𝑚 𝑧est𝑚

]]]]]]

]

[𝐶] . (23)

5. Experimental Methodologies andSystem Development

Themethodology is divided into the following steps.

5.1. Development of the Test System. The test system hasbeen developed to collect data using two different scenarios.By weight, human body constitutes of 45%–65% water [32–34]. As air and water have completely different propertiesof radio propagation, we have chosen to perform the radiopropagation test for Air to Air and for Air to Water interfacescenarios to confirm that different scenarios have influenceon the path loss.

The measurement setup for data collection using scenar-ios 1 and 2 has been shown in Figures 6 and 7. For scenario1, both the transmitter and receiver have been placed in air.For scenario 2, the transmitter has been placed in air andthe receiver has been placed inside the water. The test systemmay be divided into RF communication and data collectionsubsystems. The RF communication part is similar to the RFcommunication part in Figure 2. To develop the RF commu-nication part, we have used 2.4GHz ISM band TransceiverModule (RFM70) and ARM Coxtex-M4 microcontrollers.Tranceivers are used to transmit and receive radio signals; andthe MCU has been used to configure the transceivers and toread-write data.The data collection part consists of theUARTinterface of MCU and the PuTTY terminal software of PC.

The radio signal transmitted by the transmitter is receivedby the receiver and the RSSI is measured. If the transmitterposition is changed, the RSSI thresholds change accordingly.For both scenarios, we have collected the RSSI data forvariable Tx-Rx seperation distances. The UART interface ofMCU and the PuTTY terminal has been used to collect RSSIdata using the PC. We can send commands and read RSSI

Page 9: Research Article An Adaptive Linearized Method for ...downloads.hindawi.com/journals/ijdsn/2015/342428.pdfResearch Article An Adaptive Linearized Method for Localizing Video Endoscopic

International Journal of Distributed Sensor Networks 9

PuTTY for data collection

Jar full of water

ARM Cortex-M4microcontroller

RFM70 transceiver transmitter

RFM70 transceiver

configured as

configured as receiver

Figure 7: Scenario 2: measurement setup for data collection using Air to Water interface.

200 400 600 800 1000 1200 1400

42

44

46

48

50

52

54

56

58

Distance (mm)

Path

loss

(dBm

)

Measured path lossDistance based path loss model

(a) Air to Air scenario

200 400 600 800 1000 1200 1400 1600 180065

70

75

80

85

90

95

Distance (mm)

Path

loss

(dBm

)

Measured path lossDistance based path loss model

(b) Air to Water scenario

Figure 8: Distance based path loss model obtained from the measured data (path loss versus distance).

from the MCU using PuTTY. We can measure the Tx-Rxseparation distance using a centimeter-scaled rular.

5.2. Data Collection. We collect the measured RSSI of thereceivers for variable TX-Rx separation distances for twoscenarios which have been presented in Table 1. Figure 8shows the plot of the calculated path loss as a function ofTX-RX separation distance which has been plotted usingMatlab. As we can see from the table and figure the pathloss changes logarithmically as a function of distance and itis scattered around a mean. It can be explained using theshadow fading path lossmodel as in (11)wherewe can observethat the path loss is a linear function of the logarithm ofdistance and the path loss is scattered due to the randomscattered deviation 𝑆(0, 𝜎RSS

2) around a mean. The straight

line through the scattered path loss is obtained using “leastsquares” method that best fits the collected data.

5.3. Path Loss Modelling. The statistics of the path loss havebeen extracted in Table 2 using linear least square regressionof the measured data using (14).

As we can see from the extracted statistics, the parametersare different for different scenarios which is due to theradio propagation property of different mediums. As theradio propagation property of air and water is different,much higher value of the path loss exponent and path lossdeviations has been observed for the Air to Water scenario.Higher value of path loss exponent is observed due to thelossy characteristics of water. The path loss is also morescattered due to the shadow fading effects of the Air toWater scenario which is caused due to the nonhomogeneousmedium of propagation.

As the radio propagation parameters are different fordifferent mediums, we can model the path loss statisticallyusing the extracted parameters. By considering the normal

Page 10: Research Article An Adaptive Linearized Method for ...downloads.hindawi.com/journals/ijdsn/2015/342428.pdfResearch Article An Adaptive Linearized Method for Localizing Video Endoscopic

10 International Journal of Distributed Sensor Networks

Table 1: Path loss versus Tx-Rx separation distances [for selected points].

Air to Air scenario Air to Water scenario

Distance(mm)

RSSI(dBm)

Path loss (dBm)PL(𝑑) = 𝐺

𝑅+ 𝑃𝑇− RSSI

where 𝐺𝑅+ 𝑃𝑇= −25 dBm

Distance(mm)

RSSI(dBm)

Path loss (dBm)PL(𝑑) = 𝐺

𝑅+ 𝑃𝑇− RSSI

where 𝐺𝑅+ 𝑃𝑇= 5 dBm

240 −67 42 500 −67 72300 −69 44 640 −69 74360 −71 46 900 −71 76420 −73 48 1100 −75 80600 −75 50 1260 −79 84762 −77 52 1279 −81 86912 −79 54 1300 −83 881062 −81 56 1500 −85 901211 −83 58 1680 −89 94

200 300 400 500 600 700 800 900 1000 1100 1200 130040

42

44

46

48

50

52

54

56

58

60

Path

loss

(dBm

)

Scattered path lossLinearized path loss

Distance (mm)

(a) Air to Air scenario

400 600 800 1000 1200 1400 1600 180060

65

70

75

80

85

90

95

100

Distance (mm)

Path

loss

(dBm

)

Scattered path lossLinearized path loss

(b) Air to Water scenario

Figure 9: Statistical model and path loss linearization.

distribution of the path loss deviations 𝑆(0, 𝜎RSS2), we model

the path loss for both scenarios using the extracted parame-ters as shown in Figures 9(a) and 9(b).

Human body is a nonhomogeneous environment forradio propagation. Therefore, the path loss is not uniform.Thus, different values of the path loss attenuation expo-nents and deviations are expected for different scenarios.By adaptively identifying the statistics for different scenarioor environment, we can model the path loss for differentlocations inside the human body. The extracted statistics fortwo different scenarios of MICS are available in [27] wherea 3D visualization system for medical implants has beenused to calculate the statistics of the path loss model. Themain components of their simulation system include a three-dimensional virtual human body model, the propagationengine which is a three-dimensional full-wave electromag-netic field simulator (i.e., HFSS 1), the 3D immersive and

visualization platform, and finally an implantable (or bodysurface) antenna. The 3D human body model includes fre-quency dependent dielectric properties of 300+ parts in amale human body which has a resolution of 2mm. Table 3summarizes the extracted parameters of their model. As wecan see, the statistics are different for different scenarios andmuch higher values of the parameters are observed.

Small intestine is a deep-tissue organ and its standardsize is 140mm × 120mm × 160mm. Thus, we can model thepath loss for small intestine by setting the statistics of deep-tissue organ. We have modelled the path loss for deep-tissueimplant to body surface for 50–800mm range of distancewhich has been plotted in Figure 10(a) considering normaldistribution of deviations as shown in Figure 10(b).

5.4. Path Loss Linearization andWeight Calculation. Thepathloss is linearized by finding the linear least squares regression

Page 11: Research Article An Adaptive Linearized Method for ...downloads.hindawi.com/journals/ijdsn/2015/342428.pdfResearch Article An Adaptive Linearized Method for Localizing Video Endoscopic

International Journal of Distributed Sensor Networks 11

0 100 200 300 400 500 600 700 800

30

40

50

60

70

80

90

100

110

Distance (mm)

Path

loss

(dBm

)

Scattered path lossLinearized path loss

(a)

0

0.005

0.01

0.015

0.02

0.025

0.03

0.035

0.04

0.045

0.05

PDF

−25 −20 −15 −10 −5 0 5 10 15 20 25

Path loss deviations, S (dBm)

(b)

Figure 10: (a) Path loss versus distance for deep tissue implant to body surface scenario. (b) Normal distribution of the path loss deviationdue to shadow fading effects of deep tissue implant to body surface.

Table 2: Extracted parameters using linear least square regression of the measured data.

Scenarios Measurement parameters PL(𝑑0) 𝛼

𝑆(0, 𝜎RSS2)

Mean 𝜎RSS

Air to Air interfaceFrequency band: 2.4GHz

Transmission power: −25 dBmNumber of points: 980

42 2.08 0 0.74

Air to Water interfaceFrequency band: 2.4GHzTransmission power: 5 dBmNumber of points: 1501

72 4.005 0 2.54

Table 3: Extracted parameters of the statistical implant path lossmodel for two different scenarios.

Implant to body surface PL(𝑑0) 𝛼 𝜎RSS

Deep-tissue 47.14 4.26 7.85Near-surface 49.81 4.22 6.81

line through the scattered path loss that best fits the collecteddata. In Figures 9(a), 9(b), and 10, the straight line through thescattered path loss indicates the linearized path loss for Airto Air, Air to Water, and the deep tissue implant scenarios.To analyze the performance of adaptively linearized WCL,we find the straight line by replacing the extracted value ofPL(𝑑0) and 𝛼 in (15) considering minimum deviations of the

points about the regression line. The results for few selectedpoints are illustrated in Table 4.

Theweight of the sensors is calculated from the linearizedpath loss using (16). The relation of the weight factor (𝑊) tothe distance has been shown in Figure 11 where we can seethat the weight decreases as a function of distance and it isnot scattered as it has been calculated using linearized pathloss where the deviations are minimized.

5.5. Position Estimation and Calibration. Finally, the positionof the target is calculated using WCL as shown in (17)and then calibrated using (23). We have used the calculatedweights of the sensors and their reference positions to findthe estimated position using WCL. As we can see in Figure 5if we simulate the WCL algortithm to find the positionof several points of small intestine in 1mm resolution,then it is found that there is a linear relationship betweenthe real and estimated positions. As there occurs a linearrelationship, a calibration process may be applied where thecalibration coefficient (𝐶) is calcultaed using linear leastsquare regression of the real and estimated positions using(22). The estimated position is then calibrated using (23)to find more accurate position. The calibration coefficientfor different scenario has been summarized in Table 5. Theresults of position calibration have been shown in Figure 12where the relationship of the real, estimated, and calibratedpositions is presented. Thus, it is essential to extract thevalue of 𝐶 for any specific scenario before localization. Theblue scattered lines in the figure indicate the relation ofthe estimated position to the real positions whereas the redstraight line indicates the calibrated location. We observe

Page 12: Research Article An Adaptive Linearized Method for ...downloads.hindawi.com/journals/ijdsn/2015/342428.pdfResearch Article An Adaptive Linearized Method for Localizing Video Endoscopic

12 International Journal of Distributed Sensor Networks

200 400 600 800 1000 12000.017

0.018

0.019

0.02

0.021

0.022

0.023

0.024

Distance (mm)

Wei

ght

=1

/line

ariz

ed p

ath

loss

(a) Air to Air

200 400 600 800 1000 1200 1400 1600 18000.0105

0.011

0.0115

0.012

0.0125

0.013

0.0135

0.014

0.0145

0.015

Distance (mm)

Wei

ght

=1

/line

ariz

ed p

ath

loss

(b) Air to Water

0 100 200 300 400 500 600 700 8000.01

0.012

0.014

0.016

0.018

0.02

0.022

Distance (mm)

Wei

ght,

W

(c) Deep tissue implant to body surface

Figure 11: Weight versus distance for different scenarios.

Table 4: Path loss linearization using the statistics of the path loss.

Scattered path loss, PL(𝑑) = 𝑃𝑇− RSSImeasured Linearized path loss, PL(𝑑)linearized = PL(𝑑

0) + 10𝛼log

10𝑑

= PL(𝑑0) + 10𝛼log

10(𝑑/𝑑0) + 𝑆 (0, 𝜎RSS

2) (Considering minimum path loss deviations)

Air to Air Air to Water Air to Air Air to WaterDistance(mm)

Path loss(dBm)

Distance(mm)

Path loss(dBm)

Distance(mm)

Path loss(dBm)

Distance(mm) Path loss (dBm)

240 42 500 72 240 42 500 72300 44 640 74 300 44.02445 640 76.29376360 46 900 76 360 45.67855 900 82.22366420 48 1100 80 420 47.07706 1100 85.71403600 50 1260 84 600 50.31297 1260 88.07609762 52 1279 86 762 52.48143 1279 88.33642912 54 1300 88 912 54.11168 1300 88.619681062 56 1500 90 1062 55.49313 1500 91.108711211 58 1680 94 1211 56.68427 1680 93.07989

Page 13: Research Article An Adaptive Linearized Method for ...downloads.hindawi.com/journals/ijdsn/2015/342428.pdfResearch Article An Adaptive Linearized Method for Localizing Video Endoscopic

International Journal of Distributed Sensor Networks 13

−10 −5 0 5 10

−150

−100

−50

0

50

100

150

x(m

m)

(mm)xest

(a)

−10 −5 0 5 10

−150

−100

−50

0

50

100

150

y(m

m)

(mm)yest

(b)

−10 −5 0 5 10

−150

−100

−50

0

50

100

150

z(m

m)

(mm)zest

(c)

Figure 12: Location estimation and calibration using adaptive linearized LLS-WCL and their relationships.

that the calibrated positions using adaptive linearized LLS-WCL are absolutely linear to the real position indicating theminimized location error.

6. Simulation System

Due to practical limitations, as it is difficult to verify theaccuracy of the proposed algorithm using a real human body,we have developed a simulation system usingMatlab to verifythe accuracy.The system includes a 3D virtual small intestinemodel, 8 receiver sensors, implanted transmitter, and thepropagation engine. Figure 13 shows the overview of the 3Dsimulation system which includes the small intestine modelof 140mm × 120mm × 160mm dimension depicted by thespiral tunnel. The small intestine has been placed near to the

center of the 3D receiver array so as to avoid the central effectof the centroid algorithm where the localization accuracyreduces from the center to outwards. The black dot indicatesone of the sample positions of the capsule’s transmitter whichhas been mapped using Matlab. We have mapped 2530sample positions similarly while it travels through the smallintestinemodel in 1mm resolution.The blue tags indicate thereceiver sensor’s position. The sensor topology is such thatthe 8 sensors are placed at the edge points of a 300mm ×

300mm × 300mm dimension box. The transmitted signalof the implanted transmitter is received by each of receivers.The propagation of Tx-Rx has beenmodelled by the extractedstatistics of the path loss attenuation exponents (PL(𝑑

0), 𝛼

and 𝜎RSS) of three different scenarios discussed earlier. Thepropagation engine includes the propagation models which

Page 14: Research Article An Adaptive Linearized Method for ...downloads.hindawi.com/journals/ijdsn/2015/342428.pdfResearch Article An Adaptive Linearized Method for Localizing Video Endoscopic

14 International Journal of Distributed Sensor Networks

Sen1 (−300, −300, −300)

Sen2 (−300, −300, 300)

Sen3 (−300, 300, −300)

Sen4 (−300, 300, 300)

Sen6 (300, −300, 300)

Sen8 (300, 300, 300)

−300−200−1000100200300

−300−200

−1000

100200

300

−300

−200

−100

0

100

200

300

y-axisx-axis

z-a

xis X: 137.2

Y: 99.47Z: −5

Sen5 (300, −300, −300)

Sen7 (300, 300, −300)

Figure 13: Simulation system overview.

Table 5: Calibration coefficient calculated using linear least squareregression.

Scenarios Calibration coefficient, 𝐶Air to Air 16.17Air to Water 12.38Deep-tissue implant to body surface 14.55

calculate the RSSI of the receivers for each position of thecapsule Tx. Finally, the estimated position of the capsule iscalculated using our proposed adaptive linearized LLS-WCLalgorithm. We have simulated 2,530 sample positions to findthe estimated position of the capsule using our developedsimulation system. The results are shown in the folowingsection.

The overall system flow of the simulation system asdiscussed above has been shown in the block diagram inFigure 14.

7. Simulation Results and Analysis

To verify the accuracy of localization, we have simulated2530 sample positions (1mm resolution) of the capsule tofind the estimated position using our proposed adaptivelinearized LLS-WCL algorithm. The simulation system hasbeen developed using Matlab. The estimated positions ofselected seven sample positions are shown in Figure 15.

The localization accuracy can be verified using the perfor-mance indices as localization error (LE), root mean squareerror (RMSE), and the standard deviation of error (STD)which are calculated as follows. Localization error (LE) isdefined as the difference between estimated and real positionas follows:

Localization Error, LE = √(𝑃est (𝑥, 𝑦, 𝑧) − 𝑃real(𝑥, 𝑦, 𝑧))2,

LE = √(𝑥est − 𝑥real)2+ (𝑦est − 𝑦real)

2+ (𝑧est − 𝑧real)

2.

(24)

𝑃est(𝑥, 𝑦, 𝑧) is the estimated position and 𝑃real(𝑥, 𝑦, 𝑧) is thereal position of the capsule. For 𝑁 simulation results of 𝑁

possible positions of the capsule, the root mean square error(RMSE) is

RMSE =∑𝑁

𝑖=1LE𝑖

𝑁. (25)

The standard deviation of error is expressed as

Standard Deviation, STD = √∑𝑁

𝑖=1(LE𝑖− RMSE)2

𝑁. (26)

FromFigure 14, it can be observed that the difference betweenthe estimated and real position is very small. Table 6 summa-rizes the location estimation results for 2,530 simulated pointsand verifies the accuracy by finding the performance indices.As we can see from the results the root mean square error(RMSE) of localization is as low as 5.106mm with standarddeviation 3.5mm.

We have also simulated the proposed algorithm usingdifferent scenarios and compared the results. Table 7 presentsthe results of different optimization stages and summarizesthe accuracy improvement. It is observed that localizationaccuracy significantly improves using the adaptively lin-earized method of LLS-WCL algorithm. As we can see fromthe different stages of optimization in Table 7, the meanlocalization error (RMSE) is as high as 157.3mm using RSSIbased WCL algorithm without considering any optimizationlevels. If we estimate the position using scattered path lossbased LLS-WCL using linear least square calibration wherethe deviations have not beenminimized (𝜎RSS = 7.85 for deeptissue implant model), the RMSE is 113mm with standarddeviation 41mm. It may be dropped to RMSE 22.6mmconsidering the lower value of the path loss deviation as𝜎RSS = 1. If the path loss exponents are adaptively identifiedfor different scenarios and the path loss model is linearizedconsideringminimum path loss deviations, then it is possibleto further improve the accuracy. In our proposed adaptivelinearized LLS-WCL algorithm, we have applied all the fouroptimization levels and the accuracy has been significantlyimproved with the RMSE of 5.15mmwith standard deviation3.5mm. Figure 16 presents the comparison of the localizationresults for all 2,530 sample target positions using WCL, LLS-WCL, and adaptively linearized LLS-WCL where 𝑆 indicatesthe path loss deviation 𝜎RSS. It can be observed that, usingadaptive linearized LLS-WCL, much better accuracy in VCElocalization has been obtained. It is also observed in Figure 15that the accuracy depends on the path loss deviations (𝑆)for which the LE increases. In our proposed algorithm, theaccuracy has been significantly improved by minimizing thedeviations using path loss linearization.

Table 8 compares our path loss based LLS-WCL approachwith other previously proposed approaches. The authors in[24] proposed a 2D RF localization system using RSSI basedtriangulation method where 8 sensors were used to measuresignal strengths which was later used to estimate the distance.The average experimental error was reported to be 37.7mm[25] using a maximum of 92 samples. In [26], the authorsproposed an adaptive linearizedmethod of 2D localization ofthe moving telemetry capsule using RSS based triangulation

Page 15: Research Article An Adaptive Linearized Method for ...downloads.hindawi.com/journals/ijdsn/2015/342428.pdfResearch Article An Adaptive Linearized Method for Localizing Video Endoscopic

International Journal of Distributed Sensor Networks 15

Table 6: Adaptive linearized LLS-WCL simulation results.

Position Estimated position after calibration,𝑃𝑐,𝑚

(𝑥, 𝑦, 𝑧)Real position,𝑃𝐴,𝑚

(𝑥, 𝑦, 𝑧)LE

(mm)RMSE (mm)

All 2,530 positionsStandard deviation (mm)

All 2,530 positions1 (140, 115, 153) (134, 107, 150) 10.192 (−137, 86.9, 80.5) (−140, 84.2, 77.5) 5.053 (9.94, 71.5, 37.4) (9.9, 72.9, 37.5) 1.404 (76.3, 122, −25.9) (75.6, 126, −25) 4.06 5.15 3.55 (−132, 131, −95.4) (−130, 128, −90) 6.136 (−7.25, 57.4, −134) (−7, 56.4, −140) 6.557 (148, 130, −165) (140, 120, −160) 13.92

Linear least square WCL algorithm

ScatteredRSSI

Path losslinearization

Sensor topology with their reference positions

Small intestine model with 2530 sample positions

Propagation engine

Capsule’s real position

Sensor’s referencepositions

Estimated calibrated position

Mean localization

error

Figure 14: System flow block diagram.

Sen1 (−300, −300, −300)

Sen2 (−300, −300, 300)

Sen3 (−300, 300, −300)

Sen4 (−300, 300, 300)

Sen6 (300, −300, 300)

Sen8 (300, 300, 300)

Sen7 (300, 300, −300)

Sen5 (300, −300, −300)

1 23

4 56

7

Small intestineReceiver sensors

Real positionEstimated position

−300

−300

−200

−200

−100

−100

100

100

0

0200

200300

300

y-axis

x-axis

−300

−200

−100

0

100

200

300

z-a

xis

Figure 15: Localization results using adaptive linearized LLS-WCL.

method. They reported an average error of about 25% using3 sensors. Based on the statistical implant path loss modeldeveloped in [27], the authors in [28, 29] used RSS basedtriangulation technique to analyze possible capsule localiza-tion accuracy in 3D location estimation usingmaximum 1000samples and reported average localization error of 50mmin all organs where more than 32 sensors on body surfaceare needed for achieving satisfactory localization accuracy. In[31], the authors present a localization system based on UHFband RFID. They propose a location estimation algorithmby calculating center of gravity of antennas which havedetected the tag, and the results show a mean localizationerror of 2 cm. Using our proposed adaptively linearizedmethod of path loss based WCL, average localization error

0 500 1000 1500 2000 25000

50

100

150

200

250

300

350

Sample target position

Loca

lizat

ion

erro

r, LE

(mm

)

WCLLLS-WCL (S = 7.85)

LLS-WCL (S = 1)Adaptive LLS-WCL

Figure 16: Comparison of the localization accuracy of adaptivelinearized LLS-WCL in different stage of optimizations (plottedusing the simulated results for 2530 sample target positions in 1mmresolution).

of 5.106mm is achievable in 3D position estimation in 1mmspatial resolution (2,530 samples) using only 8 sensors. Aftercomparing the results, it can be said that the proposedalgorithm significantly improves the localization accuracy in3D location estimation using only eight sensors with higherspace resolution.

8. Conclusion

Path loss based WCL is a simple localization algorithm todetermine the three-dimensional location of the wireless

Page 16: Research Article An Adaptive Linearized Method for ...downloads.hindawi.com/journals/ijdsn/2015/342428.pdfResearch Article An Adaptive Linearized Method for Localizing Video Endoscopic

16 International Journal of Distributed Sensor Networks

Table 7: Different stage of optimization and performance comparison of the adaptively linearized LLS-WCL algorithm.

Algorithms WeightOptimization stages

Experimentscenario

Path lossexponent, 𝛼

Path lossdeviation𝜎RSS

RMSE(mm)

STD(mm)Linear regression

path lossmodelling

Positioncalibration usinglinear regression

WCL Scattered RSSI No No Deep-tissueimplant 4.26 7.85 157.3 69.09

WCL Scattered pathloss No No

Air to Air 2.08 0.74 139.6 61.6Air to Water 4.005 2.54 137.02 60.04Deep tissueimplant 4.26 7.85 139.4 60.6

Adaptivelylinearized WCL

Linearizedpath loss Yes No

Air to Air 2.08 0.74 139.6 61.6Air to Water 4.005 2.54 136.8 60.32deep tissueimplant 4.26 7.85 138.6 61.14

LLS-WCL Scattered pathloss No Yes

Air to Air 2.08 0.74 40.3 16.6Air to Water 4.005 2.54 64.46 27.26deep tissueimplant 4.26 7.85 113.8 41

AdaptivelylinearizedLLS-WCL

Linearizedpath loss Yes Yes

Air to Air 2.08 0.74 4.9 3.38Air to Water 4.005 2.54 5.58 3.7deep-tissueimplant 4.26 7.85 5.15 3.5

Table 8: Comparison of the algorithms of wireless endoscopic capsule localization.

Localizationsystem Algorithm Gathered

information MethodAverage

localizationerror (mm)

Maximumlocalizationerror (mm)

Number ofsensorsused

DimensionConsideredsamples forsimulation

Frisch et al.[24, 25] RFlocalization

Weighted sumoperation of thesignal vectors

RSSI

RSSI based distancecalculation andweighted sumoperation

37.7mm >70mm 8 2D 92

Arshak andAdepoju [26]RF localization

RSSI basedtrilateration RSSI

Adaptive linearapproximation of theRSSI based distance

calculation

25mm — 3 2D —

Ye et al. [28, 29]RF localization

RSSI basedtriangulation RSSI

RSSI based distancecalculation usingstatistical path loss

modeling

50mm — 32 3D 1000

Hou [31]RF localization

Center ofgravity

RFID ofantennas

Signal detection andcenter of gravity of

the antennas20mm 24mm 4–18 3D —

Proposed RFlocalizationsystem

WeightedCentroid

LocalizationRSSI Adaptively linearized

LLS-WCL 5.15mm 17mm 8 3D2530 (1mm

spaceresolution)

capsule endoscope inside the small intestine. A major chal-lenge in this approach is the path loss attenuation exponentsand the shadow fading effects which is caused due to thenonhomogeneous environment for radio propagation insidethe human body resulting in certain level of path loss devia-tions 𝑆 and different value of path loss attenuation exponentsfor different surroundings. The localization accuracy usingpath loss based WCL heavily depends on the path loss

attenuation exponents and the path loss deviations. As weobserved the mean localization error increases by 8-9mmfor each 1 dBm path loss deviation. In this paper, we proposean adaptive linearized method of WCL algorithm for VCElocalization which includes four steps of optimizations toimprove the localization accuracy. First we identify the pathloss attenuation exponents or path loss statistics for differentscenarios/surroundings using linear least square regression

Page 17: Research Article An Adaptive Linearized Method for ...downloads.hindawi.com/journals/ijdsn/2015/342428.pdfResearch Article An Adaptive Linearized Method for Localizing Video Endoscopic

International Journal of Distributed Sensor Networks 17

of the collected data set. Then we linearize the path lossmodel tominimize path loss deviations.Thenwe calculate theweights of the sensors using the linearized path loss and thenestimate the VCE location using adaptively linearized WCL.Finally we calibrate the location using linear least squareregression. We simulate our proposed adaptively linearizedLLS-WCL algorithm using Matlab for 2530 possible samplepositions inside the small intestine. The simulation resultsshow significant accuracy improvement in 3D localization ofthe VCE inside the small intestine with root mean squareerror of 5.15mm with standard deviation 3.5mm using only8 RF receiver sensors.

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper.

Acknowledgments

The work was conducted at the University of Saskatchewanunder the Canadian Commonwealth Scholarship Program.Umma Hany would like to thank Lutfa Akter of BangladeshUniversity of Engineering and Technology for her supportand encouragement in accepting the scholarship programand her assistance in developing prior knowledge to conductthe research work. The authors would like to acknowl-edge Natural Science and Engineering Research Council ofCanada (NSERC), Grand Chellenges Canada (GCC), andCanada Foundation for Innovation (CFI) for their support inpart to conduct this research work.The authors would like tothank Shahed KhanMohammed for his help and suggestionsin proofreading and revising the manuscript.

References

[1] D. Cave, “Wireless video capsule endoscopy,” in Proceedings ofthe 1st Invitational Workshop on Body Area Network Technologyand Applications, Worcester Polytechnic Institute, June 2011.

[2] T.D.Than,G.Alici,H. Zhou, andW. Li, “A reviewof localizationsystems for robotic endoscopic capsules,” IEEE Transactions onBiomedical Engineering, vol. 59, no. 9, pp. 2387–2399, 2012.

[3] K. Pahlavan, G. Bao, Y. Ye et al., “RF localization for wirelessvideo capsule endoscopy,” International Journal of WirelessInformation Networks, vol. 19, no. 4, pp. 326–340, 2012.

[4] C. Hu, M. Q. Meng, and M. Mandal, “Efficient magneticlocalization and orientation technique for capsule endoscopy,”in Proceedings of the IEEE/RSJ International Conference onIntelligent Robots and Systems (IROS ’05), pp. 628–633, August2005.

[5] S.Thomas, “Smartpill redefines ‘noninvasive’,”Buffalo Physician,vol. 40, pp. 13–14, 2006.

[6] J. H. D. Levy, R. Shreiber, A. Glukhovsky, and D. Fisher,“Localization of the given M2A ingestible capsule in the givendiagnostic imaging system,” Gastrointestinal Endoscopy, vol. 55,p. AB135, 2002.

[7] W. Hereman and W. S. Murphy Jr., Determination of a Positionin Three Dimensions Using Trilateration and Approximate Dis-tances, Department of Mathematical and Computer sciences,Colorado School of Mines, Golden, Colo, USA, 1995.

[8] K. Langendoen and N. Reijers, “Distributed localization inwireless sensor networks: a quantitative comparison,”ComputerNetworks, vol. 43, no. 4, pp. 499–518, 2003.

[9] L. Xiao, L. J. Greenstein, and N. B. Mandayam, “Sensor-assistedlocalization in cellular systems,” IEEE Transactions on WirelessCommunications, vol. 6, no. 12, pp. 4244–4248, 2007.

[10] N. Bulusu, J. Heidemann, and D. Estrin, “GPS-less low-costoutdoor localization for very small devices,” IEEE PersonalCommunications, vol. 7, no. 5, pp. 28–34, 2000.

[11] T. He, C. Huang, B. M. Blum, J. A. Stankovic, and T. Abdelza-her, “Range-free localization schemes for large scale sensornetworks,” in Proceedings of the 9th Annual International Con-ference on Mobile Computing and Networking (MobiCom ’03),ACM, San Diego, Calif, USA, September 2003.

[12] C. Laurendeau and M. Barbeau, “Centroid localization ofuncooperative nodes in wireless networks using a relative spanweighting method,” EURASIP Journal on Wireless Communica-tions and Networking, vol. 2010, Article ID 567040, 2010.

[13] C. Liu, K. Wu, and T. He, “Sensor localization with ringoverlapping based on comparison of received signal strengthindicator,” in Proceedings of the IEEE International Conferenceon Mobile Ad-hoc and Sensor Systems, pp. 516–518, IEEE, FortLauderdale, Fla, USA, October 2004.

[14] Y. Shang, W. Ruml, Y. Zhang, and M. P. J. Fromherz, “Local-ization from mere connectivity,” in Proceedings of the 4th ACMInternational Symposium on Mobile Ad Hoc Networking andComputing (MOBIHOC ’03), pp. 201–212, Annapolis, Md, USA,June 2003.

[15] Z. Ma, W. Chen, K. B. Letaief, and Z. Cao, “A semi range-basediterative localization algorithm for cognitive radio networks,”IEEE Transactions on Vehicular Technology, vol. 59, no. 2, pp.704–717, 2010.

[16] H. Chen,Q. Shi, R. Tan,H. Poor, andK. Sezaki, “Mobile elementassisted cooperative localization for wireless sensor networkswith obstacles,” IEEE Transactions onWireless Communications,vol. 9, no. 3, pp. 956–963, 2010.

[17] H. Chen, Y. T. Chan, H. V. Poor, and K. Sezaki, “Range-freelocalization with the radical line,” in Proceedings of the IEEEInternational Conference onCommunications, pp. 1–5,May 2010.

[18] J. Blumenthal, R. Grossmann, F. Golatowski, and D. Timmer-mann, “Weighted centroid localization in Zigbee-based sensornetworks,” in Proceedings of the IEEE International Symposiumon Intelligent Signal Processing (WISP ’07), October 2007.

[19] LAN/MAN Standards Committee of the IEEE ComputerSociety: IEEE Standard for Information Technology—Tele-communications and Information Exchange Between Sys-tems—Local and Metropolitan Area Networks—SpecificRequirements—Part 15.4: Wireless Medium Access Control(MAC) and Physical Layer (PHY) Specifications for Low- RateWireless Personal Area Networks (WPANS)—Amendment 1:Add Alternate PHYs, IEEE Standard 802.15.4a-2007, 2007.

[20] R. Behnke and D. Timmermann, “AWCL: adaptive weightedcentroid localization as an efficient improvement of coarsegrained localization,” in Proceedings of the 5th Workshop onPositioning, Navigation and Communication (WPNC ’08), pp.243–250, Hanover, Germany, March 2008.

[21] Y. Chen, Q. Pan, Y. Liang, and Z. Hu, “AWCL: adaptive weightedcentroid target localization algorithm based on RSSI in WSN,”in Proceedings of the 3rd IEEE International Conference onComputer Science and Information Technology (ICCSIT ’10), vol.9, pp. 331–336, IEEE, Chengdu, China, July 2010.

Page 18: Research Article An Adaptive Linearized Method for ...downloads.hindawi.com/journals/ijdsn/2015/342428.pdfResearch Article An Adaptive Linearized Method for Localizing Video Endoscopic

18 International Journal of Distributed Sensor Networks

[22] S. Schuhmann, K. Herrmann, K. Rothermel, J. Blumenthal, andD. Timmermann, “Improved weighted centroid localizationin smart ubiquitous environments,” in Ubiquitous Intelligenceand Computing: Proceedings of the 5th International Conference(UIC), vol. 5061 of Lecture Notes in Computer Science, pp. 20–34,Springer, Berlin, Germany, 2008.

[23] M. Orooji and B. Abolhassani, “New method for estimation ofmobile location based on signal attenuation and hatamodel sig-nal prediction,” in Proceedings of the 27th Annual InternationalConference of the Engineering in Medicine and Biology Society,pp. 6025–6028, September 2005.

[24] M. Frisch, A. Glukhovsky, and D. Levy, “Array system andmethod for locating an in vivo signal source,” US Patent no.2002/0173718, 2002.

[25] D. Fischer, R. Schreiber, D. Levi, and R. Eliakim, “Capsuleendoscopy: the localization system,” Gastrointestinal EndoscopyClinics of North America, vol. 14, no. 1, pp. 25–31, 2004.

[26] K. Arshak and F. Adepoju, “Adaptive linearized methods fortracking amoving telemetry capsule,” in Proceedings of the IEEEInternational Symposium on Industrial Electronics (ISIE ’07), pp.2703–2708, June 2007.

[27] K. Sayrafian-Pour, W.-B. Yang, J. Hagedorn, J. Terrill, and K. Y.Yazdandoost, “A statistical path loss model for medical implantcommunication channels,” in Proceedings of the IEEE 20thPersonal, Indoor andMobile Radio Communications Symposium(PIMRC ’09), pp. 2995–2999, September 2009.

[28] Y. Ye, U. Khan, N. Alsindi, R. Fu, and K. Pahlavan, “On theaccuracy of RF positioning in multi-capsule endoscopy,” inProceedings of the 22nd Annual IEEE International Symposiumon Personal, Indoor andMobile Radio Communications (PIMRC’11), pp. 2173–2177, Toronto, Canada, September 2011.

[29] Y. Ye, P. Swar, K. Pahlavan, and K. Ghaboosi, “Accuracy ofRSS-based RF localization in multi-capsule endoscopy,” Inter-national Journal of Wireless Information Networks, vol. 19, no. 3,pp. 229–238, 2012.

[30] Y. Wang, R. Fu, Y. Ye, U. Khan, and K. Pahlavan, “Performancebounds for RF positioning of endoscopy camera capsules,” inProceedings of the IEEE Topical Conference on Biomedical Wire-less Technologies, Networks, and Sensing Systems (BioWireleSS’11), pp. 71–74, Phoenix, Ariz, USA, January 2011.

[31] J. Hou, Y. Zhu, L. Zhang et al., “Design and implementationof a high resolution localization system for in-vivo capsuleendoscopy,” in Proceedings of the 8th IEEE International Sympo-sium on Dependable, Autonomic and Secure Computing (DASC’09), pp. 209–214, December 2009.

[32] S. Jackson, Anatomy & Physiology for Nurses, Nurses'AidsSeries, Bailliere Tindall, London, UK, 9th edition, 1985.

[33] A. C. Guyton, Textbook of Medical Physiology, W.B. Saunders,Philadelphia, Pa, USA, 5th edition, 1976.

[34] A. C. Guyton and J. E. Hall,Textbook ofMedical Physiology,W.B.Saunders, Philadelphia, Pa, USA, 8th edition, 1991.

Page 19: Research Article An Adaptive Linearized Method for ...downloads.hindawi.com/journals/ijdsn/2015/342428.pdfResearch Article An Adaptive Linearized Method for Localizing Video Endoscopic

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Hindawi Publishing Corporation http://www.hindawi.com

Journal ofEngineeringVolume 2014

Submit your manuscripts athttp://www.hindawi.com

VLSI Design

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation http://www.hindawi.com

Volume 2014

The Scientific World JournalHindawi Publishing Corporation http://www.hindawi.com Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Modelling & Simulation in EngineeringHindawi Publishing Corporation http://www.hindawi.com Volume 2014

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

DistributedSensor Networks

International Journal of