=Paper= {{Paper |id=Vol-1867/w12 |storemode=property |title=An Optimization-Based Algorithm for Indoor Localization of JADE Agents |pdfUrl=https://ceur-ws.org/Vol-1867/w12.pdf |volume=Vol-1867 |authors=Stefania Monica,Federico Bergenti |dblpUrl=https://dblp.org/rec/conf/woa/MonicaB17a }} ==An Optimization-Based Algorithm for Indoor Localization of JADE Agents== https://ceur-ws.org/Vol-1867/w12.pdf
                                                                  65



                  An Optimization-Based Algorithm
               for Indoor Localization of JADE Agents
                                               Stefania Monica, Federico Bergenti
                                  Dipartimento di Scienze Matematiche, Fisiche e Informatiche
                                                Università degli Studi di Parma
                                      Parco Area delle Scienze 53/A, 43124 Parma, Italy
                                      Email: {stefania.monica,federico.bergenti}@unipr.it


   Abstract—This paper describes and evaluates an optimization-       a bidirectional link with the physical environment, but they
based localization algorithm which has been recently imple-           do not normally provide means to let agents know their
mented to enrich the possibilities of the localization add-on mod-    position in indoor environments. While localization can be
ule for JADE. The described algorithm targets indoor scenarios
and it enables localization of JADE agents running on smart           considered a solved problem in outdoor environments because
devices in known environments, provided that a conventional           consolidated technologies like the Global Positioning System
WiFi network is present. The algorithm assumes that WiFi access       (GPS) are commonly available in virtually all smart devices,
points in fixed and known positions are available, and it estimates   only few smart devices offer localization sensors for indoor
the position of the smart device where the agent is running using     environments. Just to mention one of the most promising
estimates of the distance between the smart device and each
access point. Distance estimates are used to build an optimization    possibilities in this respect, which is already available in
problem, whose solution is an estimate of the position of the smart   some smart devices, the Ultra-Wide Band (UWB) technology
device. The described algorithm uses particle swarm optimization      guarantees accurate and robust indoor localization [4], and
to solve the built optimization problem, but it is open to the        it has been already used for accurate indoor localization in
adoption of other optimization techniques. The validity of the        industrial environments [5]–[7] and to provide agents with
proposed approach is supported by experimental results shown
in the last part of the paper.                                        indoor localization capabilities [8]. However, besides the need
                                                                      of a specific type of smart device, the strongest limitation
                       I. I NTRODUCTION                               that we currently see in the adoption of UWB or similar
   Among the longstanding debate on the characteristics that          technologies is that they require a dedicated infrastructure,
should be ascribed to agents, the fact that agents should be          which needs to be implemented in indoor environments just
considered situated entities immersed in a partially observable       to support localization. Notably, WiFi networks can be con-
environment seems consolidated. Agents acquire knowledge              sidered ubiquitous in indoor environments today, and the use
from the environment, and they act on it to achieve their             of standard WiFi infrastructures to support localization, rather
goals. Whether the environment is physical or not is irrele-          than dedicated infrastructures, can be considered a major
vant for a generic characterization, but agents executing in          advancement and an enabler for applications [9], [10].
physical environments are traditionally called robots, while             In this paper we document recent developments of experi-
agents executing in nonphysical environments are traditionally        ments intended to provide JADE agents running on common
called software agents. Such a distinction is quickly fading          Android devices with localization capabilities in known indoor
because onboard software of robots has now features that              environments using only ordinary WiFi networks. In detail, the
were typical of software agents (see, e.g., [1]), and smart           targeted scenario assumes that a JADE agent is interested in
devices [2] provide software agents with a direct link with           accurate and timely estimates of its dynamic position within
the physical world that should be taken into serious account          an indoor environment where known and static WiFi Access
to effectively implement the envisioned ideas of agent-based          Points (APs) are available. The proposed method is based on
ubiquitous and pervasive computing. Today, smart devices              the possibility of acquiring estimates of the distance between
are ideal candidates to host JADE containers with minimal             the smart device where the agent is running and each AP
restrictions [3], and it is perfectly reasonable to assume that       using the received power of signals from responding APs
JADE should provide platform-level functionality to let agents        during standard network discovery. Such distance estimates are
access the bidirectional link with the physical world that smart      then processed to estimate the position of the smart device in
devices offer. In order to fully comply with the metaphor             the indoor environment. Once computed, position estimates
of agents as situated entities, JADE is demanded to provide           are immediately made available to the JADE agent. The
agents with platform-level functionality to let agents sense the      processing of distance estimates can be performed using one
physical environment where they execute and act on it to bring        of the localization algorithms available in the literature [11],
about their goals.                                                    but in this paper we describe and evaluate the features of an
   Smart devices already integrate sophisticated sensors and          algorithm that was introduced in [12] and further improved
actuators that can be effectively used to provide agents with         in [13], [14] to overcome the inherent numerical instability
                                                                66


of classic localization algorithms. The described algorithm,        always provided by operating systems to applications during
which was originally designed to use UWB, turns the local-          standard WiFi network discovery because it is normally used
ization problem into a specific optimization problem, which         to let the user choose among available networks. Each range
is solved using Particle Swarm Optimization (PSO), even if          estimate can also be associated with the corresponding AP
other optimization techniques could be adopted.                     and, eventually, with its coordinates, because communications
   This paper is organized as follows. Section II fixes notation    between the TN and an AP during network discovery include
and describes the implemented algorithm. Section III shows          the Basic Service Set IDentification (BSSID) of the latter,
experimental results obtained in a representative indoor sce-       which can be used to identify the responding AP. Hence,
narios. Finally, Section IV concludes the paper and outlines        assuming that each known BSSID can be associated with
possible future developments.                                       the coordinates si of the corresponding AP, each distance
                                                                    estimate can be related to the coordinates of the corresponding
         II. O PTIMIZATION - BASED L OCALIZATION
                                                                    AP. Notably, needed information to support the computation
   The described algorithm is implemented in a localization         of distance estimates is always available to applications and
add-on module for JADE, which has been recently imple-              neither low-level access to hardware, nor privileged operating
mented to provide a framework to host localization algorithms,      system services are needed. Indeed, the TN is not even
and to offer agent developers the possibility of choosing           requested to be connected to the WiFi network, because only
among different algorithms to address the specific needs of         network discovery is used.
applications [10]. A discussion of the architecture of this            We have already discussed the performance of some local-
module, which is briefly summarized in [8], is not needed           ization algorithms in the context of agent-based indoor local-
to describe the algorithm and its features.                         ization, such as the circumference intersection algorithm [10]
A. Notation and Reference Scenarios                                 and the two-stage maximum-likelihood algorithm [8]. In this
                                                                    paper, we focus on a localization approach based on optimiza-
   The smart device where the agent is running, which is
                                                                    tion, where the localization problem is rewritten in terms of an
denoted as Target Node (TN) in the rest of the paper, is situated
                                                                    optimization problem. In order to describe the algorithm, let us
in an indoor environment that contains M WiFi APs. Let
                                                                    first introduce proper notation and makes relevant geometric
             si = (xi , yi )T    i ∈ {1, . . . , M }.        (1)    considerations. Let
                                                                                              u = (x, y)T                        (3)
be the coordinates of such APs. We assume that APs are static
and we also assume that their coordinates si are known to           be the true position of the TN, which is supposed to be
the agent. Note that, in order to simplify notation, we focus       unknown and which is what should be estimated. The true
on the description of the algorithm on bi-dimensional scenar-       distance between the TN and the i−th AP can be denoted as
ios. The generalization of the described algorithm to three-
                                                                                ri , ||u − si ||      i ∈ {1, . . . , M }.       (4)
dimensional scenarios is straightforward. Moreover, under the
assumption that the smart device approximatively moves on a            The knowledge of true distances {ri }M i=1 , together with the
plane, [10] shows how to relate a localization problem in a         knowledge of coordinates {si }M   i=1 of the APs, would easily
three-dimensional scenario to a proper localization problem in      determine the position of the TN. In this case, the coordinates
a bi-dimensional scenario.                                          of the TN could be found by simply intersecting the circum-
   The ranging capabilities that the smart device is requested      ferences centered in {si }M i=1 , whose radii are {ri }i=1 . This
                                                                                                                           M
to offer in order to support the implemented algorithm concern      translates into the following system of M quadratic equations
the possibility of measuring estimates of the distances to                                   2            2     2
the M APs. Such estimates of distances are obtained by                              (x − x1 ) + (y − y1 ) = r1
                                                                                   
processing the average received power of the WiFi signals                             ...                                         (5)
                                                                                   
                                                                                   
traveling between the TN and each responding AP during                                (x − xM )2 + (y − yM )2 = rM   2
                                                                                                                       .
standard network discovery. According to the Friis transmis-
sion equation [4], the average received power P̄ (r) can be           Unfortunately, since true distances {ri }Mi=1 between APs
expressed as a function of the distance r between a transmitter     and the TN are unknown, localization can only be performed
and a receiver. By inverting the Friis transmission equation, the   using the following system of quadratic equations
value of r as a function of P̄ (r) can be expressed as                                       2            2    2
                                                                                   (x̂ − x1 ) + (ŷ − y1 ) = r̂1
                                                                                  
                                     P̄ (r)−P0
                      r = r0 · 10−       10β                 (2)                     ...                                     (6)
                                                                                  
                                                                                  
                                                                                    (x̂ − xM )2 + (ŷ − yM )2 = r̂M
                                                                                                                  2
where P0 is the known power at reference distance r0 , and
β depends on the characteristics of the transmission. Hence,        which is obtained from (5) by replacing the values of true
in order to derive an estimate of the distance r between the        distances {ri }M
                                                                                   i=1 , with their estimates, denoted as {r̂i }i=1 .
                                                                                                                                M

TN and a generic AP, it is sufficient to measure the average        Due to errors on distance estimates, the M circumferences
received power of the signal traveling between them and to          corresponding to the equations in (6) often do not intersect
apply (2). Such a measure of the average received power is          in a single point and, for this reason, a proper localization
                                                                 67


algorithm needs to be considered in order to find the proper         move all the particles towards the position corresponding to
estimates of the position of the TN, which is denoted as             the optimal solution of the considered minimization problem.
                                                                       The PSO-based algorithm that we adopted to solve the min-
                          û = (x̂, ŷ)T .                    (7)    imization problem (10) works as follows. First, the positions
  In order to derive a proper localization algorithm, let us first   of the particles are randomly initialized in the search space,
observe that (6) can be re-written in matrix notation as             which, in our context, corresponds to the physical indoor
                                                                     environment where the APs and the TN are situated. The initial
                       1 ûT û + A û = k̂                   (8)    positions are denoted as
where 1 is vector with M elements equal to 1, k̂ is a vector                           x(i) (0)         i ∈ {1, . . . , S}             (12)
whose i−th element is r̂i2 − (x2i + yi2 ), and A is the following    where i is the index of the generic particle, and S is the number
M × 2 matrix                                                         of particles. Analogously, the velocity of the i−th particle is
                                            
                               x1       y1                           initialized with the value
                            x2         y2 
                                                                                     v (i) (0)       i ∈ {1, . . . , S}.             (13)
                 A , −2  .              ..  .               (9)
                            ..           . 
                                                                     After the initialization phase, positions and velocities of all
                                xM       yM
                                                                     the particles are updated at each iteration t ∈ N to simulate
   Possible algorithms to solve (8), based on least square           interactions among individuals. More precisely, at the t−th
techniques, on Taylor series expansion, or on maximum-               iteration, the velocity of the i−th particle whose position is
likelihood methods, can be found, for instance, in [15]. The         x(i) (t) is updated according to the following rule [17]
rest of this section describes an alternative algorithm, which
                                                                              v (i) (t + 1) = ω(t)v (i) (t)
was introduced to overcome numerical instability problems of
mentioned approaches.                                                                              + c1 R1 (t)(y (i) (t) − x(i) (t))   (14)
                                                                                                   + c2 R2 (t)(y(t) − x(i) (t))
B. The PSO-Based Localization Algorithm
   Various algorithms to solve localization problems expressed       where, as discussed in [18],
as systems of equations like (8) can be found in the significant        1) y (i) (t) is the best position reached so far;
body of literature on the subject (see, e.g., [15] and referenced       2) y(t) is the best position globally reached so far;
literature). All such algorithms typically suffer from numerical        3) ω(t) is the so called inertial factor;
instability in correspondence of peculiar configurations of             4) c1 is a positive parameter called cognition parameter;
network nodes in space, for example if APs are aligned as               5) c2 is a positive parameter called social parameters; and
discussed in [14]. In order to derive a more robust algorithm,          6) R1 (t) and R2 (t) are independent random variables uni-
in [14] it is proposed to reformulate (8) as an optimization                formly distributed in (0, 1).
problem, which is solved using Particle Swarm Optimization           From (14) it can be easily observed that the velocity of a
(PSO) [16], as outlined in the rest of this section. Note that the   particle at the (t + 1)−th iteration is obtained as the sum of
proposed PSO-based approach was originally designed to use           three addends. The first addend is related to the velocity of the
UWB signaling, and the description of its evolution to WiFi          particle at the previous iteration, which is weighed according
signaling is the major contribution of this paper.                   to the inertial factor ω(t). The second addend is meant to move
   Observe that (8) can be written as a minimization problem         each particle towards the best position it reached so far. Note
