=Paper= {{Paper |id=Vol-3248/paper14 |storemode=property |title=A Mean Optimization Filter to Improve Bluetooth AoA Indoor Positioning Accuracy for Ship Environments |pdfUrl=https://ceur-ws.org/Vol-3248/paper14.pdf |volume=Vol-3248 |authors=Qianfeng Lin,Jooyoung Son,Hyeongseol Shin |dblpUrl=https://dblp.org/rec/conf/ipin/LinSS22 }} ==A Mean Optimization Filter to Improve Bluetooth AoA Indoor Positioning Accuracy for Ship Environments== https://ceur-ws.org/Vol-3248/paper14.pdf
A Mean Optimization Filter to Improve Bluetooth AoA
Indoor Positioning Accuracy for Ship Environments
Qianfeng Lin1 , Jooyoung Son2,* and Hyeongseol Shin3
1
  Department of Computer Engineering, Korea Maritime and Ocean University, 727 Taejong-ro, Yeongdo-Gu, Busan
49112, South Korea
2
  Division of Marine IT Engineering, Korea Maritime and Ocean University, 727 Taejong-ro, Yeongdo-Gu, Busan 49112,
South Korea
3
  Department of Institutional, Korea Maritime and Ocean University, 727 Taejong-ro, Yeongdo-Gu, Busan 49112, South
Korea


                                         Abstract
                                         Currently, the most effective way to reduce transmission of COVID-19 is to differentiate between
                                         close contacts. Location points of close contact are essential for differentiation. As a major mode
                                         of transportation, ships provide a vehicle for virus transmission. Timely detection location of close
                                         contacts inside a ship can prevent the spread of viruses. Location-based services can be provided for
                                         ship passengers. Bluetooth is widely available in many wearable devices. The Bluetooth 5.1 angle of
                                         arrival (AoA) indoor positioning algorithms can provide a certain indoor positioning accuracy for ship
                                         passengers. The two most essential parameters in Bluetooth 5.1 AoA indoor positioning are elevation
                                         angle and azimuth angle. Elevation and azimuth are often not accurate enough due to noise, which
                                         increases indoor positioning errors. As a result, this paper proposes a mean optimization filter for ship
                                         environments, which combines the box plot method to improve Bluetooth 5.1 AoA indoor positioning
                                         accuracy, with an RMSE of 0.34 m.

                                         Keywords
                                         Angle of arrival, Bluetooth 5.1, indoor positioning, ship environments




1. Introduction
COVID-19 pandemic has been significantly impacting cruise operations worldwide. These
essential economic and employment activities will be gradually resumed. Cruise operators must
ensure that ship passengers do not have unacceptable health risks. Ship spatial environment
facilitates the spread of the virus during a global COVID-19 pandemic. A cruise ship has
contributed to the spread of COVID-19 worldwide [1]. A former passenger of the Diamond
Princess tested positive for COVID-19 [2]. The Japanese government ordered ship passengers
and crew to enter a two-week quarantine. Due to the cramped working environment, crew
members are among the occupational groups most susceptible to outbreaks of this virus [3].
Indoor positioning algorithms are capable of providing location services to ship passengers. This
allows close contacts to be distinguished. As a result of the ship’s complex indoor environment,
IPIN 2022 WiP Proceedings, September 5 - 7, 2022, Beijing, China
*
 Corresponding author.
$ linqianfeng@g.kmou.ac.kr (Q. Lin); mmlab@kmou.ac.kr (J. Son); tlsgudtjf123@naver.com (H. Shin)
 0000-0003-3770-3204 (Q. Lin); 0000-0001-7851-9214 (J. Son)
                                       © 2022 Copyright for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0).
    CEUR
    Workshop
    Proceedings
                  http://ceur-ws.org
                  ISSN 1613-0073
                                       CEUR Workshop Proceedings (CEUR-WS.org)
indoor positioning accuracy can be improved. This paper proposes a mean optimization filter
(MOF) to improve the accuracy of the Bluetooth 5.1 AoA indoor positioning algorithm. The
proposed method in this paper is applicable to devices that support Bluetooth 5.1 AoA. Therefore,
the method proposed in this paper can be applied to scenarios that require location-based
services.


2. Previous Works
Bluetooth is present in a wide variety of wearable devices. It can be used to get the location
point of ship passengers easily. The Bluetooth 5.1 AoA indoor positioning technology provides
precise location points of user devices. Research on this topic has been extensive.
   [4] analyzes high-precision location services of direction-finding capabilities. Using Bluetooth
5.1 AoA receivers for direction finding, [5] studies a performance evaluation framework. [6]
introduces a method that uses deep neural networks to estimate the location point of a Bluetooth
Low Energy (BLE) transmitter (tag) based on the characteristics of the received signals at multiple
anchor points (APs). The estimated AoA is then fed into the indoor positioning engine, which
uses the least squares (LS) algorithm to estimate the tag’s location point. [7] provides an
experimental demonstration of indoor localization using Bluetooth 5.1 and software-defined
radios. [8] provides BLE localization with carrier frequency offset mitigation based on AoA.
Based on simulations, [9] evaluates a novel Bluetooth 5.1 AoA approach for low-cost indoor
vehicle tracking. According to [10], AoA estimation is based on BLE transmissions when the
multipath effect is present. [11] proposes a new localization algorithm that iterates between
AoA estimation and multilateration steps to refine the estimated location points. They also
develop a localization scenario for the assessment and validation of the algorithm in BLE
sensor networks. Electromagnetic wave signals are more complex in ship environments. Signal
noise can adversely affect indoor positioning accuracy. The two most important positioning
parameters in Bluetooth 5.1 AoA are elevation and azimuth. As a result of the multipath effect,
the elevation and azimuth collected by the AoA Locator differ significantly from the actual
values. Therefore, this paper presents a MOF applicable to ship environments to determine the
optimal average by continuously narrowing the range of possible angles.


3. Bluetooth 5.1 AoA Theory
The Bluetooth direction finding is based on the principle of AoA. When two antennas receive
one another, angular phase shifts are produced. Antenna arrays can be used on either side of
the communication link to determine phase shift and calculate location points. The receiver of
AoA systems calculates the direction of the signal by measuring the phase shift of the incoming
signal. Figure 1 shows what AoA is, and Figure 2 illustrates the method of measuring AoA [12].
   In Bluetooth, AoA is implemented using CTE (Constant Tone Extension). As an unmodulated
carrier in an offset format or a sequence of modulated 1s in an unwhitened format. The CTE
is appended to the packet. Bluetooth LE uses the Gaussian Frequency Shift Keying (GFSK)
modulation changes continuously throughout the packet to distinguish the different symbols (0
or 1). Without a stable frequency, the receiver cannot estimate the phase of the signal. When
Figure 1: AoA method [12]




Figure 2: Measuring AoA [12]


calculating the AoA, it is necessary to take into account the 250 kHz difference between the
CTE and the channel center frequency [12]. The Bluetooth direction finding uses IQ sampling,
an in-phase and quadrature sampling technique, to determine the phase of incoming signals.
In the receiver, the incoming signal is mixed with the local oscillator (LO) at 0 and 90 degrees
off. It produces two orthogonal functions, an in-phase and quadrature components. I and Q
components can be used to find the amplitude and phase of the Bluetooth signal. The receiver
switches antennas to find the direction of the transmitter using the AoA method [12].
   The transmitter inserts a constant frequency into a specific portion of CTE. Figure 3 illustrates
the CTE structure. By sampling its IQ components, the receiver can determine the waveform
phase. For multiple antennas, the receiver can calculate AoA. In order to reduce the influence
of phase shift, IQ sampling of individual antennas in the reference period is required. To obtain
the difference due to phase shift with a certain location. In order to obtain more PD for the
solution of elevation and azimuth, it is necessary to switch the antenna to obtain PD. Therefore,
the antenna switching operation is performed in the switch slot. Then IQ sampling is performed
in the sample slot [12].
   By the function of IQ sampling, the phase at the sampling instant may be determined by atan
function (Eq.1) [12].
Figure 3: CTE structure [12]



                                                  (︂       )︂
                                         ′             𝑄
                                       𝜙 = atan                                               (1)
                                                       𝐼
    ′
  𝜙 is the phase of the antenna. I is the value of the in-phase component. Q is the value of the
quadrature component.
  The angle can be calculated using the following Eq.2 [12].
                                                  (︂     )︂
                                                     𝜓𝜆
                                      𝜃 = arccos                                              (2)
                                                     2𝜋𝑑
   In Eq.2, 𝜃 is the angle of arrival. The 𝜓 is the phase difference (PD) between antennas. The d
is the distance between the antennas. The 𝜆 is the wavelength of the Bluetooth signal.
   Before calculating the tag location point, it is also necessary to decompose the AoA into
elevation and azimuth. Figure 4 shows an example of calculating the tag location point by
elevation and azimuth. In the case of two AoA Locator, the three-dimensional coordinates of
the tag can be known.
                                            (︂       )︂       (︂      )︂
                                               𝑒×𝜋               𝑎×𝜋
                              𝑥 = ℎ × tan               × cos                                 (3)
                                                180               180
                                            (︂       )︂       (︂      )︂
                                               𝑒×𝜋               𝑎×𝜋
                              𝑦 = ℎ × tan               × sin                                 (4)
                                                180               180
  , where x and y are tag location points. The h is the height of the AoA locator relative to the
tag plane. The e is the elevation. The a is the azimuth [12].


4. Mean Optimization Filter Design
The Kalman filter is one of the most important and common estimation algorithms. The Kalman
filter produces estimates of hidden variables based on inaccurate and uncertain measurements
[13]. ME is the unfiltered elevation. MA is the unfiltered azimuth. KE is the elevation after
using Kalman filter. KA is the azimuth after using Kalman filter.
    Figure 5 shows the data of ME, MA, KE, and KA in time series at the same location point are
unstable. The collection time is 3 seconds. The x-axis represents the index of data that is the
time of measurement. The y-axis represents the angle. Figure 5 shows the fluctuation amplitude
of KE and KA is small. The fluctuation amplitude of MA is the largest. Figure 5 shows that KA
has a good filtering effect and can filter the noise in ME. Not only that, for ME, the filtering
Figure 4: Calculating a tag location point using elevation and azimuth [12]




Figure 5: The data of ME, MA, KE, and KA in time series [14]


effect of KE is also good. Figure 5 shows that the Kalman filter can remove the noise effectively.
However, in our actual tests, the localization results of the Kalman filter are very unstable.
   Figure 6 shows the errors of the localization results calculated by Eq.3 and Eq.4, using ME, MA,
KE, and KA. The x-axis represents the index of data that is the time of measurement. The y-axis
represents accuracy (meter). Figure 6 shows that the error exhibits a random phenomenon and
cannot always be minimized. This is the problem caused by the Kalman filter.
   Figure 7 shows the ME and MA collected at the same location point for 10 seconds. The data
Figure 6: Positioning error of a location point after using Kalman filter


points marked by red circles in Figure 7 are outliers. The x-axis represents the index of data
that is the time of measurement. The y-axis represents the angle. Figure 7 shows that there are
many anomalies in the data. The descriptive statistical analysis of ME and MA shows many
anomalies in ME and MA with abrupt decreasing values. Also, many outliers with a value of 89
degree are found in ME, and many outliers with a value of 359 degree are found in MA. It is
worth noting that the range of elevation is 0 degree to 90 degree, and the range of azimuth is 0
degree to 360 degree.




Figure 7: Examples of anomalies for ME and MA


  ME and MA belong to time series data. In this paper, a test is performed using a method
specifically designed to find outliers in time series data, which is named the generalized (Extreme
Studentized Deviate) ESD test [15]. It detects one or more outliers in a univariate data set. Given
the upper bound, r, the generalized ESD test essentially performs r separate tests: a test for one
outlier, a test for two outliers, and so on up to r outliers.
   Figure 8 and Figure 9 show the results of anomaly identification for ME and MA data at a
location point using the ESD method. The x-axis represents the index of data that is the time of
measurement. The y-axis represents the angle. The points marked in red in Figure 8 and Figure
9 are the outliers identified by the ESD method. Figure 9 shows that all low-value outliers are
correctly identified, but high value outliers such as 89 degree in ME and 359 degree in MA
are not correctly identified. In addition, when these anomalies appear at fixed intervals, ESD
considers them as normal points and cannot effectively perform anomaly recognition. This is
the problem of ESD.




Figure 8: Identification of anomalies in ME by ESD




Figure 9: Identifying the anomalies of MA by ESD


   The mean optimization filter algorithm process is shown in Figure 10. In the first step, the set
of angles is obtained as A. In the second step, the anomalies in A are identified by the box plot
method, and the anomalous data are removed. In the third step, the average of A is calculated
as the optimal average. Step 4, generate all possible intervals of A as R. Step 5, calculate the set
of interval length of each interval in R as N. Step 6, sort N in ascending order according to the
magnitude of interval length. Step 7, check whether the interval contains the optimal average
according to the order of N. If the current interval contains the optimal average, the interval
is chosen. Otherwise, check the next interval. Step 8, calculate 𝑃𝑟𝑖𝑔ℎ𝑡 and 𝑃𝑙𝑒𝑓 𝑡 according
to the optimal average. Step 9, calculate 𝐶𝑟𝑖𝑔ℎ𝑡 and 𝐶𝑙𝑒𝑓 𝑡 corresponding to 𝑃𝑟𝑖𝑔ℎ𝑡 and 𝑃𝑙𝑒𝑓 𝑡
respectively. Step 10, if 𝐶𝑟𝑖𝑔ℎ𝑡 is greater than 𝐶𝑙𝑒𝑓 𝑡 , the left interval of the chosen interval is the
current optimal average. If 𝐶𝑟𝑖𝑔ℎ𝑡 is smaller than 𝐶𝑙𝑒𝑓 𝑡 , the right interval of the chosen interval
is the current the optimal average. Step 11, the average of the new interval is updated to the
optimal average. Step 12, if the optimal average does not change, the current optimal average is
output. Otherwise, return to step 8.




Figure 10: The procedure of mean optimization filter algorithm


  A box plot is a method of illustrating the locality, spread, and skewness of numerical data
through their quartiles in descriptive statistics [15]. Also, the box plot method can be applied to
outlier detection.
  The dataset needs to be sorted in ascending order. One-quarter of the ordered data set is
represented by the first quartile (Q1). The third quartile (Q3) represents three-quarters of the
data set. This paper’s Q1 and Q3 are 25th percentile and 63rd percentile, respectively. The 63rd
percentile is set based on the observed distribution of outliers for ME and MA. An interquartile
range, or IQR, can be determined by subtracting the first quartile value (Q1) from the third
quartile value (Q3). The IQR is shown in Eq.5 [16].

                                        𝐼𝑄𝑅 = 𝑄3 − 𝑄1                                             (5)
  In this paper, the upper bound and lower bound are calculated to identify the anomalies in
the data set. The upper bound and lower bound are shown in Eq.6 and Eq.7, respectively.

                                     𝑈 𝑃 = 𝑄3 + 𝐶1 × 𝐼𝑄𝑅                                          (6)


                                    𝐿𝑂𝑊 = 𝑄1 − 𝐶2 × 𝐼𝑄𝑅                                           (7)
   In this paper, the values of 𝐶1 and 𝐶2 are finally determined through a comparative analysis
of experimental data. In this paper, 𝐶1 is 0, and 𝐶2 is 0.5. Any data point in the dataset that is
larger than the upper bound or smaller than the lower bound is considered an outlier.
   To find the optimal elevation and azimuth in the data set, a mean optimization filter is
proposed in this paper. The box plot method is used to identify the anomalies. The anomalies
greater than the upper and lower bound are removed from the data set. Due to noise, the ME
and MA change with time in the case of the same location point. Then finding the optimal
elevation and azimuth in ME and MA becomes the goal of this paper. As shown in Eq.8, A is
the unduplicated angle dataset after filtering out the outliers.

                                     𝐴 = [𝐴1 , 𝐴2 , 𝐴3 . . . . . . , 𝐴𝑛 ]                           (8)
   , where 𝐴𝑛 represents the 𝑛𝑡ℎ angle. Interval is the difference between two angles in A. Two
different angles can form each interval in order to find the optimal average, all possible intervals
in A need to be generated, as shown in Eq.9.

                     𝑅 = [(𝐴1 , 𝐴2 ) , (𝐴1 , 𝐴3 ) , (𝐴2 , 𝐴3 ) . . . . . . , (𝐴𝑛−1 , 𝐴𝑛 )]          (9)
   , where R is the set of all possible intervals of A. Each interval length needs to be calculated,
as shown in Eq.10.

                 𝑁 = [|𝐴1 − 𝐴2 | , | 𝐴1 − 𝐴3 ] , |𝐴2 − 𝐴3 | . . . . . . , |𝐴𝑛−1 − 𝐴𝑛 |]           (10)
   , where N is the set of interval length for each interval. |𝐴𝑟 – 𝐴𝑠 | denotes the interval length
