IEEE TRANSACTIONS ON INDUSTRIAL ELECTRONICS, VOL. 58, NO. 3, MARCH 2011 741Optimizing the Localization of a WirelessSensor...
742 IEEE TRANSACTIONS ON INDUSTRIAL ELECTRONICS, VOL. 58, NO. 3, MARCH 2011ends at position B to deploy the sensor nodes. ...
GUO et al.: OPTIMIZING THE LOCALIZATION OF A WIRELESS SENSOR NETWORK IN REAL TIME 743localized node j, the likelihood func...
746 IEEE TRANSACTIONS ON INDUSTRIAL ELECTRONICS, VOL. 58, NO. 3, MARCH 2011Fig. 5. Average localization error under differ...
748 IEEE TRANSACTIONS ON INDUSTRIAL ELECTRONICS, VOL. 58, NO. 3, MARCH 2011Fig. 8. Experimental results (bidirection metho...
Upcoming SlideShare
Loading in...5

Optimizing the localization of a wireless sensor network in real time based on a low cost microcontroller


Published on

For more projects visit @

Published in: Technology, Business
  • Be the first to comment

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Optimizing the localization of a wireless sensor network in real time based on a low cost microcontroller

  1. 1. IEEE TRANSACTIONS ON INDUSTRIAL ELECTRONICS, VOL. 58, NO. 3, MARCH 2011 741Optimizing the Localization of a WirelessSensor Network in Real Time Based on aLow-Cost MicrocontrollerHao Guo, Kay-Soon Low, Senior Member, IEEE, and Hong-Anh NguyenAbstract—In this paper, a low-cost microcontroller-based sys-tem that uses the pedometer measurement and communicationranging between neighboring nodes of a wireless sensor networkfor localization is presented. Unlike most of the existing meth-ods that require good network connectivity, the proposed systemworks well in a sparse network. As the localization requires solvingof nonlinear equations in real time, two optimization approaches,namely, the Gauss–Newton algorithm and the particle swarmoptimization have been studied. The localization and optimizationalgorithms have been implemented with a microcontroller. Theperformance has been evaluated with experimental results.Index Terms—Microcontrollers, particle swarm optimization(PSO), wireless sensor network (WSN).I. INTRODUCTIONWIRELESS SENSOR NETWORK (WSN) is a systemthat comprises a large number of wirelessly connectedheterogeneous sensor nodes that are spatially distributed acrossan area of interest. Due to their potential application in variousfields, WSN has attracted many research interests in recentyears. It has been used in applications such as environmentaland natural habitat monitoring, medical instrumentation, indus-trial automation, and military surveillance [1], [2]. Typically,the sensor nodes should be inexpensive and physically small forlarge-scale deployment. Furthermore, the power consumptionof the sensor node is required to be small to prolong theoperational life span for several years.Recent advancements in microelectronics have resulted inversatile microcontrollers that have been used in a wide rangeof applications such as motor drive, light dimmer control,uninterruptible power system, and power source [3]–[9]. ForWSN, most of the WSN platforms use a microcontroller asthe central controller to perform multiple tasks such as readingof various sensors’ information, performing network protocol,processing of signals, managing the power consumption, etc.One of the key challenges of WSN is to determine thesensor nodes physical locations. This can be achieved byequipping Global Positioning System (GPS) to all the sensornodes. However, such approach is costly, consumes high power,Manuscript received May 30, 2008; revised January 27, 2009; acceptedApril 6, 2009. Date of publication May 15, 2009; date of current versionFebruary 11, 2011.The authors are with the School of Electrical and Electronic Engineer-ing, Nanyang Technological University, Singapore 639798, Singapore ( versions of one or more of the figures in this paper are available onlineat Object Identifier 10.1109/TIE.2009.2022073Fig. 1. Experimental results (single-direction method) (x—pedometer,•—real position, —GNA).and is limited for outdoor application. A number of GPS-lesslocalization systems have been investigated for dense networks[10]–[15]. In general, they can be classified as range-free andrange-based algorithms. Range-free algorithms [10], [11] as-sume the distance or angle information is unavailable, and theyuse the network connectivity to proximate the node locations.Range-based algorithms [11]–[15] require distance measure-ments from the anchor nodes, and they use triangulation ormaximal likelihood estimation techniques to find the locationsof unknown nodes. Maximum likelihood estimation is preferredin most range-based algorithms as the result is more accurate atthe expense of higher computational requirement and memoryusage. Most of the existing works focus on the theoreticaldevelopment and give less attention on the computation costand the implementation aspect. In practice, there is high con-straint on computation power and memory. Consequently, manysophisticated optimization approaches will not be feasible.In this paper, real time Gauss–Newton algorithm (GNA)and the particle swarm optimization (PSO) based on the prob-ability field approach [16] for sensor nodes localization arepresented. For the system under consideration, a deploymentagent (DA) such as a walking person or an unmanned aerialvehicle equipped with a position sensor is tasked to deploythe sensor nodes. Consider the perimeter deployment as shownin Fig. 1 for a sparse network. In this case, a DA movesfrom a starting position A around an area of interests and0278-0046/$26.00 © 2009 IEEE
  2. 2. 742 IEEE TRANSACTIONS ON INDUSTRIAL ELECTRONICS, VOL. 58, NO. 3, MARCH 2011ends at position B to deploy the sensor nodes. For ease ofexperiment, the DA in this paper is a walking person equippedwith a pedometer and electronic compass. The system tracksthe agent’s movement during the deployment. Subsequent tothe deployment, the sensor nodes exchange beacon packages toinfer the ranges between the nodes based on the received powerstrength of the RF signals. By utilizing both the deploymentand communication ranging information with the proposedapproach, better localization can be achieved.To determine the optimum location of the sensor nodes,Section II shows that it is required to solve a nonlinear equationto find the best result. One possible approach to solve theproblem is the GNA. However, the GNA is a local optimizationmethod, and it does not guarantee global convergence. Analternative approach is to use a global optimizer such as thePSO. In this paper, both GNA and PSO have been studiedand implemented using the same platform. Moreover, theireffectiveness in searching the optimal solutions under differentoperating conditions has been investigated. Experimental re-sults show that the GNA is more effective if the pedometer erroris smaller than 25%. However, it is noted that the PSO is morerobust for large pedometer error while the GNA may convergeto local minimum. Furthermore, the GNA also involves matrixinversion during its iteration and may become unstable occa-sionally. Thus, GNA is a feasible optimizer for this applicationonly if the equipped pedometer has good accuracy. Otherwise,the PSO is preferred.The organization of this paper is as follows: Section IIpresents problem formulation using the proposed probability-based function and the error modeling. The sensor node archi-tecture and the implementation of GNA and PSO approachesfor the localization are presented in Section III. Section IVpresents the evaluation of the system conducted in the labora-tory, and Section V describes the experimental system as wellas some outdoor experimental results. Section VI concludes thispaper.II. PROBABILITY-BASED LOCALIZATION APPROACHThis section presents a localization approach that combinesthe data from received signal strength indicator (RSSI) anddeployment information. As mentioned in the introduction,the agent deploys the first sensor node starting from a knownlocation A, as shown in Fig. 1. Once being deployed, the sensornodes’ locations are first determined via the pedometer andcompass navigation system. Subsequently, the sensor nodescommunicate with their neighboring nodes to exchange theirRF signal strength that could be received. To improve the lo-calization accuracy, a probability-based localization algorithmis formulated in this paper that uses both the deploymentmeasurements and the neighboring nodes RSSI-based distanceestimation to construct the unknown node’s likelihood functionof the exact position. As more information from two indepen-dent sources is utilized, it is possible to achieve better resultsthrough data fusion of the information.The proposed approach has two localization modes, namely,single-direction and bidirection mode. In single-directionmode, each unknown node only utilizes RSSI measurementsfrom sensors deployed previously. Bidirection mode assumesthat the position of the last sensor node is also known. More-over, the network can communicate both forward and backwarddirection. The rest of this section shows the procedures to con-struct the likelihood function and formulate the optimization foran unknown node.A. Problem FormulationConsider a sensor node i that has been deployed with theestimated position Φdi, its exact position Φi is considerednearby to Φdi with a certain likelihood. By probability theory,the likelihood function of the real position Φi is the conditionalprobability density function of Φdi with the real position Φi.We term this likelihood function as the deployment probabilityfunction for the unknown node iLdi(Φi) = L(Φi; Φdi) = P(Φdi | Φi) (1)where the subscript “d” denotes deployment measurement and“i” denotes the node’s index.As Φdi is bivariate normal distributed with the real positionΦi as mean, the deployment probability function is obtained asLdi(Φi) = Ldi(xi, yi)=12πσxσyexp −12(xi − xdi)2σ2x+(yi − ydi)2σ2y(2)where the standard deviations σx and σy are approximated asσx = xm · p, σy = ym · p with xm, ym being the measureddistant vector that can be obtained from the walking distanceand the heading. Here, it is assumed that the error factor ofthe pedometer and the compass after projection on x- and y-coordinates is p.If the sensor node i can receive the beacon packet of alocalized node j, the distance dij between the two nodes canbe estimated through the RSSI measurement as dmij. However,this is, in general, a noisy measurement. With the knowledge ofj’s estimated position ˆΦj and the estimated distance dmij, thelikelihood function of the real position Φi can be approximated.We term this function as radio ranging likelihood functionLrij(Φi) = P(dmij | Φi, ˆΦj) (3)where the subscripts “r” denotes “radio ranging” and “j”denotes the localized node’s index.The RSSI measured distance dm is typically assumedGaussian distributed [11], [13]–[15]: dm ∼ N(d, (d · r)2),where r is termed the range error factor. With a given dmand r, the actual distance d’s likelihood function isP(dm | d) =1√2πd · rexp −(d − dm)22(d · r)2. (4)Let δ(A, B) = (xA − xB)2 + (yA − yB)2 be the distancebetween locations A and B. For an unknown node i and a
  3. 3. GUO et al.: OPTIMIZING THE LOCALIZATION OF A WIRELESS SENSOR NETWORK IN REAL TIME 743localized node j, the likelihood function of Φi isP(dmij | Φi, ˆΦj)=P dmij | δ(Φi, ˆΦj)=1√2π(dmijr)exp⎛⎝−δ(Φi, ˆΦj)−dmij22(dmijr)2⎞⎠.(5)Let Ji represents all the communicated localized nodes. Asthe deployment and RSSI ranging measurements are indepen-dent on each other, the overall likelihood function is obtained bymultiplying all the likelihood functions for the unknown node i.Thus, combining (2) and (5), we haveLi(Φi) = Ldi(Φi) ×j∈JiLrij(Φi)=12πσxσyexp −12(xi − xdi)2σ2x+(yi − ydi)2σ2y×j∈Ji1√2π(dmij · r)× exp⎛⎜⎝−δ(Φi, ˆΦj) − dmij22(dmij · r)2⎞⎟⎠⎞⎟⎠. (6)Taking natural logarithm of (6) yieldsln Li(Φi) = α − S(Φi) (7)where α = − ln(2πσxσy) − j∈Jiln√2π ˆdijr is a constantand the function S is defined asS(Φi)=(xi −xdi)2σ2x+(yi −ydi)2σ2y+j∈Jiδ(Φi, ˆΦj) − dmij2(dmij · r)2.(8)To find the position Φi that maximizes Li(Φi), the functionS must be minimized. Therefore, the localization problembecomes an optimization problem.B. DiscussionsThe objective function (8) is generally multimodal, whenthe measurement (pedometer and RSSI ranging) error is large.For local optimization algorithm such as GNA, it requires thatthe initial guess is close enough to the global minimum forthe global convergence. In this application, the pedometer-deployed position is used as the initial guess. Therefore, a moreaccurate pedometer measurement will lead to a closer initialguess to the global minimum. When the pedometer error factoris small (p < 0.25 from evaluation studies), GNA generallyconverges to the global minimum and GNA is selected as theoptimizer for its simplicity. However, when the pedometer erroris large (p > 0.25), GNA may converge to a local minimum asthe initial guess is too far from the optimal point. In such case,global optimization approach is necessary and PSO is selected.Detailed performance studies of optimization approaches arepresented in Section IV.Fig. 2. Block diagram of a sensor node.III. SENSOR NODE ARCHITECTURE AND IMPLEMENTATIONFig. 2 shows the block diagram of the sensor node architec-ture developed in this application. It has five major components,namely, the RF system, RSSI to distance translator, GNA/PSOoptimizer, transmission scheduler, and data memory.As mentioned in Section II, after the first sensor node is de-ployed with a known location, it starts to transmit its location toothers. For each subsequent unknown node i being deployed, itreceives its deployment information Φdi through its RF systemfrom the pedometer/compass system. Then, its transmissionscheduler will request its neighboring nodes to send their bea-con messages that contain their estimated positions. Aside fromreceiving the beacon message, the RSSI to distance translatoralso measures the RSSI values of the received beacons andtranslates them to a distance ˆDi. The GNA/PSO optimizer willthen determine the sensor node’s estimated position ˆΦi, bycombing the deployment and internode distances informationusing (8). The transmission scheduler responses to other nodes’requests and sends the sensor node’s beacon package.A. RF SystemThe RF system is used to receive beacon packages from theneighboring sensor nodes, and stride/heading information fromthe pedometer, as well as to transmit its beacon packages.B. Transmission SchedulerThe Transmission Scheduler implements the media accesscontrol protocol to avoid data collisions. For ease of experi-ment, a simple polling process is used. After a sensor nodehas been deployed and received its pedometer information, itwill begin to poll its nearby sensor nodes to send its beaconpackages. After the sensor has been successfully localized, itwill switch to the listening mode, and wait for polling fromother nodes.C. RSSI to Distance TranslatorThe RSSI to distance translator implements a functionRtoD( ) that contains the following equation:ˆdj = 10R0−Rj2n (9)
  4. 4. 744 IEEE TRANSACTIONS ON INDUSTRIAL ELECTRONICS, VOL. 58, NO. 3, MARCH 2011TABLE IPSEUDOCODE OF RSSI TO DISTANCE TRANSLATORwhere Rj is the received RSSI value; ˆdj is the mapped distance;Ro is the received RSSI value for 1m distance andn is the path-loss exponent. Ro and n are calibrated values obtained beforethe deployment.In general, the RSSI measurements are often subjected toburst interferences from various noises. To improve the estima-tion, the average RSSI measurements of ten beacons are usedto infer distance. Table I shows the pseudocode of RSSI toDistance Translator.D. GNA/PSO Optimizer1) GNA: The GNA is well known for solving nonlinearleast square estimation problems [17], [18]. It is an iterativealgorithm and requires the user to provide an initial guess of itssolution. Given m functions fi (i = 1, . . . , m) of n variablesβ = (β1, β2, . . . , βn), with m ≥ n, the GNA can be used to findthe minimum of the sum of squaresS(β) =mi=1f2i (β). (10)Starting with an initial guess β[0], the method proceeds bythe iterationsβ[k + 1] = β[k] + Δk (11)with the increment Δk satisfying the normal equationJTf Jf Δk = −JTf f (12)where f is the vector of functions fi, and Jf is the Jacobinmatrix of f with respect to β[k].For the localization problem, the estimated deployment po-sition Φdi is used as the initial guess. Table II shows theTABLE IIPSEUDOCODE OF GNApseudocode of the GNA, with a simple line-search procedure.From the pseudocode, it is observed that the algorithm in-volves matrix inversion in Step 3. The iteration will fail if thematrix JTf Jf is singular. Theoretically, this matrix will neverbe singular in this localization problem. However, the matrixcould be nearly singular due to the limited precision of themicrocontroller, and occasionally may not converge to meetthe stopping criterion. This issue will be discussed in the latersection.2) PSO: In this paper, the PSO reported in [19] for search-ing the sensor node positions is used for the global optimiza-tion. Table III shows the pseudocode that has been used forthe implementation. PSO has been used in various applicationssuch as robotics, antenna design [20]–[25], etc. Similar to otherheuristic algorithms such as the genetic algorithm [26], [27],the PSO is initialized with a population of random solutions,also called particles. Each particle keeps track of its best fitnesssolution (also known as pbest). Moreover, the global best fitnesssolution (also known as gbest) is also stored in the optimizer.In each time step, the PSO optimizer changes the velocitythat the particle will move toward its pbest and gbest witha random weight. In this investigation, each particle consists
  5. 5. GUO et al.: OPTIMIZING THE LOCALIZATION OF A WIRELESS SENSOR NETWORK IN REAL TIME 745TABLE IIIPSEUDOCODE OF PSOof two members, representing the x- and y-coordinates of thesensor node.IV. SYSTEM EVALUATIONThe proposed GNA and the PSO algorithms have been imple-mented on a microcontroller (Microchip PIC18LF4620). Themicrocontroller has 64-kB Flash program memory and 3968-BSRAM data memory. It runs at a clock rate of 40 MHz. For easeof development, both algorithms have been coded in C languageusing floating point format. The C programs are then compiledusing the Microchip MPLAB C18 compiler and downloadto the Flash memory through the MPLAB ICD2 debugger.The codes for transmission scheduler and RSSI to distancetranslator together occupy about 4-kB program memory. Forthe GNA and PSO optimizers, the code requires about 8- and12-kB memory, respectively.In the following discussion, we evaluate the performance ofthe two optimization approaches under laboratory environment.Here, both the transmission scheduler and RSSI to distancetranslator are bypassed. The necessary information such aspedometer and RSSI distance measurements are randomly gen-erated from their expected distributions.The network to be tested is assumed to be a sparse network,as shown in Fig. 3. It consists of 31 nodes being placed ran-domly along the path. Fig. 3 shows an example of the localizednetwork using single-direction method with GNA, and Fig. 4Fig. 3. System evaluation of a sparse network with single-direction approach.Fig. 4. System evaluation of a sparse network with bidirection approach.shows the localized result using bidirection method with GNA.The localization result with PSO is almost identical to the GNAand is not shown for brevity. From this paper, the differencebetween the estimated positions with these two optimizationalgorithms for each node is typically less than 0.1 units. Inthis example, a 0.2 pedometer and 0.15 range error factorshave been used. The communication range is assumed to be60 units.Fig. 5 shows the localization error under different rangeand pedometer error factors for both single- and bidirectionmethods, with GNA as the optimization algorithm. Again, thelocalization results with the PSO are very similar to the GNA.The difference for each data point is less than 0.1 unit ifp < 0.3 and is not shown for brevity. In summary, both GNAand PSO are able to search the same optimum with the samemeasurements. The slight differences are due to termination atdifferent positions when stopping criterion is met, as the twoalgorithms may converge from different directions.
  6. 6. 746 IEEE TRANSACTIONS ON INDUSTRIAL ELECTRONICS, VOL. 58, NO. 3, MARCH 2011Fig. 5. Average localization error under different measurement accuracy.Fig. 6. Average localization error with p = 0.35.However, with very large pedometer error (p > 0.3), thereis some disparity between the localization results of these twoapproaches, as shown in Fig. 6. Generally, PSO has betterlocalization result. This is because GNA sometimes convergesto local minima due its poor initial guesses.A. Evaluation of Computational CostsFor computational costs, GNA generally requires less execu-tion time than PSO. From our investigation, it is also observedthat the GNA spends most of the execution time to compute thesecond derivative of the objective function. Only about 15% ofthe execution time is used for objective function evaluations.With a communication range of 60 units, each sensor node has2.5 neighboring nodes in average for single-direction methodand 5 neighboring nodes for bidirection method.Table IV compares the average execution time needed by thetwo algorithms to localize a single node for different networkdensity. Here, the pedometer error factor is 0.2. From Table IV,it is observed that the PSO requires twice the computation time.TABLE IVAVERAGE EXECUTION TIME TO LOCALIZE SINGLE NODE VERSUSDIFFERENT NUMBER OF NEIGHBORSTABLE VAVERAGE EXECUTION TIME TO LOCALIZE SINGLE NODE VERSUSDIFFERENT PEDOMETER ERROR FACTORThus, local optimization method such as GNA is preferred forsmall pedometer error. From the table, it is also observed thatboth the algorithms need more computation time as the numberof neighboring nodes increases.Table V shows how the pedometer accuracy affects thecomputation requirement for GNA. Here, each sensor node hasan average of 2.5 neighbors. As the pedometer error factorbecomes larger, the GNA requires more execution time toachieve the required accuracy. This is because the initial guesswill be far from the optimal position. On the other hand, thePSO execution time is almost constant. This makes the PSOattractive for system that has large pedometer error factor.To show the performance trend, Fig. 7 shows the averageobjective function values versus the number of iterations orgenerations for these two algorithms. From the figure, it isobserved that the GNA has faster convergent rate. This resultis expected as the GNA starts from a position closer to theminimum, and it determines the descending direction directlyby taking the second derivative of the objective function. On theother hand, the PSO selects a better estimate through comparingthe objective function values. Therefore, the GNA generallyrequires less iteration to converge to a minimum. However, the
  7. 7. GUO et al.: OPTIMIZING THE LOCALIZATION OF A WIRELESS SENSOR NETWORK IN REAL TIME 747Fig. 7. Average objective function value versus number of iterations/generations.GNA may converge to a local minimum if the starting point istoo far from the optimal point.B. Stability Assessment of GNAGNA involves matrix inversion during its iteration. The iter-ation will fail if the matrix JTf Jf is singular. The determinantof the matrix can be obtained as in (13), shown at the bottom ofthe page.In (13), the first two terms are always positive. The third termis zero when the current position estimation and the estimatedpositions of its neighboring nodes are collinear. Thus, JTf Jfis nonsingular, in general, but it could be near singular dueto finite word length when the algorithm is implemented in amicrocontroller. Thus, it may not converge to a unique positionoccasionally. This happens when the pedometer error factor islarge that makes the first two terms of (13) close to zero, andthe neighboring nodes are happen to be collinear.Table VI shows that when the pedometer error factor islarger than 0.25 and also larger than the range error factor, thealgorithm may become unstable. In this testing, the estimatedpositions of neighboring nodes and the initial guess positionare set to be collinear.In summary, it is noticed that both GNA and PSO have theiradvantages. When the accuracy of pedometer is high, localoptimization is sufficient, and these two methods have verysimilar localization result. In this case, GNA is preferred asTABLE VIPROBABILITY OF GNA BEING UNSTABLE (IN PERCENT)it requires less computation and execution time. On the otherhand, the PSO is robust as it always gives unique positionestimation. The GNA involves a matrix inversion during itsiteration. Consequently, the optimum result will not be feasiblewhen the matrix becomes singular or near singular due to theprecision of the microcontroller. Although additional methodscan be used to avoid the singular matrix for the GNA, thismay significantly affect the convergent rate. Moreover, for largepedometer error, GNA may converge to local minima and yieldlarger localization error than PSO. For systems that have largepedometer error factor, PSO shall be used for its robustness.Otherwise, GNA would be a better choice for its simplicity andlow computational costs.V. OUTDOOR EXPERIMENTThe experimental measurement has been conducted surrounda lake and a park located in the University campus. The networkconsists of 31 sensor nodes. Each sensor node is equippedwith an XBee ZNet 2.5 OEM RF module, which is able tomeasure the RSSI. Before the deployment, calibration has beenconducted to determine the parameters used in the path-lossequation by measuring the RSSI with respect to referencedistance. From the calibration, the range error factor r = 0.21.For the pedometer, it consists of a three-axes accelerometer-based stride counter and an electronic compass. Predeploymentmeasurement shows that the pedometer error factor p = 0.22.The experimental results are shown in Figs. 1 and 8. In thefigures, the real position of the sensor nodes, the estimatedJTf Jf =1σ2x1σ2yfirst term+1σ2x⎛⎜⎝j∈Ji(yi − ˆyj)2ˆdij · r · δ(Φi, ˆΦj)2⎞⎟⎠ +1σ2y⎛⎜⎝j∈Ji(xi − ˆxj)2ˆdij · r · δ(Φi, ˆΦj)2⎞⎟⎠second term+⎛⎜⎝j∈Ji(xi − ˆxj)2ˆdij · r · δ(Φi, ˆΦj)2⎞⎟⎠⎛⎜⎝j∈Ji(yi − ˆyj)2ˆdij · r · δ(Φi, ˆΦj)2⎞⎟⎠ −⎛⎜⎝j∈Ji(xi − ˆxj)(yi − ˆyj)ˆdij · r · δ(Φi, ˆΦj)2⎞⎟⎠2third term(13)
  8. 8. 748 IEEE TRANSACTIONS ON INDUSTRIAL ELECTRONICS, VOL. 58, NO. 3, MARCH 2011Fig. 8. Experimental results (bidirection method) (x—pedometer, •—realposition, —GNA).Fig. 9. Experiment error at every node (x—pedometer, ◦—single-direction,—bidirection).positions from the pedometer as well as the single and bidirec-tion localization approaches have been marked on the satelliteimage map. Fig. 9 shows the errors of the localization processat every node along the deployment path. From the figure, itcan be determined that the average errors from single and bidi-rection mode are 16.43 and 9.51 m, respectively. The averageerror from using the pedometer only (without using RSSI) is19.5745 m. Thus, the error has been reduced from single-direction to bidirection approach. The good performance of thebidirection approach is expected as it has more RSSI valuesavailable for processing than the single-direction approach.Both Figs. 8 and 9 show the results using the GNA only. Theresults obtained from using the PSO are very close to the GNAand is not shown for brevity. Table VII shows the performanceof the two methods. From the table, it is observed that thelocalization results of PSO and GNA are only slightly different.This is consistent with the earlier findings, i.e., both methodsare able to find the same optimum value with the same givenTABLE VIIPSO VERSUS GNAmeasurements. Moreover, it is observed that the GNA requiresabout half the execution time of the PSO.VI. CONCLUSIONIn this paper, a microcontroller has been used to implementtwo optimization approaches, namely, the GNA and the PSOapproach for optimizing the sensor node localization in a WSN.The performance of the proposed approaches has been evalu-ated and validated with experimental results. The results haveshown that they both have similar performance with improvedaccuracy. Moreover, the GNA requires less computation andexecution time than the PSO particularly when the accuracyof pedometer is high. However, for large pedometer error, theGNA may converge to local minimum. In such cases, the PSOis preferred for its robustness as it always gives unique positionestimation. Another alternative approach could be a MemeticAlgorithm that hybridizes PSO and GNA. In this case, thealgorithm employs a PSO framework and uses a GNA as a localsearcher.REFERENCES[1] I. F. Akyildiz, W. Su, Y. Sankarasubramaniam, and E. Cayirci, “Wirelesssensor networks: A survey,” Comput. Netw., vol. 38, no. 4, pp. 393–422,Mar. 2002.[2] K. S. Low, W. N. N. Win, and M. J. Er, “Wireless sensor networksfor industrial environments,” in Proc. Int. Conf. Comput. Intell. Model.,Control Autom., 2005, pp. 271–276.[3] C. A. Hudson, N. S. Lobo, and R. Krishnan, “Sensorless control of sin-gle switch-based switched reluctance motor drive using neural network,”IEEE Trans. Ind. Electron., vol. 55, no. 1, pp. 321–329, Jan. 2008.[4] E. Mininno, F. Cupertino, and D. Naso, “Real-valued compact genetic al-gorithms for embedded microcontroller optimization,” IEEE Trans. Evol.Comput., vol. 12, no. 2, pp. 203–219, Apr. 2008.[5] C.-S. Wang, “Flicker-insensitive light dimmer for incandescent lamps,”IEEE Trans. Ind. Electron., vol. 55, no. 2, pp. 767–772, Feb. 2008.[6] S. Saponara, L. Fanucci, and P. Terreni, “Architectural-level power op-timization of microcontroller cores in embedded systems,” IEEE Trans.Ind. Electron., vol. 54, no. 1, pp. 680–683, Feb. 2007.[7] F. Botteron and H. Pinheiro, “A three-phase UPS that complies withthe standard IEC 62040-3,” IEEE Trans. Ind. Electron., vol. 54, no. 4,pp. 2120–2136, Aug. 2007.[8] Z. Jiang and R. A. Dougal, “A compact digitally controlled fuelcell/battery hybrid power source,” IEEE Trans. Ind. Electron., vol. 53,no. 4, pp. 1094–1104, Jun. 2006.[9] A. Caponio, G. L. Cascella, F. Neri, N. Salvatore, and M. Sumner, “Afast adaptive memetic algorithm for off-line and on-line control designof PMSM drives,” IEEE Trans. Syst., Man, Cybern. B, Cybern.—SpecialIssue Memetic Algorithms, vol. 37, no. 1, pp. 28–41, Feb. 2007.[10] N. Bulusu, J. Heidemann, and D. Estrin, “GPS-less low-cost outdoorlocalization for very small devices,” IEEE Pers. Commun., vol. 7, no. 5,pp. 28–34, Oct. 2000.[11] D. Niculescu and B. Nath, “DV based positioning in ad hoc networks,”J. Telecommun. Syst., vol. 22, no. 1–4, pp. 267–280, Jan. 2003.
  9. 9. GUO et al.: OPTIMIZING THE LOCALIZATION OF A WIRELESS SENSOR NETWORK IN REAL TIME 749[12] D. Niculescu and B. Nath, “Ad hoc positioning system (APS) usingAOA,” in Proc. IEEE Comput. Commun. Soc., 2003, pp. 1734–1743.[13] C. Savarese, J. Rabaey, and K. Langendoen, “Robust positioning algo-rithm for distributed ad-hoc wireless sensor networks,” in Proc. USENIXTech. Annu. Conf., Monterey, CA, 2002, pp. 317–328.[14] Y. Shang, W. Ruml, Y. Zhang, and M. P. J. Fromherz, “Localization frommere connectivity,” in Proc. 4th ACM Int. Symp. Mobile Ad Hoc Netw.Comput., Annapolis, MD, 2003, pp. 201–212.[15] M. L. Sichitiu and V. Ramadurai, “Localization of wireless sensor net-works with a mobile beacon,” in Proc. Int. Conf. Mobile Ad-Hoc SensorSyst., 2004, pp. 174–183.[16] H. Guo, K. S. Low, and M. J. Er, “Localization in a sparse wireless sensornetwork using pedometer and communication ranging measurements,” inProc. IECON, 2007, pp. 2627–2632.[17] S. Y. Xue and S. X. Yang, “Power system frequency estimationusing supervised Gauss–Newton algorithm,” in Proc. ISIC, 2007,pp. 3761–3766.[18] J. De Zaeytijd, A. Franchois, C. Eyraud, and J.-M. Geffrin, “Full-wavethree-dimensional microwave imaging with a regularized Gauss–Newtonmethod—Theory and experiment,” IEEE Trans. Antennas Propag.,vol. 55, no. 11, pp. 3279–3292, Nov. 2007.[19] K. S. Low, H. A. Nguyen, and H. Guo, “A particle swarm optimizationapproach for the localization of a wireless sensor network,” in Proc. IEEEInt. Symp. Ind. Electron., Jul. 2008, pp. 1820–1825.[20] A. Chatterjee, K. Pulasinghe, K. Watanabe, and K. Izumi, “A particle-swarm-optimized fuzzy-neural network for voice-controlled robot sys-tems,” IEEE Trans. Ind. Electron., vol. 52, no. 6, pp. 1478–1489,Dec. 2005.[21] L. Dos Santos Coelho and B. M. Herrera, “Fuzzy identification based on achaotic particle swarm optimization approach applied to a nonlinear yo-yomotion system,” IEEE Trans. Ind. Electron., vol. 54, no. 6, pp. 3234–3245,Dec. 2007.[22] Y. Song, Z. Chen, and Z. Yuan, “New chaotic PSO-based neural net-work predictive control for nonlinear process,” IEEE Trans. Neural Netw.,vol. 18, no. 2, pp. 595–601, Mar. 2007.[23] T. Huang and A. S. Mohan, “A microparticle swarm optimizer for thereconstruction of microwave images,” IEEE Trans. Antennas Propag.,vol. 55, no. 3, pp. 568–576, Mar. 2007.[24] N. Jin and Y. Rahmat-Samii, “Advances in particle swarm optimization forantenna designs: Real-number, binary, single-objective and multiobjectiveimplementations,” IEEE Trans. Antennas Propag., vol. 55, no. 3, pp. 556–567, Mar. 2007.[25] L. Lizzi, F. Viani, R. Azaro, and A. Massa, “Optimization of a spline-shaped UWB antenna by PSO,” IEEE Antennas Wireless Propag. Lett.,vol. 6, pp. 182–185, Mar. 2007.[26] F.-J. Lin, P.-K. Huang, and W.-D. Chou, “Recurrent-fuzzy-neural-network-controlled linear induction motor servo drive using genetic al-gorithms,” IEEE Trans. Ind. Electron., vol. 54, no. 3, pp. 1449–1461,Jun. 2007.[27] K.-S. Low and T.-S. Wong, “A multiobjective genetic algorithm for opti-mizing the performance of hard disk drive motion control system,” IEEETrans. Ind. Electron., vol. 54, no. 3, pp. 1716–1725, Jun. 2007.Hao Guo received the B.Eng. degree in electricaland electronic engineering from the School of Elec-trical and Electronic Engineering, Nanyang Techno-logical University, Singapore, Singapore, in 2005,where he is currently working toward the research interests are wireless sensor networkand optimization technique.Kay-Soon Low (M’88–SM’00) received the in electrical engineering from the NationalUniversity of Singapore, Singapore, Singapore, andthe Ph.D. degree in electrical engineering from theUniversity of New South Wales, Sydney, Australia.Since 1994, he has been with the School of Elec-trical and Electronic Engineering, Nanyang Techno-logical University, Singapore, Singapore, where hewas first a Lecturer and where he is currently anAssociate Professor.Dr. Low has served as consultant to many com-panies and has a number of granted patents on nonlinear circuits and ultra-wideband (UWB) systems. His funded projects are in the field of UWB medicalimaging, wireless sensor network, motion control system, pulse neural network,and microsatellite system. Currently, he is the Center Director of the SatelliteEngineering Centre, Nanyang Technological University.Hong-Anh Nguyen received the B.Eng. degree inelectrical and electronic engineering from the Schoolof Electrical and Electronic Engineering, NanyangTechnological University, Singapore, Singapore, in2006, where she is currently working toward theM.Eng. degree.Since then, she has been with the Intelligent Sys-tem Centre, Nanyang Technological University, as aResearch Officer. Her research interests are wirelesssensor network, optimization techniques, and em-bedded system.