whose solution is an estimate of the position of the TN              that such a best position is the one which corresponds to the
                                                                     lowest value of the fitness function and, therefore, y (i) (t) can
                       û = arg min F (u)                    (10)    be expressed as
                                u

where F (u) represents the fitness function associated with the                          y (i) (t) = arg min F (z)                     (15)
                                                                                                       z∈X (i) (t)
problem, which is defined as
                                                                     where
                F (u) = ||k̂ − (1 ûT û + A û)||.          (11)                   X (i) (t) = {x(i) (0), . . . , x(i) (t)}.          (16)
   In order to solve the minimization problem (10), among            Finally, the third addend aims at moving each particle towards
the wide range of possibilities, we propose to use the PSO           the global best position, which is the position that corresponds
algorithm for its proved effectiveness and robustness. Accord-       to the smallest value of the fitness function among all those
ing to such an algorithm, the set of potential solutions of          reached by any particle in the swarm [19]. Hence, y(t) is
a minimization problem can be considered as a swarm of               expressed as
particles whose positions and velocities are iteratively updated                           y(t) = arg min F (z)                  (17)
according to proper rules. Such rules are inspired by biological                                       z∈Y (t)

phenomena like the movements of birds in swarms. In the              where
context of optimization problems, such rules are meant to                            Y (t) = {y (1) (t), . . . , y (S) (t)}.           (18)
                                                                             68


               3                                                                                3


              2.5   AP2                                   AP4                                  2.5


               2                                                                                2


              1.5                                                                              1.5




                                                                                       y[m]
      y[m]




               1                                                                                1


              0.5                                                                              0.5
                                      TN                                                                                         TN
               0                                                                                0


             −0.5   AP1                                   AP3                                 −0.5         AP1     AP2                         AP3     AP4

              −1                                                                               −1
               −1   0     1       2          3     4       5       6                            −1         0        1        2          3       4      5        6

                                      x[m]                                                                                       x[m]
                                       (a)                                                                                        (b)