between 𝐴𝑟 and 𝐴𝑠 . In N, each interval length is sorted in ascending order. The core idea
of this paper is to determine the optimal average by repetitively narrowing the range of the
interval. The average of A is called the optimal average (Average). The optimal average is
updated repetitively in the next step. The following steps aim to narrow the interval to find the
optimal average. This paper considers the decision basis of distinguishing the data points to the
left and right of the optimal average as one of them.

                                   𝑃right = {𝐴𝑘 | 𝐴𝑘 > Average }                                  (11)


                                    𝑃𝑙𝑒𝑓 𝑡 = {𝐴𝑙 | 𝐴𝑙 < Average }                                 (12)
   , where 𝑃𝑟𝑖𝑔ℎ𝑡 is the set of angles greater than Average, and 𝑃𝑙𝑒𝑓 𝑡 is the set of angles less than
Average. To find the optimal average more accurately, this paper uses the standard deviation
between 𝐴𝑖 and Average as one of the decision bases to find it. C is the criterion to divide A
into two sets in order to find a subset in which more optimal average may exist.
                                                         1
                                        𝐶 = √︁ ∑︀                                                 (13)
                                                     (𝐴𝑖 − Average )2
                                                           𝑁

   , where C is the inverse of the standard deviation. N is the size of [𝐴, 𝐴2 , 𝐴3 ........, 𝐴𝑖 ]. 𝐴𝑖
