Skip to main content
. 2021 Dec 24;22(1):101. doi: 10.3390/s22010101
Algorithm 1 NLoS BS detection and exclusion. Procedure from 1 to 20 performs the algorithm with all the available BS, while procedure from 22 to 27 performs the algorithm excluding one BS at a time when the computed test statistic with all the available BS exceeds the given threshold

     Input: xBS,n, x^, Cov, γ, WTDoA, ρ^, where n=1,2,,MBSTDoA

     Output: x^l

  • 1:

    Set NrIter=10 to perform GN solution

  • 2:

    x^l=x^

  • 3:

    Set l=0

  • 4:

    whilelNrIterdo

  • 5:

        l=l+1

  • 6:

        Compute GTDoA,(n,1:3)=xBS,1x^lxBS,1x^lxBS,(n+1)x^lxBS,(n+1)x^l

  • 7:

        Compute the pseudo-range error ρ(x^l1).

  • 8:

        Compute the UE estimated location x^l:

  • 9:

        x^l=x^l1+(GTDoA,l1TWTDoA1GTDoA,l1)1GTDoA,l1TWTDoA1(ρ(x^l1)ρ^)

  • 10:

    end while

  • 11:

    Compute GTDoA as in 6, where x^l is from 9

  • 12:

    Decompose GTDoA into US and UN through QR factorization

  • 13:

    Compute the residuals ε=UNTΔρ, where Δρ=(ρ(x^l1)ρ^) from 9

  • 14:

    Compute the covariance matrix of the range residual vector Covres=UNCovUNT

  • 15:

    Perform eigen decomposition of Covres=VDVT

  • 16:

    Whiten the range residual vector as ϵ^=(VD)1ϵ

  • 17:

    Compute the sum of squared residuals: SSR=ϵ^Tϵ^

  • 18:

    Compute T=SSR/(MBSTDoA4)

  • 19:

    ifTγthen

  • 20:

        Use the solution x^l in 9

  • 21:

    else

  • 22:

        A bias might be present

  • 23:

        Create subsets of BS by setting the 1st BS as serving and remove one BS from the rest of BS at a time, {xBS,n}i, where i{1,2,,MBSTDoA1} and nn{i+1}

  • 24:

        For each of the subsets compute Ti following the procedure from 1 to 18

  • 25:

        Choose {xBS,n}i with minimum Ti that does not exceeds γ

  • 26:

        if Ti found then

  • 27:

            Use solution x^l computed by the corresponding {xBS,n}i

  • 28:

        else

  • 29:

            Choose the minimum Ti among test statistics computed in 18 and 24

  • 30:

            Use solution x^l computed by the corresponding group of BSs

  • 31:

        end if

  • 32:

    end if