Fig. 1. The positions of the four APs (blue squares) and of the TN (red           Fig. 2. The positions of the four APs (blue squares) and of the TN (red
star) of the first scenario are shown in considered room. The walls of the        star) of the second scenario are shown in considered room. The walls of
room are shown in black.                                                          the room are shown in black.


   Typically, the inertial factor ω(t) is chosen as a decreasing              a three-dimensional scenario to a proper localization problem
function of t to guarantee low dependence of the solution on                  in a bi-dimensional scenario.
the initial population, and to reduce the exploration ability of                 We assume that M = 4 APs are used to estimate the posi-
the swarm as the number of iterations increases, which makes                  tion of the TN and, in the same environment, we consider two
the method similar to a local search in last iterations [17].                 different configurations of such APs. The two configurations
   The velocities computed with (14) are used to update                       are shown in Fig. 1 and in Fig. 2, respectively. In this figures,
the positions of particles at each iteration according to the                 the positions of the APs are marked with blue squares, the
following rule                                                                position of the TN is marked with a red star, and the black
                                                                              lines show the walls of the corridor. Note that, even if the
    x(i) (t + 1) = x(i) (t) + v (i) (t)          i ∈ {1, . . . , S}.   (19)   algorithm is evaluated for M = 4 APs, it can be executed with