is the 𝑖𝑡ℎ angle. The larger C means that 𝐴𝑛 is closer to Average. Then the interval closer to
Average is used to find the optimal average.
   To further introduce our proposed MOF, this paper illustrates how the proposed method
works through an example in Figure 11 and Figure 12. As shown in Figure 11, we assume that
A is a set of 𝐴1 , 𝐴2 , and 𝐴3 and takes values from 0 to 360 degrees. Average is calculated from
A. R is a set of (𝐴1 , 𝐴2 ), (𝐴1 , 𝐴3 ), and (𝐴2 , 𝐴3 ), denoted as the example by Interval 1, Interval
2, and Interval 3, respectively. Each interval length needs to be calculated. The interval length
1, interval length 2, and interval length 3 form N. In the next step, R is sorted by N in ascending
order. Starting from the first interval in N, this paper determines whether the current interval
contains an Average, if so, the current interval is used to find the optimal average; if not, start to
determine the next interval.




Figure 11: Process of determining the shortest interval


   Figure 12 illustrates the process of determining the optimal average. This paper assumes
that Interval 1(𝐴1 , 𝐴2 ) contains the optimal average. In the next step, the data points to the
left and right of the Average need to be identified. In the Figure 12, 𝑃𝑟𝑖𝑔ℎ𝑡 is 𝐴2 ,𝐴3 , and 𝑃𝑙𝑒𝑓 𝑡
is 𝐴1 . Calculate the 𝐶𝑟𝑖𝑔ℎ𝑡 and 𝐶𝑙𝑒𝑓 𝑡 corresponding to 𝑃𝑟𝑖𝑔ℎ𝑡 and 𝑃𝑙𝑒𝑓 𝑡 respectively by Eq.13.
In Figure 12, 𝐶𝑟𝑖𝑔ℎ𝑡 is larger than 𝐶𝑙𝑒𝑓 𝑡 . Therefore, the left interval of (𝐴1 , 𝐴2 ) becomes the
current Average(M), and the right interval is 𝐴2 . The optimal average is updated to the average
of M and 𝐴2 . This cycle is repeated until the optimal average does not change.


