Journal of Electronic Science and Technology, Volume. 22, Issue 1, 100234(2024)

Fine-grained grid computing model for Wi-Fi indoor localization in complex environments

Yan Liang1, Song Chen1、*, Xin Dong1, and Tu Liu2
Author Affiliations
  • 1School of Computer Engineering, Chengdu Technological University, Chengdu, 611730, China
  • 2HAN Networks Corporation Limited, Beijing, 100094, China
  • show less
    Figures & Tables(11)
    Framework of the FGGC model.
    Computing progress for building a decision tree.
    Indoor map with the length of 40 m and the width of 30 m.
    Heat map based on the indoor map and APs.
    Test points with the estimated and actual locations.
    Localization errors and running time with different numbers of test samples.
    Location errors and running time with different grid sizes.
    • Table 1. Description of Algorithm 1.

      View table
      View in Article

      Table 1. Description of Algorithm 1.

      Algorithm 1: Generating RPs and the training dataset D according to grid points
      Input: $ \mathrm{m}\mathrm{a}\mathrm{p}\mathrm{x}{\rm{,}}\;\mathrm{m}\mathrm{a}\mathrm{p}\mathrm{y}{\rm{,}}\;\mathrm{g}\mathrm{s}\mathrm{i}\mathrm{z}\mathrm{e} $
      Output: $ \mathrm{R}\mathrm{P}\mathrm{s}{\rm{,}}\;\mathbf{D} $
      Progress:
      1: $ M\leftarrow \mathrm{m}\mathrm{a}\mathrm{p}\mathrm{x}/\mathrm{g}\mathrm{s}\mathrm{i}\mathrm{z}\mathrm{e} $, $ N\leftarrow \mathrm{m}\mathrm{a}\mathrm{p}\mathrm{y}/\mathrm{g}\mathrm{s}\mathrm{i}\mathrm{z}\mathrm{e} $
      2: $ \mathrm{R}\mathrm{P}\mathrm{s}\leftarrow \mathrm{g}\mathrm{r}\mathrm{i}\mathrm{d}.\mathrm{i}\mathrm{n}\mathrm{i}\mathrm{t}\mathrm{s}\mathrm{i}\mathrm{z}\mathrm{e}(M{\rm{,}}\;N) $
      3: $ \mathbf{D}\leftarrow \left[\right]{\rm{,}}\;\mathbf{F}\leftarrow \left[\right]{\rm{,}}\;\mathbf{L}\leftarrow \left[ \right] $
      4: for $ \mathrm{r}\mathrm{o}\mathrm{w}=0 :N $ do
      5:  for $ \mathrm{c}\mathrm{o}\mathrm{l}=0 :M $ do
      6:   $ \mathbf{r}\leftarrow \left[ \right] $
      7:   $ C\leftarrow 40{\rm{,}}\;P\leftarrow 0{\rm{,}}\;\Omega \leftarrow 0{\rm{,}}\;\Phi \leftarrow 0 $
      8:   for $ i=0 :K $ do
      9:     $ P\leftarrow {P}^{i} $
      10:    $ \lambda \leftarrow {\lambda }^{i} $
      11:    ${a}_{x}^{i}\leftarrow \mathrm{l}\mathrm{o}\mathrm{c}\mathrm{a}\mathrm{t}\mathrm{i}\mathrm{o}\mathrm{n}\mathrm{x}\left({{\mathrm{AP}}}_{i}\right){\rm{,} }\;{a}_{y}^{i}\leftarrow \mathrm{l}\mathrm{o}\mathrm{c}\mathrm{a}\mathrm{t}\mathrm{i}\mathrm{o}\mathrm{n}\mathrm{y}\left({{\mathrm{AP}}}_{i}\right){\rm{,} }\;{a}_{z}^{i}\leftarrow $$\mathrm{l}\mathrm{o}\mathrm{c}\mathrm{a}\mathrm{t}\mathrm{i}\mathrm{o}\mathrm{n}\mathrm{z}\left({{\mathrm{AP}}}_{i}\right) $
      12:    // $ ** $ is the power operator
      13:    $\Omega =10*n*\mathrm{l}\mathrm{o}\mathrm{g}10\left(\left(\left(\mathrm{r}\mathrm{o}\mathrm{w}-{a}_{x}^{i}\right)**2+\left(\mathrm{c}\mathrm{o}\mathrm{l}-{a}_{y}^{i}\right)**2+ $$ \left(1.5-{a}_{z}^{i}\right)**2\right)**0.5\right)$
      14:    $ \Phi \leftarrow 0 $
      15:    for $ j=0 :T $ do
      16:     if $ \mathrm{i}\mathrm{s}\mathrm{I}\mathrm{n}\mathrm{t}\mathrm{e}\mathrm{r}\mathrm{s}\mathrm{e}\mathrm{c}\left({\mathrm{p}\mathrm{o}\mathrm{i}\mathrm{n}\mathrm{t}}_{\mathrm{r}\mathrm{o}\mathrm{w}}{\rm{,}}\;{\mathrm{p}\mathrm{o}\mathrm{i}\mathrm{n}\mathrm{t}}_{\mathrm{c}\mathrm{o}\mathrm{l}}{\rm{,}}\;{a}_{x}^{i}{\rm{,}}\;{a}_{y}^{i}\right)==\mathrm{t}\mathrm{r}\mathrm{u}\mathrm{e} $ do
      17:      $ \Phi \leftarrow \Phi +{\beta }_{j} $
      18:     end if
      19:    end for
      20:    $ \Gamma =C+{{\mathrm{log}}}10\left(\lambda /2.4\right)+\Omega +\Phi $
      21:    $ \mathbf{r}\leftarrow \mathrm{r}{\mathrm{.}}\mathrm{a}\mathrm{p}\mathrm{p}\mathrm{e}\mathrm{n}\mathrm{d}(P-\Gamma ) $
      22:   end for
      23:   $ \mathbf{F}\leftarrow \mathrm{F}.\mathrm{a}\mathrm{p}\mathrm{p}\mathrm{e}\mathrm{n}\mathrm{d}\left({\bf{r}}\right){\rm{,}}\;\mathbf{L}\leftarrow \mathrm{L}{\mathrm{.}}\mathrm{a}\mathrm{p}\mathrm{p}\mathrm{e}\mathrm{n}\mathrm{d}\left([\mathrm{r}\mathrm{o}\mathrm{w}{\rm{,}}\;\mathrm{c}\mathrm{o}\mathrm{l}]\right); $
      24:   $ \mathrm{R}\mathrm{P}\mathrm{s}[\mathrm{r}\mathrm{o}\mathrm{w}{\rm{,}}\;\mathrm{ }\mathrm{c}\mathrm{o}\mathrm{l}]\leftarrow \mathbf{r} $
      25:  end for
      26: end for
      27:$ \mathbf{D}\leftarrow \mathbf{F}+\mathbf{L} $
    • Table 2. Description of Algorithm 2.

      View table
      View in Article

      Table 2. Description of Algorithm 2.

      Algorithm 2: Obtaining the estimated locations
      Input: $ \mathrm{s}\mathrm{t}\mathrm{a}\mathrm{r}\mathrm{t}\mathrm{x}{\rm{,}}\mathrm{ }\mathrm{s}\mathrm{t}\mathrm{a}\mathrm{r}\mathrm{t}\mathrm{y}{\rm{,}}\;{\mathrm{p}\mathrm{r}\mathrm{e}\mathrm{d}\mathrm{i}\mathrm{c}\mathrm{t}}_{\mathrm{r}\mathrm{s}\mathrm{s}}{\rm{,}}\;\mathrm{s}\mathrm{i}\mathrm{z}\mathrm{e}{\rm{,}}\;\mathrm{g}\mathrm{s}\mathrm{i}\mathrm{z}\mathrm{e}{\rm{,}}\;\alpha {\rm{,}}\;\beta $
      Output: $ x{\rm{,}}\;y $
      Progress:
      1: $ \mathrm{m}\mathrm{i}\mathrm{n}\_\mathrm{d}\mathrm{i}\mathrm{s}\mathrm{t}\mathrm{a}\mathrm{n}\mathrm{c}\mathrm{e}\leftarrow \mathrm{n}\mathrm{u}\mathrm{l}\mathrm{l} $
      2: $ x\leftarrow 0{\rm{,}}\;y\leftarrow 0{\rm{,}}\;\mathbf{r}\leftarrow \left[ \right] $
      3: $ \mathrm{s}\mathrm{t}\mathrm{e}\mathrm{p}\leftarrow 0{\mathrm{.}}1{\rm{,}}\;\mathrm{s}\mathrm{t}\mathrm{e}\mathrm{p}\mathrm{s}\leftarrow \mathrm{g}\mathrm{s}\mathrm{i}\mathrm{z}\mathrm{e}/\mathrm{s}\mathrm{t}\mathrm{e}\mathrm{p} $
      4: for $ \mathrm{r}\mathrm{o}\mathrm{w}=0 :\mathrm{s}\mathrm{t}\mathrm{e}\mathrm{p}\mathrm{s} $ do
      5:  $ \mathrm{r}\mathrm{o}\mathrm{w}\_\mathrm{g}\mathrm{r}\mathrm{i}\mathrm{d}\leftarrow \mathrm{s}\mathrm{t}\mathrm{a}\mathrm{r}\mathrm{t}\mathrm{x}+\mathrm{s}\mathrm{t}\mathrm{e}\mathrm{p}*\mathrm{r}\mathrm{o}\mathrm{w} $
      6:  for $ \mathrm{c}\mathrm{o}\mathrm{l}=0 :\mathrm{s}\mathrm{t}\mathrm{e}\mathrm{p}\mathrm{s} $ do
      7:   $ \mathrm{c}\mathrm{o}\mathrm{l}\_\mathrm{g}\mathrm{r}\mathrm{i}\mathrm{d}\leftarrow \mathrm{s}\mathrm{t}\mathrm{a}\mathrm{r}\mathrm{t}\mathrm{y}+\mathrm{s}\mathrm{t}\mathrm{e}\mathrm{p}*\mathrm{c}\mathrm{o}\mathrm{l} $
      8:   for $ i=0 :K $ do
      9:    /* Obtain the RSS value at the point (row_grid, col_grid) by Algorithm 1. */
      10:    $ {r}^{i}\leftarrow \mathrm{r}\mathrm{s}\mathrm{s}\left(\mathrm{r}\mathrm{o}\mathrm{w}\_\mathrm{g}\mathrm{r}\mathrm{i}\mathrm{d}{\rm{,}}\mathrm{ }\mathrm{c}\mathrm{o}\mathrm{l}\_\mathrm{g}\mathrm{r}\mathrm{i}\mathrm{d}{\rm{,}}\;{\mathrm{A}\mathrm{P}}_{i}{\rm{,}}\;\beta \right){\rm{,}}\;\mathbf{r}\leftarrow \mathrm{r}{\mathrm{.}}\mathrm{a}\mathrm{p}\mathrm{p}\mathrm{e}\mathrm{n}\mathrm{d}\left({r}^{i}\right) $
      11:    $ {r'}^{i}\leftarrow \mathrm{r}\mathrm{s}\mathrm{s}({\mathrm{p}\mathrm{r}\mathrm{e}\mathrm{d}\mathrm{i}\mathrm{c}\mathrm{t}}_{\mathrm{r}\mathrm{s}\mathrm{s}}{\rm{,}}\;i) $
      12:    $ \mathrm{d}\mathrm{i}\mathrm{s}\mathrm{t}\mathrm{a}\mathrm{n}\mathrm{c}\mathrm{e}\leftarrow \mathrm{d}\mathrm{i}\mathrm{s}\mathrm{t}\mathrm{a}\mathrm{n}\mathrm{c}\mathrm{e}+\left({r}^{i}-{r'}^{i}\right)**2 $
      13:   end for
      14:   $ \mathrm{d}\mathrm{i}\mathrm{s}\mathrm{t}\mathrm{a}\mathrm{n}\mathrm{c}\mathrm{e}\leftarrow \mathrm{d}\mathrm{i}\mathrm{s}\mathrm{t}\mathrm{a}\mathrm{n}\mathrm{c}\mathrm{e}**0.5 $
      15:   if $ (\mathrm{r}\mathrm{o}\mathrm{w}==0 $) and $ (\mathrm{c}\mathrm{o}\mathrm{l}==0 $) do
      16:    $ \mathrm{m}\mathrm{i}\mathrm{n}\_\mathrm{d}\mathrm{i}\mathrm{s}\mathrm{t}\mathrm{a}\mathrm{n}\mathrm{c}\mathrm{e}\leftarrow \mathrm{d}\mathrm{i}\mathrm{s}\mathrm{t}\mathrm{a}\mathrm{n}\mathrm{c}\mathrm{e} $
      17:   else if $ (\mathrm{d}\mathrm{i}\mathrm{s}\mathrm{t}\mathrm{a}\mathrm{n}\mathrm{c}\mathrm{e} < \mathrm{m}\mathrm{i}\mathrm{n}\_\mathrm{d}\mathrm{i}\mathrm{s}\mathrm{t}\mathrm{a}\mathrm{n}\mathrm{c}\mathrm{e} $) do
      18:    $ x\leftarrow \mathrm{r}\mathrm{o}\mathrm{w}\_\mathrm{g}\mathrm{r}\mathrm{i}\mathrm{d}{\rm{,}}\;y\leftarrow \mathrm{c}\mathrm{o}\mathrm{l}\_\mathrm{g}\mathrm{r}\mathrm{i}\mathrm{d} $
      19:   end if
      20:  end for
      21: end for
    • Table 3. Parameters used in the experiment.

      View table
      View in Article

      Table 3. Parameters used in the experiment.

      ParameterValue
      Length of the indoor map40 m
      Width of the indoor map30 m
      Grid size1.0 m
      The number of APs4
      Coefficient of the path loss (n)2
      Power of AP15 dBm
      Signal loss caused by the wall10 dB
      Frequency band of AP5.2 GHz
      Constant C in path loss40
      The number of the decision trees300
    • Table 4. Comparison of location errors obtained by the proposed model and those in Ref. [12].

      View table
      View in Article

      Table 4. Comparison of location errors obtained by the proposed model and those in Ref. [12].

      ModelMean error (m)Maximum error (m)
      MaxFD2.5427.73
      MinGDOP2.0328.02
      Hybird1.638.02
      Proposed model0.360.64
    Tools

    Get Citation

    Copy Citation Text

    Yan Liang, Song Chen, Xin Dong, Tu Liu. Fine-grained grid computing model for Wi-Fi indoor localization in complex environments[J]. Journal of Electronic Science and Technology, 2024, 22(1): 100234

    Download Citation

    EndNote(RIS)BibTexPlain Text
    Save article for my favorites
    Paper Information

    Category:

    Received: Oct. 10, 2023

    Accepted: Jan. 3, 2024

    Published Online: Jul. 5, 2024

    The Author Email: Chen Song (chensong_mail@163.com)

    DOI:10.1016/j.jnlest.2024.100234

    Topics