From (19) it can be observed that the position of the i−th                    an arbitrary number of APs. The minimum number of APs to
particle at the (t+1)−th iteration is simply obtained by adding               localize a TN in a bi-dimensional environment is three, but the
v (i) (t) to its previous position.                                           availability of more APs contributes to improve the accuracy
    The execution of the PSO algorithm terminates when a                      of localization.
proper termination condition is met. Normally, the termination                   For each configuration of APs, the optimization-based local-
condition includes that a sufficient number of iterations was                 ization algorithm outlined in Section II is applied 100 times,
performed, or that the fitness function reached a satisfactory                thus leading to 100 independent position estimates for the TN.
value. Once the execution of the algorithm terminates, the                    In the following, the position estimates of the TN at the j−th
solution of the minimization problem is the position of the                   iteration are denoted as
particle with the lowest value of the fitness function.
                                                                                                     û(j) = (x̂(j) , ŷ (j) )        j ∈ {1, . . . , 100}.         (20)
    The PSO algorithm outlined above is used to solve the
localization problem (10). In order to obtain the experimental                The performance of the proposed localization algorithm is
results shown in the next section, we set the value of the                    analyzed in terms of a localization error computed as the
inertial factor to 0.5. The values of c1 and c2 are equal and                 distance between each position estimate û(j) and the true
they are set to 2, so that the average values of c1 R1 (t) and                position of the TN, denoted as u, which is known. Such a
of c2 R2 (t) correspond to 1. The size of the population S is                 localization error is
set to 40, and the algorithm terminates after 50 iterations.
These values proved to be effective for localization purposes                                        d(j) , ||û(j) − u||               j ∈ {1, . . . , 100}.       (21)
as documented in the experimental results presented in [12].
                                                                              The values of {d(j) }100
                                                                                                    j=1 can be used to compute the average
                     III. E XPERIMENTAL R ESULTS                              localization error, denoted as davg , which is expressed as
   This section shows experimental results obtained using the                                                                 1 X (j)
                                                                                                                                      100