5. Performance Evaluation
HANNARA is a Korea Maritime and Ocean University student training ship. Figure 13 depicts
the layout of the HANNARA ship’s student living quarters. The purpose of showing a plan of the
HANNARA is that the ship environment is similar to that of a cruise ship, and there are enough
persons on board as well. From Figure 13, the ship space is narrow and the multipath effect can
be more intense in the ship indoor environment. Compared with the indoor environment on
land, the spatial distribution structure of the ship’s interior can make the received data contain
more noise. The indoor positioning techniques studied for the ship environment can also be
used for other indoor environments [17].
   In order to avoid the risk of COVID-19 infection to students on HANNARA, a classroom with
a similar structure to one of the cabins on HANNARA is found as an experimental environment
Figure 12: Process for determining the optimal average




Figure 13: The floor plan of main deck in the HANNARA ship [17]


in the room. Meanwhile, the classroom tables and chairs can reflect signals. Therefore, the
indoor environment of the classroom is similar to that of a ship. We plan to conduct testing in
the ship environment after the risk of COVID-19 infection is minimized. Figure 14 shows the
experimental environment of this paper. A classroom of 7.6 m in length and 7.85 m in width
is chosen for testing. This paper uses a USB cable to transfer data from the AoA Locator to a
python program on the computer to do location points calculations. Because h is the height of
the AoA locator relative to the tag plane. In this paper, h is set to 1.5 m.




Figure 14: Experiment environment [14]


  Figure 15 shows the AoA Locator used in this paper. The AoA Locator has 12 antennas. The
Bluetooth signal from the tag can be received from all directions by AoA Locator. It is able to
calculate the location point of the tag by using one AoA Locator. The AoA Locator uses Nordic
Semiconductor’s nRF52833 chip [16]. The following is the experimental environment for this
paper: CPU is AMD Ryzen 7 5700G (3.8GHz), RAM is 32 GB, OS is Windows 11 21H2, Visual
Studio Code version is 1.61.2, Python version is 3.8. The number of ME and MA is 75 collected
on user locations in 10 seconds.




Figure 15: AoA Locator [14]


  To test the AoA indoor positioning accuracy, 9 user location points are randomly chosen.
Figure 16 shows the distribution of the AoA Locator and 9 user location points (Tag). The red
dots represent the location point of the AoA Locator [14].
  This paper compares five different filters. They are Box Plot-Remove, Box Plot-Modify, KF,
Figure 16: Distribution of user location points (Tag)


ESD-Remove, and ESD-Modify. Box Plot-Remove that removes the outlier after identifying
it with the box plot method. KF is Kalman filter. ESD-Remove that removes anomalies after
identifying them by ESD method. ESD-Modify those correct anomalies with low values after
identifying them by ESD method. The correction method is 90 minus angle for elevation and
360 minus angle for azimuth. “-E” is elevation. “-A” is azimuth.
    Figure 17 shows the filtering effect of different filters combined with MOF on the elevation of