described optimization-based algorithm, as implemented in                                                         davg =             d .                            (22)
                                                                                                                             100 j=1
the localization add-on module for JADE. Presented results
are obtained in a representative scenario which consists in a                   We start by considering experimental results obtained in the
section of a corridor whose width is 2 m. Note that we consider               scenario shown in Fig. 1. In this case, the coordinates of the
a bi-dimensional scenario, however, the algorithm can be                      APs, expressed in meters, are
generalized to three-dimensional scenarios as shown in [20].
Moreover, under the assumption that the smart device moves                                                  s1 = (0, 0)T              s2 = (0, 2)T
                                                                                                                                                                    (23)
on a plane, [10] shows how to relate a localization problem in                                              s3 = (5, 0)T              s4 = (5, 2)T .
                                                                                           69


                    2                                                                                               2
                                                                           davg                                                                                       davg
                   1.8                                                                                             1.8

                   1.6                                                                                             1.6

                   1.4                                                                                             1.4

                   1.2                                                                                             1.2




                                                                                                     d ( j ) [m]
     d ( j ) [m]




                    1                                                                                               1

                   0.8                                                                                             0.8

                   0.6                                                                                             0.6

                   0.4                                                                                             0.4

                   0.2                                                                                             0.2

                    0                                                                                               0
                         0   10    20   30     40   50    60   70   80    90      100                                    0   10   20   30   40   50   60   70   80   90      100
                                                    j                                                                                            j


Fig. 3. The values of the localization error d(j) is shown for 100 position                     Fig. 4. The values of the localization error d(j) is shown for 100 position
estimates for the configuration of APs in Fig. 1. The value of the average                      estimates for the configuration of APs in Fig. 2. The value of the average
localization error is shown with a magenta line across the diagram.                             distance error is shown with a green line across the diagram.