user location point 9. The x-axis represents the index of data that is the time of measurement.
The y-axis represents the angle. Elevation-Real is the real elevation. The filtering effect of
KF-E presents a random characteristic, which is not stable close to the real elevation. Box
Plot-Modify-E, KF-E, ESD-Remove-E, and ESD-Modify-E all show a tendency to move away
from the true elevation and eventually reach a fixed value. Box Plot-Remove-E has the best
filtering effect, gradually moving closer to the true elevation and eventually reaching a fixed
value.




Figure 17: Calculation results of different filters for elevation (user location point 9)
   Figure 18 shows the filtering effect of different filters combined with MOF for azimuth at user
location point 9. The x-axis represents the index of data that is the time of measurement. The
y-axis represents the angle. Azimuth-Real is the real azimuth. Meanwhile, the filtering effect of
KF-A shows a random characteristic. And the filtered result is farthest from the real azimuth.
Box Plot-Modify-A and ESD-Remove-A first gradually approach the real azimuth and then
stabilize. Box Plot-Remove-A and ESD-Modify-A have the same filtering effect, first passing
through the real azimuth and finally reaching a fixed value. In this case, Box Plot-Remove-A
and ESD-Modify-A have the best result.




Figure 18: Computational effect of different filters on azimuth (user location point 9)


   Figure 19 shows the indoor positioning accuracy using MOF with different filters. The x-axis