The position of the TN, instead, has the following coordinates                                 as in the scenario shown in Fig. 2, then the matrices which
expressed in meters                                                                            appear in such classic algorithms become ill-conditioned, thus
                                                                                               leading to position estimates which are typically far distant
                                             u = (2.5, 1)T .                            (24)
                                                                                               from the true position of the TN [12]. At the opposite, the
According to the algorithm outlined in Section II, range                                       PSO algorithm, being a refinement-based algorithm, does not
estimates for each one of the four APs are acquired and used                                   suffer from ill-conditioning related to the geometric relations
to estimate the position of the TN. This procedure is applied                                  among the positions of the APs.
100 times, thus obtaining 100 position estimates {û(j) }100
                                                         j=1 for
                                                                                                  As done in the first scenario, 100 range estimates from
the TN. Obtained results are then used to evaluate distances                                   each one of the four APs are acquired, but in this case
       j=1 between the j-th position estimate and the true
{d(j) }100                                                                                     the configuration of APs is shown in Fig. 2. The values
position of the TN, according to (21). Such distances are                                      of distances {d(j) }100
                                                                                                                     j=1 corresponding to the 100 position
used as a performance metrics to investigate the validity of                                   estimates are then evaluated according to (21) and they are
the proposed localization algorithm. Fig. 3 shows the values                                   shown in Fig. 4. Fig. 4 also shows the value of the average
of {d(j) }100
           j=1 and also the value of the average localization
                                                                                               localization error davg , which corresponds to 56 cm (green
error davg , which corresponds to 62 cm. Fig. 3 also shows                                     line). Finally, Fig. 4 shows that the distance between the true
that the maximum value of {d(j) }100
                                  j=1 is approximately 1.4 m.
                                                                                               position of the TN and its estimates is always smaller than
This means that the distance between the true position of the                                  1.7 m, since the maximum value of {d(j) }100   j=1 is 1.68 m.
TN and its estimates is at most 1.4 m, and it is 0.62 m on                                        A comparison between the results shown in Fig. 3 and in
average, which makes the localization sufficiently accurate for                                Fig. 4 emphasizes that the values of the average localization
many indoor localization purposes.                                                             errors davg are close in the two scenarios. The value of davg
   Let us now consider the results obtained with the configu-                                  with the configuration of APs shown in Fig. 2, which is the
ration of APs shown in Fig. 2, where all APs are located on                                    less favorable, is 6 cm lower than that obtained with the
the same side of the corridor. In this case, the coordinates of                                configuration of APs shown in Fig. 1, even if the maximum
the APs expressed in meters are                                                                value of {d(j) }100
                                                                                                                j=1 is smaller in the first scenario.

                                  s1 = (0, 0)T           s2 = (1, 0)T                                                                  IV. C ONCLUSIONS
                                                T
                                                                                        (25)
                                  s3 = (4, 0)            s4 = (5, 0)T .
                                                                                                  This paper described and evaluated empirically an
The TN is located in the same point as in the first scenario, and                              optimization-based localization algorithm which is used to
its coordinates are shown in (24). Note that the configuration                                 provide agents with accurate and timely estimates of their
of APs shown in Fig. 2 is less favorable for localization than                                 position in indoor environments using only ordinary WiFi
that shown in Fig. 1, and many classic localization algorithm                                  infrastructures. The discussed algorithm is implemented in
would fail in estimating the position of the TN. Actually, the                                 the localization add-on module for JADE which provides a
large majority of classic localization algorithm rely on specific                              framework to host different localization algorithms and to let
geometric considerations concerning the positions of the APs                                   agent developers choose among them to address the specific
and of the TN, and they are based on the solutions of non-                                     needs of applications. In detail, the proposed approach uses
linear systems of equations. If all APs lay on the same line,                                  the communication between the smart device where the agent
                                                                            70