represents the user location point and the y-axis represents the accuracy. Figure 19 shows that
the Box Plot-Remove combined with MOF for user location point 1, 2, 4, 6, 8 and 9 has greatly
improved the indoor positioning accuracy. The improvement in indoor positioning accuracy
at user location point 3 and user location point 7 is not obvious. There is no contribution to
the localization accuracy improvement at user location point 5. We think that Q1 and Q3 need
to be further optimized to exclude outliers as much as possible to further improve the outlier
identification. Overall, the Box Plot-Remove combined with MOF method has greatly improved
the localization accuracy.
   Based on the results shown in Figure 17 and Figure 18, this paper finally adopts the Box
Plot-Remove method for the anomalies. As shown in Figure 16, ME and MA from AoA Locator
are collected at 9 user location points. The anomalies of ME and MA are identified by the
Box Plot-Remove method. The optimal average of ME and MA is calculated using MOF. Its
calculation results are combined with Eq.3 and Eq.4 to calculate x and y. The RMSE (Root-
mean-square error) is calculated by comparing the true x and y. The RMSE of Box Plot-Remove
is 0.34 m. The RMSE of Box Plot-Modify is 0.55 m. The RMSE of KF is 0.61 m. The RMSE of
ESD-Remove is 0.42 m. The RMSE of ESD-Modify is 0.56 m. Among them, Box Plot-Remove
combined with MOF gives the best results.
Figure 19: Indoor positioning accuracy using MOF with different filters


6. Conclusion
The narrow space in the ship environment increases the multipath effect. Elevation and azimuth
are the two most important parameters in Bluetooth 5.1 AoA indoor positioning algorithm, and
the inaccuracy of elevation and azimuth can increase the indoor positioning error dramatically.
In order to find the most accurate elevation and azimuth, this paper proposes a MOF to determine
the optimal elevation and azimuth in ship environments. The shortest interval of true elevation
and azimuth is determined by calculating the average. Finally, the optimal elevation and azimuth
are determined by continuously narrowing the range of the shortest interval. The experiment is
conducted in a classroom with a similar structure to a HANNARA ship cabin. The AoA Locator
of Nordic Semiconductor’s nRF52833 chip is used. Five different filters is combined with MOF
are tested on 9 user location points. The final results show that Box Plot-Remove is combined
with MOF has the highest accuracy with an RMSE of 0.34 m. The indoor positioning accuracy
is effectively improved. We plan to conduct testing in the ship environment after the risk of
COVID-19 infection is minimized.


Acknowledgments
This research was supported by Basic Science Research Program through the National Re-
search Foundation of Korea (NRF) funded by the Ministry of Education (grant number:
2021R1I1A3056125).


References
 [1] N. Klein, International law perspectives on cruise ships and covid-19, Journal of interna-
     tional humanitarian legal studies 11 (2020) 282–294.
 [2] B. Batista, D. Dickenson, K. Gurski, M. Kebe, N. Rankin, Minimizing disease spread on a
     quarantined cruise ship: A model of covid-19 with asymptomatic infections, Mathematical
     biosciences 329 (2020) 108442.
 [3] E. Fanoy, A. E. Ummels, V. Schokkenbroek, B. van Dijk, S. Wiegmans, T. Veenstra, A. A.
     van der Eijk, R. S. Sikkema, A. de Raad, Outbreak of covid-19 on an industrial ship,
     International Maritime Health 72 (2021) 87–92.
 [4] G. Pau, F. Arena, Y. E. Gebremariam, I. You, Bluetooth 5.1: An analysis of direction finding
     capability for high-precision location services, Sensors 21 (2021) 3589.
 [5] C. Huang, Y. Zhuang, H. Liu, J. Li, W. Wang, A performance evaluation framework for
     direction finding using ble aoa/aod receivers, IEEE Internet of Things Journal 8 (2020)
     3331–3345.
 [6] A. Koutris, T. Siozos, Y. Kopsinis, A. Pikrakis, T. Merk, M. Mahlig, S. Papaharalabos,
     P. Karlsson, Deep learning-based indoor localization using multi-view ble signal, Sensors
     22 (2022) 2759.
 [7] F. A. Toasa, L. Tello-Oquendo, C. R. Peńafiel-Ojeda, G. Cuzco, Experimental demonstration
     for indoor localization based on aoa of bluetooth 5.1 using software defined radio, in: 2021
     IEEE 18th Annual Consumer Communications & Networking Conference (CCNC), IEEE,
     2021, pp. 1–4.
 [8] X. Qiu, B. Wang, J. Wang, Y. Shen, Aoa-based ble localization with carrier frequency offset
     mitigation, in: 2020 IEEE International Conference on Communications Workshops (ICC
     Workshops), IEEE, 2020, pp. 1–5.
 [9] N. Paulino, L. M. Pessoa, A. Branquinho, E. Gonçalves, Evaluating a novel bluetooth 5.1
     aoa approach for low-cost indoor vehicle tracking via simulation, in: 2021 Joint European
     Conference on Networks and Communications & 6G Summit (EuCNC/6G Summit), IEEE,
     2021, pp. 259–264.
[10] Z. Hajiakhondi-Meybodi, M. Salimibeni, A. Mohammadi, K. N. Plataniotis, Bluetooth
     low energy-based angle of arrival estimation in presence of rayleigh fading, in: 2020
     IEEE International Conference on Systems, Man, and Cybernetics (SMC), IEEE, 2020, pp.
     3395–3400.
[11] S. Monfared, A. Delepaut, M. Van Eeckhaute, P. De Doncker, F. Horlin, Iterative localization
     method using aoa for iot sensor networks, in: 2019 IEEE 89th Vehicular Technology
     Conference (VTC2019-Spring), IEEE, 2019, pp. 1–6.
[12] N. Semiconductor, nwp036 - direction finding, 2022. URL: https://infocenter.nordicsemi.
     com/index.jsp?topic=%2Fnwp_036%2FWP%2Fnwp_036%2Fintro.html.
[13] H. Wood, N. Johnson, M. Sachdev, Kalman filtering applied to power system measurements
     relaying, IEEE Transactions on Power Apparatus and Systems (1985) 3565–3573.
[14] H. Shin, Q. Lin, J. Son, An analysis of the accuracy of bluetooth 5.1-based aoa indoor
     positioning algorithms for ship passengers’ health, in: 2022 Korea Multimedia Society
     Conference, Korea Multimedia Society, 2022, pp. 1–4.
[15] B. Rosner, Percentage points for a generalized esd many-outlier procedure, Technometrics
     25 (1983) 165–172.
[16] F. Hartwig, B. E. Dearing, Exploratory data analysis, 16, Sage, 1979.
[17] Q. Lin, J. Son, Analysis of bluetooth rssi for proximity detection of ship passengers, Applied
     Sciences 12 (2022) 517.