is running and the APs of the network, which are assumed to                          the 9th International Wireless Communications & Mobile Computing
be static and in known positions, to acquire estimates of the                        Conference (IWCMC 2013), Cagliari, Italy, July 2013, pp. 982–987.
                                                                                 [7] S. Monica and G. Ferrari, “UWB-based localization in large indoor
distance between the smart device and each AP. Such estimates                        scenarios: Optimized placement of anchor nodes,” IEEE Transactions
are used to build a specific optimization problem, which is                          on Aerospace and Electronic Systems, vol. 51, no. 2, pp. 987–999, April
then solved using PSO. The solution of such an optimization                          2015.
                                                                                 [8] S. Monica and F. Bergenti, “Location-aware JADE agents in indoor
problem is an estimate of the position of the smart device                           scenarios,” in Proceedings of 16th Workshop Dagli Oggetti agli Agenti
which hosts the agent. No dedicated infrastructure is needed                         (WOA 2015), ser. CEUR Workshop Proceedings, vol. 1382. RWTH
to enable localization, and smart devices are not even requested                     Aachen, 2015, pp. 103–108.
                                                                                 [9] S. Monica and F. Bergenti, “A comparison of accurate indoor localization
to be connected to one of the available WiFi networks because                        of static targets via WiFi and UWB ranging,” in Trends in Practical
only standard network discovery messages are used.                                   Applications of Scalable Multi-Agent Systems, the PAAMS Collection,
   Possible envisaged applications of the described algorithm                        2016, pp. 111–123.
                                                                                [10] S. Monica and F. Bergenti, “Experimental evaluation of agent-based
include location-aware social games [21], which can be                               localization of smart appliances,” in Proceedings of the European
adopted, for instance, inside museums and exhibitions to                             Conference on Multi-Agent Systems (EUMAS), Sevilla, Spain, 2016.
attract the interest of children, or to create personalized                     [11] Z. Farid, R. Nordin, and M. Ismail, “Recent advances in wireless indoor
                                                                                     localization techniques and system,” Journal of Computer Networks and
itineraries with treasure hunts. Such games can be effectively                       Communications, vol. 2013, 2013.
implemented using the localization add-on module for JADE                       [12] S. Monica and G. Ferrari, “Particle swarm optimization for auto-
together with the Agent-based Multi-User Social Environment                          localization of nodes in wireless sensor networks,” in Proceedings of
                                                                                     the 11th International Conference on Adaptive and Natural Computing
(AMUSE) [22], [23], a recent evolution of JADE that offers                           Algorithms (ICANNGA 2013), Lausanne, Switzerland, April 2013, pp.
platform-level functionality to help developers in the imple-                        456–465.
mentation of social games. Illustrative results presented in                    [13] S. Monica and G. Ferrari, “Swarm intelligent approaches to auto-
                                                                                     localization of nodes in static UWB networks,” Applied Soft Computing,
the last part of the paper show that the performance of the                          vol. 25, pp. 426–434, December 2014.
proposed algorithms can be considered sufficiently good for                     [14] S. Monica and G. Ferrari, “A swarm-based approach to real-time 3D
these types of applications. In addition, location-aware smart                       indoor localization: Experimental performance analysis,” Applied Soft
                                                                                     Computing, vol. 43, pp. 489–497, June 2016.
emergency applications [24], which were typically intended                      [15] G. Shen, R. Zetik, and R. S. Thomä, “Performance comparison of TOA
for outdoor environments because they need accurate local-                           and TDOA based location estimation algorithms in LOS environment,”
ization, could be retargeted to indoor environments with the                         in Proceedings of the 5th Workshop on Positioning, Navigation and
                                                                                     Communication (WPNC 2008), Hannover, Germany, March 2008, pp.
help of the described algorithm.                                                     71–78.
   Future work on the research discussed in this paper involves                 [16] J. Kennedy and R. Eberhart, “Particle swarm optimization,” in Proceed-
further investigation on the performance of the described                            ings of the IEEE International Conference on Neural Networks (ICNN),
                                                                                     Perth, Australia, November 1995, pp. 1942–1948.
algorithm in different indoor environments and with different
                                                                                [17] Y. Shi and R. Eberhart, “A modified particle swarm optimizer,” in
configurations of APs. Moreover, it is of interest to study the                      Proceedings of the IEEE International Conference on Evolutionary
effects of proper pre-processing of the range estimates in the                       Computation (ICEC), Washington, DC, July 1999, pp. 69–73.
first phase of the algorithm. Actually, as also suggested by ex-                [18] R. Eberhart and J. Kennedy, “A new optimizer using particles swarm
                                                                                     theory,” in Proceedings of the 6th International Symposium on Micro
perimental results shown in previous section, the performance                        Machine and Human Science (MHS), Nagoya, Japan, October 1995, pp.
of the algorithm could benefit from proper averaging of range                        39–43.
estimates or of position estimates.                                             [19] R. Poli, J. Kennedy, and T. Blackwell, “Particle swarm optimization,”
                                                                                     Swarm Intelligence Journal, vol. 1, no. 1, pp. 33–57, June 2007.
                             R EFERENCES                                        [20] S. Monica and G. Ferrari, “A swarm intelligence approach to 3D
                                                                                     distance-based indoor UWB localization,” in Proceedings of the In-
 [1] L. Fichera, F. Messina, G. Pappalardo, and C. Santoro, “A Python                ternational Conference on the Applications of Evolutionary Computa-
     framework for programming autonomous robots using a declarative                 tion (EvoApplications 2015), track on Nature-inspired Techniques for
     approach,” Science of Computer Programming, vol. 139, pp. 36–55,                Communication Networks and other Parallel and Distributed Systems
     2017.                                                                           (EvoCOMNET 2015), Copenaghen, Denmark, April 2015.
 [2] S. Poslad, Ubiquitous Computing: Smart Devices, Environments and           [21] F. Bergenti and S. Monica, “Location-aware social gaming with
     Interactions. Wiley, 2009.                                                      AMUSE,” in Advances in Practical Applications of Scalable Multi-
 [3] F. Bergenti, G. Caire, and D. Gotta, “Agents on the move: JADE for              agent Systems. The PAAMS Collection: 14th International Conference,
     Android devices,” in Proceedings of the 15th Workshop Dagli Oggetti             PAAMS 2016, Y. Demazeau, T. Ito, J. Bajo, and M. J. Escalona, Eds.
     agli Agenti (WOA 2014), ser. CEUR Workshop Proceedings, vol. 1260.              Springer International Publishing, 2016, pp. 36–47.
     RWTH Aachen, 2014.                                                         [22] F. Bergenti, G. Caire, and D. Gotta, “An overview of the AMUSE social
 [4] S. Gezici and H. V. Poor, “Position estimation via Ultra-Wide-Band              gaming platform,” in Proceedings of the 14th Workshop Dagli Oggetti
     signals,” Proceedings of the IEEE, vol. 97, no. 2, pp. 386–403, February        agli Agenti (WOA 2013), ser. CEUR Workshop Proceedings, vol. 1099.
     2009.                                                                           RWTH Aachen, 2013.
 [5] S. Monica and G. Ferrari, “Impact of the number of beacons in              [23] F. Bergenti, G. Caire, and D. Gotta, “Agent-based social gaming with
     PSO-based auto-localization in UWB networks,” in Proceedings of the             AMUSE,” in Procs. 5th Int’l Conf. Ambient Systems, Networks and
     International Conference on the Applications of Evolutionary Compu-             Technologies (ANT 2014) and 4th Int’l Conf. Sustainable Energy
     tation (EvoApplications 2013), track on Nature-inspired Techniques for          Information Technology (SEIT 2014), ser. Procedia Computer Science,
     Communication Networks and other Parallel and Distributed Systems               vol. 32, 2014, pp. 914–919.
     (EvoCOMNET 2013), Vienna, Austria, April 2013, pp. 42–51.                  [24] A. Poggi and F. Bergenti, “Developing smart emergency applications
 [6] S. Monica and G. Ferrari, “Optimized anchors placement: An analyt-              with multi-agent systems,” International Journal of E-Health and Med-
     ical approach in UWB-based TDOA localization,” in Proceedings of                ical Communications, vol. 1, no. 4, pp. 1–13, 2010.