You are on page 1of 20

sensors

Article
Queuing Time Prediction Using WiFi Positioning
Data in an Indoor Scenario
Hua Shu 1,2 , Ci Song 1 , Tao Pei 1, *, Lianming Xu 3 , Yang Ou 3 , Libin Zhang 4 and Tao Li 4
1 State Key Laboratory of Resources and Environmental Information System,
Institute of Geographic Sciences and Natural Resources Research, CAS, Beijing 100101, China;
shuh@lreis.ac.cn (H.S.); songc@lreis.ac.cn (C.S.)
2 University of Chinese Academy of Sciences, Beijing 100049, China
3 RTmap Science and Technology Ltd., Beijing 100093, China; xulianming@rtmap.com (L.X.);
ouyang@rtmap.com (Y.O.)
4 Information Technology Department, Beijing Capital International Airport Co., Ltd., Beijing 100621, China;
zhanglb@bcia.com.cn (L.Z.); lit2@bcia.com.cn (T.L.)
* Correspondence: peit@lreis.ac.cn; Tel.: +86-10-6488-8960

Academic Editor: Fan Ye


Received: 19 July 2016; Accepted: 16 November 2016; Published: 22 November 2016

Abstract: Queuing is common in urban public places. Automatically monitoring and predicting
queuing time can not only help individuals to reduce their wait time and alleviate anxiety but also
help managers to allocate resources more efficiently and enhance their ability to address emergencies.
This paper proposes a novel method to estimate and predict queuing time in indoor environments
based on WiFi positioning data. First, we use a series of parameters to identify the trajectories that can
be used as representatives of queuing time. Next, we divide the day into equal time slices and estimate
individuals’ average queuing time during specific time slices. Finally, we build a nonstandard
autoregressive (NAR) model trained using the previous day’s WiFi estimation results and actual
queuing time to predict the queuing time in the upcoming time slice. A case study comparing two
other time series analysis models shows that the NAR model has better precision. Random topological
errors caused by the drift phenomenon of WiFi positioning technology (locations determined by
a WiFi positioning system may drift accidently) and systematic topological errors caused by the
positioning system are the main factors that affect the estimation precision. Therefore, we optimize
the deployment strategy during the positioning system deployment phase and propose a drift ratio
parameter pertaining to the trajectory screening phase to alleviate the impact of topological errors
and improve estimates. The WiFi positioning data from an eight-day case study conducted at the
T3-C entrance of Beijing Capital International Airport show that the mean absolute estimation error
is 147 s, which is approximately 26.92% of the actual queuing time. For predictions using the NAR
model, the proportion is approximately 27.49%. The theoretical predictions and the empirical case
study indicate that the NAR model is an effective method to estimate and predict queuing time in
indoor public areas.

Keywords: indoor queuing time; WiFi positioning; trajectory; mobile; time series analysis

1. Introduction
Queuing is a pervasive phenomenon in urban public places, such as supermarkets, restaurants,
banks, transportation terminals and amusement parks [1]. Long-duration queuing reflects the
imbalance between the supply and demand of public services, which not only takes up many
individuals’ time and leads to negative experiences but also burdens management and reduces the
capacity of such services. Furthermore, research has shown that, in addition to the length of waiting
time [2], an important factor affecting individuals’ service satisfaction is whether the waiting time is

Sensors 2016, 16, 1958; doi:10.3390/s16111958 www.mdpi.com/journal/sensors


Sensors 2016, 16, 1958 2 of 20

foreseeable [3]. The ability to estimate and predict queuing time reduces the queuing time through
self-planning and relieve anxiety. Moreover, it promotes the responsible use of public resources and
enhances the level of management and public security. Therefore, real-time queuing time measurement
and prediction in public places is of significant importance to the community.
Automatic queue-monitoring techniques are fundamental to real-time queuing time measurement
and prediction. In this study, we focus on queuing time in indoor public areas. The indoor
queuing activity monitoring technologies used in previous studies mainly include video surveillance,
radio frequency identification (RFID), Bluetooth, accelerometers, and WiFi (wireless fidelity),
which will be briefly introduced below.

• Video Surveillance. By employing video content analytics to detect the number of people queuing
and to estimate the time needed to leave the queue [4–6], the queuing time of an individual who
is just entering a queue can be estimated [7] using the following equation:
Z ∞  Z ∞ 
Tavg ≈ xp N ( x )dx sps (s)ds (1)
0 0

where p N ( x ) is the density function of the number of people in the queue, and ps (s) is the density
function of service time. However, video surveillance may compromise individual privacy, and in
large-scale areas where the number of people queuing is large and the queue structure is complex,
people counting may have poor accuracy.
• Radio Frequency Identification (RFID). By using the protocol for communication between user
tags and fixed readers near the counter [8]), RFID readers can detect the existence of nearby
tags. The queuing parameters can be tracked based on the number of detected tags and signal
strength [9]. However, RFID is not a commonly used technology, so extra hardware and
individuals’ active participation are required, which may not be accepted by managers and users.
• Bluetooth. An individual’s position with time stamps can be acquired using Bluetooth
localization [10,11] with positioning methods such as proximity, trilateration, and fingerprinting.
Then, the queue entry and exit times [12] can be determined based on the relationship between
a queue process and a spatial location to estimate the queuing time. Queuing time estimation
using Bluetooth is highly accurate. However, special equipment is needed to detect the Bluetooth
signals from the users’ mobile devices.
• Accelerometer. The accelerometers built into mobile devices can be used to record a user’s
continuous movement [13] (based on acceleration parameters). An individual’s movement while
queuing is essentially standing-walking-standing [14], which is reflected by fluctuation in the
acceleration curve. Using pattern recognition [15], the queuing period can be determined based
on moving status; thus, queuing time be calculated. However, users must install an application
on their mobile device to continuously upload their moving status data.
All of the techniques mentioned above can be used to monitor queuing activity and automatically
estimate queuing parameters. However, in practice, these techniques have three main deficiencies:
they require extra equipment to track queuing activity, they require active participation, and they
may compromise individuals’ privacy.
• WiFi. WiFi is mainly used for wireless Internet access equipment in public places and
private homes. In addition to the communication function, WiFi is widely used in indoor
navigation [16,17], targeted advertisements [18,19], and behavior analysis [20,21]. However,
little research has been conducted on the use of WiFi for queuing time monitoring. This technique
overcomes the disadvantages of other approaches. In previous studies, users were required
to install an app on their mobile device to communicate signal information with the backend.
WiFi queuing time monitoring methods can be divided into two categories: (1) signal threshold
judgment; and (2) signal feature analysis.
Sensors 2016, 16, 1958 3 of 20

1.1. Signal Threshold Judgment


Each WiFi access point (AP) has a unique broadcast service set identifier (BSSID). An AP generates
beacons to broadcast its existence. If a mobile device enters the signal transmitting range of an AP and
the signal strength exceeds a certain threshold, it will track the beacons of an AP located in a specific
indoor location, and the user is considered to have commenced queuing in this location. When the
beacons are no longer being tracked by the mobile device, the user’s queuing process has come to an
end. Thus, the queuing time of a user is estimated based on time stamps that indicate when the beacon
tracking by the mobile device begins and ends. Because the continuous presence of WiFi sensing
beacons consumes energy, location sensing and behavior analysis from other technologies can be used
to (de)activate the sensing process [15,22]. Although this approach only requires WiFi and a mobile
device to monitor queuing time, the spatial resolution is too coarse to accurately determine the entry
and exit time of a queue.

1.2. Signal Feature Analysis


A typical service process represented on the time—received signal strength (RSS) curve can be
divided into three phases: the queuing phase, the service phase and the leaving phase. To track
queuing, we can deploy a WiFi monitor near the queue start and destination. The WiFi monitor can
record the RSS of an individual’s mobile device. From this measurement, the time-signal intensity
curve can be derived. RSS usually decreases with increasing distance from a mobile device to the WiFi
monitor. As the people queuing move toward the counter, the signal strength increases. During the
service period, the signal strength tends to be the strongest and remains stable. When the service is
complete and people leave, the signal strength drops off dramatically. Thus, the queuing time and
service time can be determined from the signal strength [23–25]. The advantage of this method is
that it requires only one WiFi monitor to act as an active sensor and the service time can be estimated
accurately. However, this method has difficulty recognizing the starting time of a queue, and it requires
users to install an app on their mobile devices to improve the frequency of sending data packets to
WiFi APs to produce detailed time-signal strength curves.
Compared with previous WiFi-based solutions for detecting queuing time, WiFi positioning
technology that captures people’s locations with time stamps has become the state-of-the-art for
queuing time estimation and prediction in indoor scenarios. However, most application scenarios
are restricted by site-specific environmental, security and management requirements, so the number
and deployment locations of APs are often limited. Thus, the positioning accuracy usually cannot be
optimized, and sometimes may be quite poor. Therefore, in our research, we propose a method that
uses topological relation (contained or disjoint) judgment between WiFi positioning locations and the
queue zone to estimate individuals’ queuing time, that is, during the positioning system deployment
phase, we give priority to the topological correctness of positioning (the topological relation between an
individual’s positioning location and the queue zone remains consistent with their current topological
relation) rather than its accuracy. To achieve this, three principles are followed: (1) some of the APs
in a queue zone are deployed close to and surrounding the border of the queue zone; (2) the signals
of the border APs must be directed toward the inside of the queue zone; and (3) APs outside the
queue zone must not be too close to the border of the queue zone and have relatively low signal
strength. Using these principles, we can obtain reliable topological accuracy, and the queuing time can
be determined by WiFi positioning data with acceptable precision.
For queuing time prediction, time series analysis, queue theory and traffic flow theory are
common. Time series uses mathematical methods to extract the trends, seasonality and other
features of a data sequence; or to smooth the data sequence by combining information from present
and previous observations. Previous studies have shown that exponential smoothing [22,26,27],
Holt-Winters [22,28,29] and seasonal trend decomposition based on loess (STL [30–32]) can achieve
good accuracy for queuing time forecasting. Queue theory [33,34] and traffic flow theory [35,36] use
statistical and physical models to estimate queuing parameters or to model the traffic flow process and
Sensors 2016, 16, 1958 4 of 20

predict future queuing parameters. However, they are not applicable in this work, because parameters
such as speed, density, and flow in traffic flow theory and queue discipline, arrival rate, and service
rate in queue theory are required to model the queuing process, while the collected data are spatial
location data with time stamps [22], from which these parameters are difficult to obtain.
The advantages of our method using WiFi positioning data to estimate and predict queuing time
in indoor scenarios are as follows:

(1) The method for estimating the queuing time from topological relation judgment between
individuals’ trajectories and the queue zone is robust in realistic application scenarios.
(2) No special sensors are needed to track people’s queuing activity, because WiFi and mobile devices
are ubiquitous in modern life.
(3) Users are passive because no active cooperation is required and no additional apps need to be
installed on their mobile devices.
(4) No consideration for the length or shape of the queue is required because queuing time only
depends on the time stamps when an individual enters and leaves a queue zone.

The remainder of this paper is organized as follows. In the following section, we provide an
overview of WiFi positioning technology, and introduce how to deploy the positioning system and
determine queuing time using positioning data. Then, we explain the prediction models (i.e., NAR,
Holt-Winters, and STL-ARIMA) based on time series analysis theory. Next, we validate our positioning
precision and estimation model in a real indoor scenario, and present a case study conducted at the
T3-C entrance (one entrance of Terminal T3) of the Beijing Capital International Airport. We then
discuss the practicability of this research and factors that affect the accuracy of the estimation and
prediction results. Finally, we present our conclusions and suggest areas for future work.

2. Theory and Methodological Framework


The queuing time prediction method in this research includes two main parts, i.e., hardware
deployment and the algorithm. In the hardware deployment part, in consideration of the high
maneuverability and portability, we use a trilateration method instead of fingerprinting (fingerprinting
has relatively high positioning accuracy but it is hard to establish fingerprint databases in large or
crowded public places and it is difficult to upgrade the system [37]). In order that the spatial topology
relation between spatial locations and a queue zone can be used for queuing time determination,
we installed metal baffle plates for the border APs to improve the topological correctness. To identify
relatively reliable samples as representatives to estimate queuing time, in the algorithmic part,
we set four parameters in the estimation model. As our estimation results did not show obvious
periodic features and consistent trends, we used a nonstandard autoregressive (NAR) model without
considering the seasonality for prediction. To enable comparison with methods considering seasonality
and trends in previous queuing time prediction studies, two other models in time series analysis
(i.e., Holt-Winters and STL-ARIMA) are also tested.

2.1. WiFi Positioning Technology


In addition to communication functions [38], WiFi is used as a location service based on indoor
positioning techniques, which compensates for the shortcomings of GPS positioning, whose signal
is too weak to be received indoors. There are three broad classes of location techniques that are
used for WiFi positioning—triangulation, fingerprinting and proximity [39,40]. In this paper, we use
trilateration, which is a triangulation technique, to track individuals’ locations. The key of this
approach lies in the measurement of distances between target mobile devices and APs using radio
waves. The radio wave propagation model is given as follows [17,41]):
 
Pr (d) = Pr (d0 ) − 10α log d/d0 + ξ (2)
Sensors 2016, 16, 1958 5 of 20

Sensors 2016, 16, 1958 5 of 21


where Pr (d) is the signal strength received by the mobile device at distance d from the AP, d0 is a
known ( ) isfrom
wheredistance the signal strength
the AP, α is thereceived by the loss
propagation mobile device at and
coefficient, distance from thevariable
ξ is a random AP, is a is
that
known distance from the AP, is the propagation loss coefficient, and is a random variable that
unrelated to the propagation distance.
is unrelated to the propagation distance.
Figure 1 shows the location method of trilateration. The locations of the APs are represented by
Figure 1 shows the location method of trilateration. The locations of the APs are represented by
points A, B and C, of which the coordinates are measured in advance. The distances from the location
points A, B and C, of which the coordinates are measured in advance. The distances from the
of the target device (O) to the APs are represented by r1 , r2 and r3 , which can be measured using the
location of the target device (O) to the APs are represented by , and , which can be measured
propagation model (model 1). Then, the coordinates of the target device are calculated using the least
using the propagation model (model 1). Then, the coordinates of the target device are calculated
squares
using algorithm [42]. algorithm [42].
the least squares

Figure 1. Theoretical map of the trilateration positioning method.


Figure 1. Theoretical map of the trilateration positioning method.

2.2. Hardware Deployment Principles


2.2. Hardware Deployment Principles
To guarantee topological correctness, as mentioned in Section 1, during the hardware
To guarantee topological correctness, as mentioned in Section 1, during the hardware deployment
deployment phase, three principles must be followed. For the first principle, according to reference
phase, three principles must be followed. For the first principle, according to reference [43], the signal
[43], the signal strength error is greater when mobile devices are too far from the APs, resulting in
strength error is greater when mobile devices are too far from the APs, resulting in increased positioning
increased positioning error. The positioning error near the inside border of a queue zone is the main
error.
factorThethatpositioning error near
affects topological the inside
correctness. border aoffeasible
Therefore, a queue zone isis the
solution main that
to ensure factor thatofaffects
some the
topological
APs inside correctness.
the queue zoneTherefore, a feasible
are deployed solution
close to and is to ensure thatthe
surrounding some of the
border. ForAPsthe inside
secondthe
queue zone are
principle, as deployed
the locationclose
fromto and
our surrounding the border.
positioning algorithm is For the second
calculated by atprinciple, as the
least three APslocation
that
from our positioning
provide the strongestalgorithm
signal, weisadjust
calculated by at least
the direction three
of the APs that
antennas provide
and place thebaffle
metal strongest
platessignal,
for
wetheadjust
borderthe APs
direction of the
to reduce antennas
the and place
signal strength on metal baffleof
the outside plates for thezone.
the queue border APswhen
Thus, to reduce
a userthe
signal
stepsstrength
outside theon the
queueoutside
zone, ofhisthe queue
(her) devicezone.
will Thus,
receivewhen
weakasignal
user steps
from theoutside
bordertheAPsqueue zone,
and his
his(her)
(her)position
device iswill receive
more likelyweak
to be signal
locatedfrom the the
outside border
queueAPs andFor
zone. histhe
(her) position
third is more
principle, a userlikely
near to
be the insideoutside
located border the
of aqueue
queue zone.
zone mustFor theremain
thirdforprinciple,
a relatively long near
a user time the
to wait his border
inside (her) turnof rather
a queue
than
zone muststayremain
near the
for outside border
a relatively longwhile
timerapidly
to waitleaving.
his (her)To avoid
turn ratherlong-term
than staytopological error
near the outside
(inside-outside error in Section 3.2), a user’s device should receive a relatively
border while rapidly leaving. To avoid long-term topological error (inside-outside error in Section 3.2), low strength signal
from device
a user’s the outside
should APs than athe
receive inside APs
relatively while waiting
low strength insidethe
signal from the queueAPs
outside zone. Therefore,
than the insidetheAPs
outside APs must not be too close to the border of the queue zone [17] and have
while waiting inside the queue zone. Therefore, the outside APs must not be too close to the border of relatively low signal
thestrength.
queue zone [17] and have relatively low signal strength.

2.3.2.3. Queuing
Queuing Time
Time EstimationBased
Estimation Basedon
onPositioning
Positioning Data
Data

ToTo estimate
estimate a crowd’s
a crowd’s average
average queuing
queuing time,
time, thethe optimal
optimal solution
solution is determine
is to to determine
thethe queuing
queuing time
time of each individual. However, the time intervals of the trajectory points from our
of each individual. However, the time intervals of the trajectory points from our passive positioning passive
positioning system range from five seconds to several minutes, which results in incomplete queuing
system range from five seconds to several minutes, which results in incomplete queuing process records.
process records. In addition, the sample errors are not negligible. Therefore, sample reliability
In addition, the sample errors are not negligible. Therefore, sample reliability cannot be neglected,
cannot be neglected, that is, more samples may not produce more accurate results. Therefore, similar
that is, more samples may not produce more accurate results. Therefore, similar to using a buoy to
to using a buoy to estimate the flow velocity of a river reach, a feasible solution is to identify
estimate the flow velocity of a river reach, a feasible solution is to identify relatively reliable samples
relatively reliable samples acting as representatives [14] for queuing time estimation. To achieve this
acting as representatives [14] for queuing time estimation. To achieve this goal, when determining
goal, when determining an individual’s queuing time, four parameters ( , , , and ) of the
antrajectory
individual’s queuing
are used. time, four
In practical parameters
applications, these n, k, and r) need
(m, parameters of thetotrajectory are used. to
be tuned according Inthe
practical
site
Sensors 2016, 16, 1958 6 of 20

applications, these parameters need to be tuned according to the site environment and hardware
deployment. The estimation process is divided into three steps: (1) queuing process recognition;
(2) parameter setting and queuing time determination; and (3) queuing time estimation.

2.3.1. Queuing Process Recognition


To capture the queuing process of an individual using positioning data, we designate in advance
a physical or virtual fence with clear boundaries to serve as the queue zone. An integrated trajectory
for queue process capture can be divided into three parts: trajectory before entering the queue zone,
trajectory in the queue zone and trajectory after leaving the queue zone. The time intervals between
these three parts must be reasonably small. Additionally, the origin and destination points of a
trajectory must be outside of the queue zone and on different sides, and the direction from the origin
to destination must be in accordance with the heading direction of the queue.

2.3.2. Parameter Setting and Queuing Time Determination


The starting and leaving times of a queuing process are the keys to an individual’s queuing time
determination. Topological relations between a queue zone and points on trajectories with time stamps
can help to discern the starting and leaving points of a queue process to estimate the queuing time.
Figure 2 shows the queuing determination process of individuals. As mentioned above, during this
process, four parameters (m, n, k, and r) are used to discern relatively reliable trajectories.
Figure 3 shows a queuing process in the time domain. The first point when an individual enters
the queue zone is regarded as the starting point (point at time t1 ), and the last point before leaving
the queue zone is the leaving point (point at time tn ). The locations of the points at times t1 and tn are
taken as the starting and leaving points because all points before time t1 and after time tn are outside
the queue zone. These adjacent points indicate that the chance that they are drift points from the inside
of queue zone is small. The frequency of packet delivery is affected by the WiFi module status of the
mobile devices (e.g., “on” but not connected to WiFi APs, and “connected” but not using the network
traffic). This is especially the case when the WiFi module is switched on but not connected to the
WiFi APs, the device is only used intermittently, or the device has not been used during the queuing
process. In these cases, the packet delivery frequency may be low and irregular. Thus, the points on
the trajectory will be sparse and uneven. Therefore, the parameters defining the absolute number of
points in each part of the trajectory are set to ensure the trajectory is eligible for analysis, i.e., at least m
points before entering the queue zone, n points after leaving the queue zone and k points from t1 to tn
(including points at times t1 and tn ). Moreover, the locations determined by WiFi positioning may drift
accidently (“drift phenomenon” or “drift weakness” hereafter, e.g., an individual inside a queue zone
having positioning location outside the queue zone), which may lead to topological errors. To alleviate
the impact of inside-outside drift phenomena (refer to Section 3.2), which causes obvious estimation
inaccuracies, a parameter called the drift ratio (r) is required. The trajectory can be used to estimate
the queuing time only if the proportion of drift points (empty circles between t1 and tn in Figure 3)
between time stamps t1 and tn is less than the threshold. For available trajectories, we approximate the
starting and leaving times of a queuing process as (t0 + t1 ) /2 and (tn + tn+1 ) /2, respectively, and the
total queuing time as (tn + tn+1 ) /2 − (t0 + t1 ) /2.
Sensors 2016, 16, 1958 7 of 20
Sensors
Sensors2016,
2016,16,
16,1958
1958 7 7ofof2121

Figure 2. Process flow of the queuing time determination model.


Figure2.2.Process
Figure Processflow
flowof
ofthe
the queuing
queuing time
time determination
determinationmodel.
model.

Figure 3. Queuing sequence of an individual in the time domain.


Figure3.3.Queuing
Figure Queuingsequence
sequence of
of an individual inthe
individual in thetime
timedomain.
domain.
2.3.3. Queuing Time Estimation
2.3.3.
2.3.3. Queuing
Queuing Time
Time Estimation
Estimation
To reflect the queuing time variation over time, one day is divided into equal time slices. Then,
To reflect
individuals’
To reflect the
queuing
the queuing
queuingtimes time variation
are variation
time divided over
into time,slices.
specific
over time, one day
one As is
day is divided
shown into
intoequal
in Figure
divided 4, thetime
equal time
time slices.
of a day
slices.Then,
is
Then,
individuals’
sliced by ∆
individuals’ queuing
. Let times
queuing times
= ( areare divided
+ divided into
)/2 (see specific
intoSection
specific slices.
2.3.2) As
be the
slices. shown in
time when
As shown Figure 4, the
an individual
in Figure time of a
leaves
4, the time day a is
ofthe day
sliced ∆ . Let
byzone; = [( , +
∈ + t∆n+) 1,)/2 (see Sectiontime
2.3.2)ofbethe
the time when is an individual leaves the
queueby
is sliced ∆t. Let if tout = (tn + ) the queuing
/2 (see Section 2.3.2) be theindividual
time when anaggregated
individualtoleaves slice the
queueto zone;
+ ∆ . if
Let ∈be [ ,the+set
∆ )of, individuals’
the queuingqueuing
time of thedetermined
times individualbyisWiFi aggregated
positioning to data
slice
queue zone; if tout ∈ [t, t + ∆t), the queuing time of the individual is aggregated to slice t to t + ∆t.
to i +as∆ representatives
. Let be the in set of slice
individuals’ +queuingthen times
∆ , determined = determined
∑ by WiFi by WiFi positioning
/ (where data
Let acting
wt be the set of individuals’ time queuingto times positioning is the
datanumber
acting as
acting as representatives
of individuals) in time average
is the WiFi-based slice to +∆N
queuing , then
time = ∑ of the/ slice.
estimation (where is the number
of individuals)
representatives inistime
the WiFi-based
slice t to t +average∆t, thenqueuing
Wt = ∑ wit /N
time estimation
(whereofNthe slice.
is the number of individuals) is
i =1
the WiFi-based average queuing time estimation of the slice.
Sensors 2016, 16, 1958 8 of 20
Sensors 2016, 16, 1958 8 of 21

Figure4.4.Time
Figure Timeslicing
slicingfor
forqueuing
queuingtime
timeestimation
estimationand
andprediction.
prediction.

2.4.Queuing
2.4. QueuingTime
TimePrediction
Prediction

2.4.1.
2.4.1.Nonstandard
NonstandardAutoregressive
Autoregressive
Autoregressive
Autoregressive(AR)
(AR)isisaafrequently
frequentlyused
usedtime
timeseries
seriesprediction
predictionmodel
modelthat
thatassumes
assumesthe thepresent
present
observation
observationhas a linear
has relation
a linear with previous
relation observations.
with previous Generally,Generally,
observations. the notation
theARnotation AR(an)
( p) denotes
autoregressive model of order p. In this study, we use a nonstandard AR model, denoting
denotes an autoregressive model of order . In this study, we use a nonstandard AR model, as NAR ( p ):
denoting as NAR( ): p
Pt = c + ∑ ϕi Wt−i∆t + ε t (3)
i =1
= + ∆ + (3)
where Pt is the prediction of the actual queuing time at time slice t to t + ∆t, c is a constant, ϕi is the
regression coefficient and ε t is the random error. In contrast to the general AR model, the parameters
where is the prediction of the actual queuing time at time slice to + ∆ , is a constant,
of NAR are trained using the previous observations (WiFi estimations) and the present ground truth
is the regression coefficient and is the random error. In contrast to the general AR model, the
(security system records).
parameters of NAR are trained using the previous observations (WiFi estimations) and the present
ground
2.4.2. truth (security system records).
Holt-Winters

2.4.2.Let {Wt } be the sequence of the crowds’ average queuing time based on the WiFi estimation from
Holt-Winters
time t to t + ∆t, with a seasonal variation of length L. The additive Holt-Winters prediction method
Let be the sequence of the crowds’ average queuing time based on the WiFi estimation
comprises three equations. {st } represents the sequence of smoothed values contributing as level,
from time to + ∆ , with a seasonal variation of length . The additive Holt-Winters prediction
{bt } represents the sequence of the linear trend, {ct } is the sequence of the seasonal correction factors,
method comprises three equations. represents the sequence of smoothed values contributing
and ∂, β and γ are the smoothing parameters. Then, the components of the additive Holt-Winters are:
as level, represents the sequence of the linear trend, is the sequence of the seasonal
correction factors, and , st = andα (Wt − ct− L∆t ) + (1 − α) (st−∆t + bt−∆tThen,
are the smoothing parameters. ) the components of (4)the
additive Holt-Winters are:
b = β (s − s ) + (1 − β) b ∆t (5)
= t ( − t ∆t−)∆t + (1 − )( ∆t−+ ∆ ) (4)
t − (st−∆t
ct = γ (W= − − bt−)∆t +−
+)(1 (1 −) γ) ct− L∆t (6)
(5)
∆ ∆

= ( =
Pt+m∆t − st +∆ mb
− t + ∆ct−(
) +L−(1 m∗L ))∆t
1−− ∆
(7)
(6)
where Equation (4) is a weighted average ∆ =
of + +
the seasonally(
adjusted

)∆
estimation (Wt − ct− L∆t ) and (7)
the non-seasonal forecast (st−∆t + bt−∆t ) for time slice t to t + ∆t. Equation (5) is the trend which is
where Equation
actually (4) ismethod
Holt’s linear a weighted
[28].average
Equationof (6)
theisseasonally
a weighted adjusted
averageestimation
between the −
( current ) and the
∆ seasonal
non-seasonal forecast ( + ) for time slice to + ∆
index (Wt − st−∆t − bt−∆t ) ∆and the∆ seasonal index of the same time slice of the previouswhich
. Equation (5) is the trend seasonis
actually Holt’s linear method [28]. Equation (6) is a weighted average between the
(ct− L∆t ). Equation (7) is the prediction function, where m is the step length of the prediction, Pt+m∆t current seasonal
isindex ( − time
the queuing ∆ − prediction
∆ ) and ofthetime
seasonal
slice tindex
+ m∆toftothe
t +same
(m + time
1) ∆t, slice
and ofm∗L the previous
= [( season
m − 1) mod L ],
( ). Equation (7) is the prediction function, where is the step
which∆ ensures the seasonal factors for prediction come from the most recent period. length of the prediction, ∆
is the queuing time prediction of time slice + ∆ to + ( + 1)∆ , and ∗ = [( − 1) ],
which
2.4.3. ensuresTrend
Seasonal the seasonal factors for
Decomposition prediction
with come from
Autoregressive the most
Integrated recentAverage
Moving period. (STL-ARIMA)

Seasonal trend decomposition (STL) is a statistical method that deconstructs a time series into
2.4.3. Seasonal Trend Decomposition with Autoregressive Integrated Moving Average
several components, namely, trend (TRt ), seasonality (St ) and remainder (Rt ). STL is used to
(STL-ARIMA)
decompose time series, while Loess is used to estimate nonlinear relationship. The additive STL
modelSeasonal
adoptedtrend
in thisdecomposition (STL) is a statistical method that deconstructs a time series into
work is as follows:
several components, namely, trend ( ), seasonality ( ) and remainder ( ). STL is used to
decompose time series, while Loess is W t = TR
used + St + Rnonlinear
to testimate t (8)
relationship. The additive STL
modelWadopted
where in this work is as follows:
t is a sequence of WiFi-based average queuing time estimations, TRt is the long-term increasing
or decreasing trend in the sequence, St is the=regular
+ fluctuation
+ of seasonal factors and seasonality
(8)
Sensors 2016, 16, 1958 9 of 21

Sensors
where2016, 16,
is 1958
a sequence of WiFi-based average queuing time estimations, 9 of 20
is the long-term
increasing or decreasing trend in the sequence, is the regular fluctuation of seasonal factors and
is fixed and has known period for a given sequencegiven
seasonality is fixed and has known period for a sequence
of periodic of periodic
features. features.
Rt is the remainder of is the
the
remainder of the sequence after components and
sequence after components TRt and Rt are removed and can be seen as noise. are removed and can be seen as noise.
The STL
The STL isisaafiltering
filteringprocess
processfor fora atime
timeseries.
series.TheThe ARIMA
ARIMA model
model is used
is used forfor prediction
prediction based
based on
on reconstructed a sequence from STL [31,44] (i.e., STL-ARIMA prediction
reconstructed a sequence from STL [31,44] (i.e., STL-ARIMA prediction model). In the ARIMA model, model). In the ARIMA
model,
the the variation
variation of the observation
of the observation sequencesequence
over time over time is regarded
is regarded as random, as random, and a statistical
and a statistical model is
model is constructed to model the features of the sequence based on processes,
constructed to model the features of the sequence based on processes, such as AR and Moving Average such as AR and
Moving Average (MA). The notation of the model is ARIMA( , , ), where
(MA). The notation of the model is ARIMA ( p, d, q), where p is the order of the autoregressive, is the order of dthe
is
autoregressive, is the number of differences required for stationarity, and
the number of differences required for stationarity, and q is the order of the moving-average process. is the order of the
moving-average
Readers can referprocess.
to Box andReaders
Jenkinscanetrefer to Box
al. [44] and Jenkins
for more details.et al. [44] for more details.

3. Methodology
3. MethodologyValidation
Validation
Queuing time
Queuing timedetermination
determinationandand estimation
estimation based
based on WiFi
on WiFi positioning
positioning data isdata is theofbasis
the basis of
further
further prediction.
prediction. Therefore,
Therefore, in thiswe
in this section, section, we only
only validate thevalidate the effectiveness
effectiveness of hardware of hardware
deployment
deployment
principles andprinciples andofthe
the accuracy accuracyaverage
a crowd’s of a crowd’s
queuingaverage queuing based
time estimation time estimation based on
on WiFi positioning
data. The queuing time prediction by time series models mentioned in Section 2 is presented in 2the
WiFi positioning data. The queuing time prediction by time series models mentioned in Section is
presented
case study in the case study section.
section.

3.1. Positioning System Deployment


To
To validate
validate our
our method,
method, we we designed
designed aa queuing
queuing timetime monitoring
monitoring system at the T3-C entrance of
Beijing
Beijing Capital
CapitalInternational
International Airport.
Airport.The The
trilateration method
trilateration was chosen
method was for the positioning
chosen technique.
for the positioning
In the deployment
technique. phase of APs,
In the deployment phase weofaimed
APs, weto minimize
aimed to the systematic
minimize errors. Leerrors.
the systematic Dortz etLeal. [45]
Dortz
verified thatverified
et al. [45] using more
thatAPs canmore
using help to improve
APs the stability
can help of WiFi
to improve thepositioning.
stability ofTherefore, a greater
WiFi positioning.
number
Therefore, of aAPs improves
greater number the
of topological
APs improves correctness.
the topologicalRegarding the topological
correctness. Regardingrelation, as the
the topological
relation,
design of as the design
indoor of indoor
positioning positioning is an environment-dependent
is an environment-dependent system because of system because
the diversity of the
of indoor
diversity of indoor
environments, environments,
the experiment must the
beexperiment
performed must beUnder
in situ. performed in situ. Under
the condition of thethe condition
largest numberof
the largest number of APs, we test only a few deployment schemes due to the strict limitation in the
of APs, we test only a few deployment schemes due to the strict limitation in the security region.
security region.
Specifically, in theSpecifically,
T3-C securityin the T3-C
region, security
Beijing region,
Capital Beijing Capital
International Airport,International Airport,
there are limited there
Internet
are limited
access portsInternet access portssystem,
for the positioning for the positioning
and devicessystem, andthe
that affect devices
normal that affectand
traffic thesecurity
normal traffic
check
and
of security check
passengers of permitted.
are not passengersTherefore,
are not permitted.
we deployed Therefore, we deployed
the maximum number theofmaximum number
APs according to
of APs according
principles mentionedto principles
in Sectionmentioned in Section
2.2 and changed their2.2 and changed
locations amongtheir locations
a limited among
number a limited
of positions
number of
allowed by positions
the airport allowed by the airport
side. Finally, side. Finally,
we installed nine APs weininstalled
the queue ninezoneAPs in thelocations
whose queue zoneare
whose locations
depicted in Figure are
5. depicted
The seven inAPs
Figure 5. The
on the rightseven
side APs
wereon the rightinside
deployed side were deployed
the counters, andinside the
the two
counters,
on the left and
werethe two onnear
deployed the left were deployed
the escalator. nearmetal
We placed the escalator. We near
baffle plates placed themetal
borderbaffle
APs onplates
the
near theofborder
outside APs on
the queue the outside of the queue zone.
zone.

Figure 5.
Figure 5. General overview of
General overview of the
the queue
queue zone
zone and
and the
the locations
locations of
of the
the APs.
APs.
Sensors 2016, 16, 1958 10 of 21
20

3.2. Topological Accuracy Test


3.2. Topological Accuracy Test
As systematic topological errors of WiFi positioning systems have a high possibility of
As systematic
occurrence near thetopological
border of aerrors
queue ofzone,
WiFi positioning
we tested sixsystems
pointshave a high
inside possibility
and three points ofoutside
occurrence
the
queue zone, all near the border. The results of this test are shown in Table 1; Inside-Inside meanszone,
near the border of a queue zone, we tested six points inside and three points outside the queue that
all near
both thethe
testborder. The results
point and of this testlocation
the positioning are shown
wereininside
Table 1;
theInside-Inside
queue zone;means that both the
Inside-Outside test
means
point and the positioning location were inside the queue zone; Inside-Outside means
that the test point was inside the queue zone and the positioning location was outside the queue that the test point
was inside
zone. the queue
We observed zone
that and of
73.11% thethe
positioning location
positioning washad
locations outside the queue
a correct zone.relation
topological We observed
when
thatpoint
the 73.11%wasofinside
the positioning
the queuelocations
zone, andhad a correct
82.79% weretopological
correct when relation when
the point wastheoutside
point was inside
the queue
the queue
zone. We zone,
deemand 82.79%
these were correct
results to be when the point
sufficiently was outside
accurate the queuetime
for queuing zone.estimation
We deem theseand
results to be sufficiently
prediction [46,47]. accurate for queuing time estimation and prediction [46,47].

Table 1.
Table Results of
1. Results of the
the topological
topological test
test near
near the
the border
border of
of the
the queue
queue zone.
zone.

Inside
Inside Outside
Outside
Inside Inside 73.11%
73.11% 26.89%
26.89%
Outside
Outside 17.21%
17.21% 82.79%
82.79%

3.3.
3.3. WiFi-Based
WiFi-Based Estimation
Estimation Model
Model Validation
Validation
We
We collected
collected WiFi
WiFipositioning
positioningdatadata(by
(byRTmap
RTmap Science
Science and
andTechnology
Technology Ltd., Beijing,
Ltd., China)
Beijing, for
China)
an entire day. The time during which queuing occurred was estimated according
for an entire day. The time during which queuing occurred was estimated according to the model to the model
described above. To
described above. Toresolve
resolvethethevariation
variationinin queuing
queuing time
time throughout
throughout thethe
day,day, we divided
we divided the day
the day into
into 10 min time slices. The main traffic passing through the T3-C entrance is from 5:00
10 min time slices. The main traffic passing through the T3-C entrance is from 5:00 a.m. to 9:00 p.m., a.m. to 9:00
p.m.,
so weso weestimated
only only estimated the queuing
the queuing time during
time during this time-frame.
this time-frame. We simultaneously
We simultaneously collectedcollected
check-in
check-in and check-out
and check-out data fromdata from thesystem
the security securityandsystem and calculated
calculated the actual the actualtime
queuing queuing time for
for validation.
validation. Figure 6 shows the validation results of our estimation. The mean absolute
Figure 6 shows the validation results of our estimation. The mean absolute error of the estimation error of was
the
estimation
156 was 156ofs,the
s, and 69.07% andabsolute
69.07% of the absolute
errors were lesserrors
than were
200 s,less thanindicates
which 200 s, which indicates
that our thattime
queuing our
queuing time determination
determination and estimationand estimation
model model in
is practicable is real-life
practicable in real-life scenarios.
scenarios.

Figure
Figure 6.
6. Validation
Validation results
results of
of the
the WiFi-based estimation model.
WiFi-based estimation model.

4.
4. Case
CaseStudy
Study

4.1. Queuing
Queuing Time Estimation for the T3-C Entrance of Beijing Capital International Airport
As positioning
positioning accuracy
accuracydepends
dependson onthe
thefield
fieldenvironment,
environment, forfor
thethe case
case study,
study, we we again
again chose
chose the
the T3-C entrance of Beijing Capital International Airport to validate our methodology.
T3-C entrance of Beijing Capital International Airport to validate our methodology. Beijing Capital Beijing
Capital International
International AirportAirport is the largest
is the largest airport
airport in China
in China and and the second
the second busiest
busiest in the
in the world,
world, witha
with
apassenger
passengerthroughput
throughputthat
thatexceeded
exceeded89 89million
millionperson-time
person-time (overall
(overall number
number of of people including
reoccurring ones) in 2015. In large-scale public areas like this, queuing time affects the management
and service quality. Our
Our system
system can
can automatically
automatically detect
detect and
and predict
predict individuals’
individuals’ queuing
queuing times,
times,
which is helpful for improving traffic efficiency, optimizing management, promoting service quality
and improving the capability to address emergencies.
Sensors 2016, 16, 1958 11 of 20

4.1.1. Data Collection


We collected eight days of WiFi positioning data (by RTmap Science and Technology Ltd.) from
the T3-C entrance of Beijing Capital International Airport from 11 August to 18 August. Each day
included more than 6.5 million records, and the fields of these records were:

[time_stamp, MAC, building_ID, f loor_ID, coordinateX , coordinateY , AP_MAC ]

where time_stamp is the time stamp recorded when a positioning location was collected; MAC is the
media access control address of a mobile device; building_ID is the serial number of the building
(for example, terminal T3); f loor_ID denotes the floor number; coordinateX and coordinateY are the
x and y coordinates, respectively, of the location; and AP_MAC is the MAC address of the AP that
provides the strongest signal for the device when positioning.
Before an individual enters the queue zone, he/she swipes their boarding pass to check-in and
go through the security door on the fourth floor. Next, he/she takes the escalator downstairs to the
third floor to wait for security in a queue. After the queuing process, the staff at the counter stamps
the passenger’s boarding pass to check them out and the passenger leaves the queue zone to have
his baggage checked. In our study, we added the time spent on escalators to the queuing time. Thus,
the queuing process starts when a passenger checks in and enters the queue zone, and ends after
checking out and leaving the queue zone. Therefore, the time between check-in and check-out recorded
by the security system is regarded as the actual queuing time for validation.

4.1.2. Data Preprocessing


In addition to the APs deployed in and around the queue zone, there are many other APs in this
building that are also used to track passengers’ trajectories. Thus, the spatial extent of positioning
data may capture the entire building. To remove duplicates, we marked out the research the area
(an area that covers the queue zone and completed queuing trajectories), depicted as the extent of
the picture frame in Figure 5, and removed records from this area based on their spatial coordinates.
Before a network hardware item is produced, the manufacturer needs to apply for a MAC address
from the Institute of Electrical and Electronic Engineers (IEEE). MAC addresses not found in the IEEE
MAC list may be disguised MAC addresses (for security or privacy reasons) or they may be incorrect
records. The records of such MAC addresses should be regarded as noise and removed. As network
equipment, an AP itself can be detected by other APs. Therefore, records generated by APs also need to
be removed. Furthermore, staff devices and fixed equipment that have network functions can also be
detected by the positioning system, so records of such equipment should be excluded before queuing
time estimation. In this study, we set 2 h as the maximum residence time in the research area. If the
duration in the research area exceeds this maximum time, the MAC is regarded as the MAC of fixed
equipment or a staff device, and the MAC is added to a list that is updated every day by the residence
time judgment in the research area. In real-time queuing time estimation, the MAC addresses in this
list are excluded. Some sample trajectories after data filtering are depicted in Figure 7.

4.1.3. Parameter Calibration and Queuing Time Determination


Under the condition that there is no room for hardware deployment improvement, the algorithm
plays a key role in the queuing time determination. As depicted in Figure 2, we first select a MAC
occurring in a time slice and extract the trajectory of this MAC. Through topological relation judgment,
we can identify the entrance and exit points of the queue. Next, as mentioned in Section 2.3.2, we judge
whether the trajectory is eligible to be used for estimation according to the parameters from calibration.
To ensure the integrity of the trajectory, m and n are set to 2, which means at least 2 (m) consecutive
points are detected immediately before entering the queue zone, and at least 2 (n) more points are
detected after leaving the queue zone. The other two parameters (k and r) are the main algorithmic
factors that can be used to improve the estimation results. The calibration records of k and r are shown
Sensors 2016, 16, 1958 12 of 20

Sensors 2016, 16, 1958 12 of 21


in Table 2, from which we can conclude that the best combination of these parameters is k = 5 and
combination of these parameters is = 5 and = 50%; that is, at least 5 ( ) points detected from
r = 50%; that is, at least 5 (k) points detected from the entrance to the exit point, and the proportion of
the entrance to the exit point, and the proportion of points drifting out of the queue zone is less than
points drifting out of the queue zone is less than 50% (r) from entrance to the exit point (the mean drift
50% ( ) from entrance to the exit point (the mean drift ratio of the positioning data used for
ratio estimation
of the positioning data used for estimation from 11 August to 18 August is less than 5% in the
from 11 August to 18 August is less than 5% in the subsequent statistics). Finally, if the
subsequent statistics). Finally, if the occurs
exit time of this queuing process exit time of this
within the queuing
same timeprocess occurs
slice (the within
exit time of athe same
MAC maytime
not slice
(the exit time
be in the of a MAC
same may not
time slice, be in itthe
although sameintime
occurs slice,slice),
the time although it occurs
then the in the
passenger time slice),
queuing then the
time will
passenger queuing
be estimated time
from thewill
timebe estimated
stamps of the from the time stamps of the trajectory.
trajectory.

Figure 7. Passenger trajectory examples. (a); (b); (c) and (d) show trajectories of four different
Figure 7. Passenger trajectory examples. (a–d) show trajectories of four different passengers in the
passengers in the T3-C Entrance.
T3-C Entrance.
Table 2. Error statistics of different parameter combinations.
Table 2. Error statistics of different parameter combinations.
Parameter Combinations Error Statistics
Parameter Combinations Mean Std. MAE AE ≤Error
60 s Statistics
AE ≤ 120 s AE ≤ 180 s AE ≤ 200 s
5 50% 30.27 177.30 144.57 32.99% 49.48% 71.13% 76.29%
k r Mean Std. MAE AE ≤ 60 s AE ≤ 120 s AE ≤ 180 s AE ≤ 200 s
6 50% 38.46 189.37 146.60 30.93% 50.52% 69.07% 73.20%
5 7 50% 50% 30.2749.39 177.30
193.98144.57
151.24 32.99%
27.84% 49.48%
50.52% 71.13%
69.07% 76.29%
72.16%
6 50% 38.46 189.37 146.60 30.93% 50.52% 69.07% 73.20%
7 8 50% 50% 49.3952.08 193.98
193.59151.24
151.72 27.84%
26.80% 52.58%
50.52% 69.07%
69.07% 73.20%
72.16%
8 9 50% 50% 52.0861.11 193.59
195.71151.72
157.38 26.80%
25.77% 52.58%
52.58% 65.98%
69.07% 71.13%
73.20%
9 10 50% 50% 61.1163.47 195.71
193.69157.38
162.19 25.77%
22.68% 52.58%
47.42% 65.98%
62.89% 71.13%
69.07%
10 50% 63.47 193.69 162.19 22.68% 47.42% 62.89% 69.07%
72.16%
5 40% 30.10 196.18 148.54 34.02% 52.58% 67.01%
5 40% 30.10 196.18 148.54 34.02% 52.58% 67.01% 72.16%
5 5 30% 30% 24.3624.36 207.67
207.67158.72
158.72 29.90%
29.90% 49.48%
49.48% 65.98%
65.98% 70.10%
70.10%
5 5 20% 20% 15.2115.21 210.29
210.29160.19
160.19 27.84%
27.84% 52.58%
52.58% 67.01%
67.01% 69.07%
69.07%
5 5 10% 10% −2.76−2.76 216.68
216.68167.48
167.48 24.74%
24.74% 48.45%
48.45% 65.98%
65.98% 69.07%
69.07%
5
5
0%
0%
−49.45 228.15 183.47
−49.45 228.15 183.47
21.65%
21.65%
42.27%
42.27%
59.79%
59.79%
61.86%
61.86%
6 40% 35.54 195.21 150.07 29.90% 49.48% 67.01% 72.16%
6 6 30% 40% 31.2135.54 195.21
207.15 160.91150.07 29.90%
26.80% 49.48%
47.42% 67.01%
64.95% 72.16%
70.10%
6 6 20% 30% 20.1831.21 209.47
207.15161.04
160.91 26.80%
26.80% 47.42%
50.52% 64.95%
67.01% 70.10%
70.10%
6 6 10% 20% 1.1720.18 215.61
209.47166.61
161.04 24.74%
26.80% 49.48%
50.52% 65.98%
67.01% 69.07%
70.10%
6 0% −40.43 230.45 183.76 21.65% 41.24% 58.76% 60.82%
6 10% 1.17 215.61 166.61 24.74% 49.48% 65.98% 69.07%
7 40% 47.71 200.10 155.34 27.84% 49.48% 65.98% 69.07%
7 6 30% 0% −40.43212.83
42.49 230.45165.82
183.76 25.77%
21.65% 41.24%
46.39% 58.76%
63.92% 60.82%
68.04%
7 7 20% 40% 38.4947.71 215.77
200.10167.98
155.34 27.84%
27.84% 49.48%
46.39% 65.98%
64.95% 69.07%
67.01%
7 7 10% 30% 21.2542.49 229.22
212.83174.12
165.82 25.77%
25.77% 47.42%
46.39% 63.92%
63.92% 68.04%
68.04%
7 0% −21.29 250.22 194.09 23.71% 41.23% 56.70% 61.86%
7 20% 38.49 215.77 167.98 27.84% 46.39% 64.95% 67.01%
8 40% 51.51 201.10 156.96 26.80% 50.52% 67.01% 69.07%
8 7 30% 10% 46.3021.25 229.22
214.06 167.07174.12 25.77%
25.77% 47.42%
47.42% 63.92%
64.95% 68.04%
67.01%
8 7 20% 0% −21.29218.55
42.15 250.22172.81
194.09 24.74%
23.71% 41.23%
46.39% 56.70%
62.89% 61.86%
65.98%
8 8 10% 40% 23.6751.51 230.53
201.10175.55
156.96 27.84%
26.80% 45.36%
50.52% 62.89%
67.01% 68.04%
69.07%
8 0% −18.15 251.78 195.19 23.71% 39.18% 56.705 61.86%
Note: Values exceeding 70% are emphasize using boldface. Std.: standard deviation, MAE: mean absolute error,
AE: absolute error.
8 20% 42.15 218.55 172.81 24.74% 46.39% 62.89% 65.98%
8 10% 23.67 230.53 175.55 27.84% 45.36% 62.89% 68.04%
8 0% −18.15 251.78 195.19 23.71% 39.18% 56.705 61.86%
Note: Values exceeding 70% are emphasize using boldface. Std.: standard deviation, MAE: mean
absolute error, AE: absolute error.
Sensors 2016, 16, 1958 13 of 20

According to field surveys, it is improbable for a passenger to queue for less than 60 s or for
moreAccording
than 1800tos.field
Therefore,
surveys, after the queuing
it is improbable for time of all passengers
a passenger to queue forinless
a than
time 60 slice
s orhas been
for more
estimated, we remove the estimated queuing times that fall outside this time range,
than 1800 s. Therefore, after the queuing time of all passengers in a time slice has been estimated, designating
them
we as incorrect
remove results.queuing
the estimated Next, we remove
times that abnormal
fall outsideresults,
this timewhich aredesignating
range, defined as them
thoseas more than
incorrect
or less than 1.5 standard deviations from the overall mean. Finally, we calculate
results. Next, we remove abnormal results, which are defined as those more than or less than 1.5 the mean value of
the remaining results to represent the crowds’ average queuing time in the time
standard deviations from the overall mean. Finally, we calculate the mean value of the remaining slice.
results to represent the crowds’ average queuing time in the time slice.
4.1.4. Estimation Results and Validation
4.1.4.WeEstimation
estimated Results
queuing andtime
Validation
in 10 min intervals between the hours of 5:00 a.m. to 9:00 p.m. from
11 August
We estimated queuing time in 10 minthe
to 18 August. For validation, corresponding
intervals between the check-in
hours and check-out
of 5:00 datap.m.
a.m. to 9:00 fromfromthe
airport security system, which we refer to as security data, were collected as the
11 August to 18 August. For validation, the corresponding check-in and check-out data from the airport ground truth. These
data record
security passenger
system, which we IDs,refer
check-in and check-out
to as security data, weretimes, and number
collected of security
as the ground truth.counters.
These data By
collating these records according to passenger ID, we calculated every
record passenger IDs, check-in and check-out times, and number of security counters. By collatingpassenger’s queuing time.
The queue
these zone
records has four
according to special
passenger channels
ID, we(Figure
calculated5, top andpassenger’s
every bottom corners
queuingof the queue
time. zone),
The queue
whichhas
zone arefour
prepared
special forchannels
“hurry-off” passengers
(Figure 5, top and(channels
bottom 1 and 2) and
corners of VIP passengers
the queue zone),(channels
which are 25
and 26). Passengers leaving from these channels do not need to queue
prepared for “hurry-off” passengers (channels 1 and 2) and VIP passengers (channels 25 and 26). like the other passengers.
Therefore, the
Passengers queuing
leaving fromtimetheseof channels
passengers do who pass to
not need through
queue thelikequeue zonepassengers.
the other via these channels
Therefore, is
usually short, and the integrated trajectories of these passengers can scarcely
the queuing time of passengers who pass through the queue zone via these channels is usually short, be detected by the
positioning
and system.trajectories
the integrated In accordanceof these with the positioning
passengers data be
can scarcely results, the by
detected security records ofsystem.
the positioning these
channels
In are removed
accordance with theand the actualdata
positioning queuing
results,times
the determined from of
security records security data that are
these channels are removed
less than
60 s or more than 1800 s are also removed as incorrect results. The actual
and the actual queuing times determined from security data that are less than 60 s or more than 1800 queuing times ares
aggregated into 10 min time slices according to the check-out time stamps. The
are also removed as incorrect results. The actual queuing times are aggregated into 10 min time slices mean queuing time
calculated to
according fromthe security
check-out data
timeinstamps.
the same Thetime
mean slice can validate
queuing the results
time calculated estimated
from securityby theinWiFi
data the
positioning data (Figure 8).
same time slice can validate the results estimated by the WiFi positioning data (Figure 8).

Figure 8.
Figure 8. Comparison
Comparison of the estimated
of the estimated and
and actual
actual queuing
queuing times.
times. (a) Comparison of
(a) Comparison the estimated
of the estimated
actual queuing
and actual queuingtimes
timesonon1111August;
August;(b)
(b)Comparison
Comparison ofof
thethe estimated
estimated andand actual
actual queuing
queuing times
times on
on August;
12 12 August; (c) Comparison
(c) Comparison of the estimated
of the estimated and actualand actual
queuing queuing
times times on
on 13 August; (d)13 August; (d)
Comparison of
Comparison of the estimated and actual queuing
the estimated and actual queuing times on 14 August. times on 14 August.

The statistical characteristics of the estimation errors are listed in Table 3. The mean queuing time
from 11 August to 18 August was 546 s, while the estimated mean queuing time was 570 s. The mean
absolute error (MAE) of the estimation results was 147 s, approximately 26.92% of the actual queuing
time. On average, 25.39% of the absolute errors (AEs) were less than 60 s, 49.61% were less than 120 s,
69.20% were less than 180 s and 73.58% were less than 200 s.
Sensors 2016, 16, 1958 14 of 20

Table 3. Queuing time estimation errors from 11 August to 18 August.

Date Mean Std. MAE AE ≤ 60 s AE ≤ 120 s AE ≤ 180 s AE ≤ 200 s


11 August 30.27 177.30 137.14 32.99% 49.48% 71.13% 76.29%
12 August 54.80 167.90 147.97 19.59% 45.36% 64.95% 71.13%
13 August 16.52 189.23 143.07 28.87% 51.55% 69.07% 74.23%
14 August 44.25 175.83 147.38 23.71% 45.36% 67.01% 70.10%
15 August −66.91 247.02 197.20 21.65% 37.11% 58.76% 61.86%
16 August 40.12 186.46 142.63 24.74% 57.73% 77.32% 78.35%
17 August 16.53 163.20 133.65 23.71% 49.48% 72.16% 77.32%
18 August 58.41 143.63 123.12 27.84% 60.82% 73.20% 79.38%
Std.: standard deviation, MAE: mean absolute error, AE: absolute error.

4.2. Queuing Time Prediction for the T3-C Entrance


Based on the estimation results, we can predict future queuing time using the three prediction
models presented in Section 2.4. For NAR ( p), the coefficients of the prediction models are determined
by the least squares method according to previous estimation results and the actual queuing times.
To determine the order parameter p, i.e., the number of independent variables required to build
the prediction model, we tested models based on one independent variable (Wt−10 , i.e., p = 1) and
two independent variables (Wt−10 and Wt−20 , i.e., p = 2). The error statistics for both models are
summarized in Table 4. Experiments 1 and 2 use the same model training data and sample data
for their predictions. Likewise, experiments 3 and 4 have the same model training and prediction
data. Based on these experiments, we conclude that p = 2 is an appropriate order parameter for the
NAR ( p) model.

Table 4. Comparison of the prediction errors from NAR (1) and NAR (2).

Error Statistics of Prediction Results from Error Statistics of Prediction Results from
Model NAR (1) Model NAR (2)
No. Mean Std. MAE AE ≤ 200 s No. Mean Std. MAE AE ≤ 200 s
01 46.55 195.15 177.05 60.00% 02 34.24 178.60 155.15 66.32%
03 −38.89 216.97 164.80 69.47% 04 −35.40 203.05 161.41 69.47%
05 41.51 190.07 160.52 69.47% 06 27.38 163.27 132.29 77.89%
Std.: standard deviation, MAE: mean absolute error, AE: absolute error. Wt−10 : average queuing time from time
t−10 min to t; Wt−20 : average queuing time from time t−20 min to t−10 min.

Regarding the regression coefficients (ϕi in Equation (3)), we need to determine how many days
of training data are suitable for NAR (2). We tested three solutions, in which NAR (2) was trained
by the estimation results and ground truth of the preceding one, two or three days. Then, we used
NAR (2) trained by these solutions to predict the queuing times for the same days. Table 5 shows the
mean error statistics of the prediction results, from which we conclude that NAR (2) trained with the
estimation results and ground truth of the previous three days (for example, using the model trained
by the results of 11–13 August to predict the queuing time on 14 August) are theoretically sound.

Table 5. Comparison of the prediction errors from NAR (2) trained using different data.

Prediction Error Statistics


Models
Mean Std. MAE AE ≤ 200 s
Models trained by estimation results of previous 1 day 13.19 219.23 168.50 69.47%
Models trained by estimation results of previous 2 days −10.53 214.29 161.36 70.52%
Models trained by estimation results of previous 3 days −14.41 213.72 160.47 70.88%
Note: The independent variables of these prediction models are Wt−10 and Wt−20 . Std.: standard deviation,
MAE: mean absolute error, AE: absolute error.
Models
Mean Std. MAE AE ≤ 200 s
Models trained by estimation results of previous 1 day 13.19 219.23 168.50 69.47%
Models trained by estimation results of previous 2 days −10.53 214.29 161.36 70.52%
Models trained by estimation results of previous 3 days −14.41 213.72 160.47 70.88%
SensorsNote: independent variables of these prediction models are W
The1958
2016, 16, and W . Std.: standard
15 of 20
deviation, MAE: mean absolute error, AE: absolute error.

For
For real-time
real-time queuing time prediction,
queuing time prediction, the
the step
step length
length ofof time
time slices
slices for
for prediction
prediction is is set
set to
to 11 for
for
the
the Holt-Winters and STL-ARIMA models, that is, we only use these models to predict queuing time
Holt-Winters and STL-ARIMA models, that is, we only use these models to predict queuing time
in the upcoming
in the upcoming timetimeslice.
slice.The
Theperiodic
periodicparameter
parameterofofthe themodels
models (Winters
(Winters andand STL-ARIMA)
STL-ARIMA) is set
is set to
to 97 (97 time slices per day from 5:00 a.m. to 9:00 p.m.). The parameters of NAR
97 (97 time slices per day from 5:00 a.m. to 9:00 p.m.). The parameters of NAR(2) are calculated ( 2 ) are calculated
using
using the
theleast
leastsquares
squares method.
method. The Holt-Winters
The Holt-WintersandandSTL-ARIMA
STL-ARIMA predictions are implemented
predictions are implemented using
the forecast
using package
the forecast [48] in R
package Language
[48] [49], and[49],
in R Language the and
remaining parameters,
the remaining except the
parameters, time step
except and
the time
period, are automatically tuned by the procedure. The average prediction errors
step and period, are automatically tuned by the procedure. The average prediction errors of theseof these three models
from
three 11 August
models fromto 14
11 August
August are shown
to 14 Augustin Table 6, which
are shown shows
in Table that NAR
6, which (2) that
shows achieves
NAR(2)better results
achieves
than the other two models.
better results than the other two models.
Table 6. Queuing time prediction errors of different models.
Table 6. Queuing time prediction errors of different models.

Model
Model Mean
Mean Std.
Std. MAE
MAE AE≤ ≤
AE 6060s s AEAE ≤ 120
≤ 120 s s AEAE ≤ 180
≤ 180 s sAE AE ≤ 200
≤ 200 s s
NAR (2) ( ) 5.215.21 188.33
188.33 148.95
148.95 28.21%
28.21% 50.53%
50.53% 68.42%
68.42% 73.05%
73.05%
Holt-Winters19.06
Holt-Winters 19.06 206.89
206.89 162.42
162.42 23.71%
23.71% 44.74%
44.74% 64.54%
64.54% 67.84%
67.84%
STL-ARIMA 18.15
STL-ARIMA 18.15 188.47
188.47 152.90
152.90 24.33%
24.33% 45.98%
45.98% 64.12%
64.12% 69.28%
69.28%

Some prediction
Some prediction results
results from
from the NAR(2)
the NAR (2) model
model areare plotted
plotted in
in Figure
Figure 9,
9, along
along with
with the
the actual
actual
queuing times. The mean queuing time from 14 August to 18 August was
queuing times. The mean queuing time from 14 August to 18 August was 542 s, while the mean 542 s, while the mean
queuing time
queuing time predicted
predicted by NAR(2)
by NAR was 548
(2) was 548 s.
s. The
The MAE
MAE ofof the
the prediction results was
prediction results was 149
149 s,
s, which
which isis
approximately 27.49% of the actual queuing time. As shown in Table 6, on average,
approximately 27.49% of the actual queuing time. As shown in Table 6, on average, 28.21% of the AEs 28.21% of the
AEs were
were less 60
less than than 60 s, 50.53%
s, 50.53% were
were less less120
than than 120 s, 68.42%
s, 68.42% were lesswere
thanless
180than
s and180 s andwere
73.05% 73.05%lesswere
than
less s.
200 than 200 s. However,
However, the resultsthe
alsoresults
showalso
a fewshow a few weaknesses,
weaknesses, for example,forthe
example, the beginning
beginning of the
of the prediction
prediction
curve curve9binand
in Figure Figure 9b andpoint
the jump the jump point9c.in Figure 9c.
in Figure

Figure 9.
Figure 9. Comparison
Comparison of the predicted
of the predicted and
and actual
actual queuing
queuing times.
times. (a)
(a) Comparison
Comparison of the predicted
of the predicted
and actual queuing times on 14 August; (b) Comparison of the predicted and actual queuing
and actual queuing times on 14 August; (b) Comparison of the predicted and actual queuing times times
on
15 August; (c) Comparison of the predicted and actual queuing times on 16 August; (d) Comparison(d)
on 15 August; (c) Comparison of the predicted and actual queuing times on 16 August; of
Comparison
the predictedof theactual
and predicted and times
queuing actualon
queuing times on 17 August.
17 August.

5. Discussion
The main goal of this study was to develop a method to predict queuing time based on WiFi
positioning data in indoor scenario. The results of a case study at Beijing Capital International Airport
show that the method we proposed is feasible for real-time queuing time prediction. In contrast
to WiFi-based queuing monitoring systems such as LineKing [15,22] and Wang’s method [23–25],
and systems based on other sensors mentioned in Section 1, our method does not require users to
Sensors 2016, 16, 1958 16 of 20

install specific apps on their mobile devices, which means it is a completely passive queue monitoring
method and it can be easily extended to new applications. In addition, in the case study, the estimation
and prediction error of our method were approximately 26.92% and 27.49%, respectively, while the
estimation error of LineKing is approximately 24%–36% in a coffee shop. Wang’s method had an error
of approximately 10 seconds. However, because Wang et al. only used one WiFi monitor, it is difficult
for their method to address long or disordered queues using a signal strength threshold parameter to
distinguish the starting time of a queuing process. As our method was only tested in a security region
with strict limitation and because it is scenario-dependent, the comparisons can only be viewed as a
reference. To compare the prediction accuracy at different time periods, we aggregated the time slices
of a day into 3 slices (i.e., 5:00 a.m.–12:00 p.m., 12:00 p.m.–5:00 p.m. and 5:00 p.m.–9:00 p.m.). The MAEs
of the prediction results were 36.12% from 5:00 a.m. to 12:00 p.m., 18.49% from 12:00 p.m. to 5:00 p.m.
and 28.68% from 5:00 p.m. to 9:00 p.m. Because of the traffic rush in the morning, the high variation
in traffic may lead to large errors in the period 5:00 a.m.–12:00 p.m. In addition, the environmental
factors on the morning of 15 August, which will be explained in the following section, affected the
accuracy of this period. Comparison of the prediction results from different models indicates that our
NAR model has better accuracy than the other two models. There are two possible reasons for this
phenomenon: (1) the NAR model can be trained using historical ground truth, while the other two
models only consider the observations; and (2) the Holt-Winters and STL-ARIMA models are good at
addressing sequences with regular cycles, while the queuing time pattern in our research varies by
days, especially between weekdays and weekends.
During the deployment phase of our positioning system, we made some arrangements for the
original APs at the T3-C Entrance. Two main elements were concerned, signal coverage and signal
overlap. Because the signal transmitting range is approximately 50 m to 100 m, which exceeds the
radius of the queue zone, APs deployed near the border of the queue zone can ensure the integrity of
signal coverage in the queue zone. Metal baffle plates were placed to reduce signal overlap between
the inside and outside of the queue zone, which may cause drift phenomenon and lead to topological
errors. Thus, when users leave the queue zone, they receive a weak signal from the APs inside the
queue zone due to the metal baffle plates. However, as the distance from the APs in surrounding shops
to the queue zone is no more than 30 m, normal Internet service is barely affected.
There are two types of factors affecting the accuracy of the results: environmental factors and
systematic factors. Environmental factors affect the normal queue and security check, and often lead to
outliers, for example, the large errors in the prediction results, especially 5:00 a.m.–8:00 a.m., 15 August
in Figure 9b and 7:00 a.m.–8:00 a.m., 16 August in Figure 9c. Historical weather records indicated
that, on 15 August, 22 out of 34 municipalities and capital cities experienced rain, which may have
stranded passengers due to flight delays and led to the error from 5:00 a.m. to 8:00 a.m. in Figure 9b.
Through discussions with the airport staff, we concluded that other environmental factors that can
generate outliers include sudden traffic variation, security strategy adjustment (for example, security
gate number change) and large traffic flow along the outside of the queue zone near the boundary.
Because we do not have additional information about this time period, we cannot give the exact reason.
Nevertheless, the existence of outliers is due to one or more of the above reasons. System factors
include topological accuracy, the packet delivery frequency of mobile devices, and lags in the models.

5.1. Topological Accuracy


Although we took a series of measures to ensure the topological accuracy during the deployment
of the APs and proposed a parameter called drift ratio to alleviate the impact of drift phenomenon,
topological accuracy remains a problem that adversely affects queuing time estimation. The topological
accuracy of our positioning system in this research may be affected by the deployment of APs,
the positioning method, and the hardware status.
Sensors 2016, 16, 1958 17 of 20

5.1.1. Deployment of APs


The number and locations of APs are restricted by the site environment and the limited number
of Internet access ports at the T3-C entrance of Beijing Capital International Airport. Furthermore,
facility transformation and maintenance require extra investment. Therefore, additional hardware
facility installations are not accepted by the airport authority, and the optimal deployment scheme
cannot be realized, which affects the topological accuracy. For example, in this study, the two APs
deployed on the left in Figure 5 were not in the optimal locations.

5.1.2. Positioning Method


For WiFi positioning, fingerprinting usually yields better accuracy and stability than trilateration.
However, fingerprinting requires many signal measurement during the deployment phase, and when
AP deployment changes, this measurement needs to be repeated. Therefore, to minimize the effects on
the normal traffic and security management of the airport, we chose the trilateration method, which is
simple but has relatively poor accuracy and stability and thus may reduce the topological correctness.

5.1.3. Hardware Status


For unknown reasons, the AP equipment may power off, disconnect from the Internet or break
down. Furthermore, different APs of the same brand and version may have different signal propagation
characteristics, and the signal of an individual AP may be unstable over time. These factors may
affect the topological correctness and thus the estimation accuracy, for example, the jump points in
Figure 8c,d.

5.2. Packet Delivery Frequency of Mobile Devices


As our proposed queuing time solution does not require that individuals install an app on their
mobile devices, the packet delivery frequency only depends on the status of their devices. If individuals
connect their mobile devices to the APs and continuously use the WiFi network, then their devices
will deliver packets regularly and at a high frequency. Thus, these trajectories are dense with sample
points, and the resulting estimations have high accuracy. However, if an individual keeps the WiFi
module on but does not connect to APs or connects to APs but does not use the device continuously
during the queuing process, the sample points on the trajectory may be sparse. The sparsity of sample
points may lead to estimation errors.

5.3. Lags in the Models


As all models in our research use previous queuing estimations for queuing time prediction,
the predictions lag behind the actual queuing time, especially in moments when the queuing time
increases or decreases sharply, which may occur when there is large variation in the number of people
queuing over a short time interval, for example, the sequence near the end in Figure 9c,d. We observe
this phenomenon in the estimation results of this study. Although our regression model corrects some
lag deviation, it is not eliminated completely. Moreover, correlations between previous estimation
results and future queuing times may vary in time, which may affect the reliability of the queuing
time predictions.

6. Conclusions and Future Work


In this paper, we presented an overview of previous queuing time monitoring techniques and
solutions, and proposed a novel methodological framework to estimate and predict queuing time
based on WiFi positioning data in indoor scenarios. Our method is composed of hardware deployment
and the algorithm. In the hardware deployment part, we deployed APs on the border of a queue zone
and installed metal baffle plates for the border APs to improve the topological correctness. In the
algorithmic part, as mentioned in Section 2.3, to reduce the error caused by the “drift phenomenon”
Sensors 2016, 16, 1958 18 of 20

of WiFi positioning and the impact of trajectory point sparsity, we proposed four parameters (m, n, k,
and r) to identify relatively reliable samples as representatives of queuing time in specific time slices.
In different application scenarios, these parameters must be calibrated before the method is used for
queuing time estimation and prediction. In the case study at the T3-C entrance of Beijing Capital
International Airport, although the number and location of APs were restricted by limited internet
access ports and deployment locations, the minimum MAE of the estimation results from 11 August to
18 August was 147 s, which is 26.92% of the average actual queuing time. In contrast with the results
of previous WiFi-based queuing time estimation methods relying on mobile apps, the accuracy of our
simple but carefully designed method is within the acceptable range.
For prediction, we proposed the NAR model. The main difference of NAR with respect to general
AR model is that NAR is trained using previous observations and the ground truth. To determine the
order of the NAR model and the number of days’ results for model training, we conducted a series
of experiments. The results showed that an order of 2 and number of previous days of 3 produced
sufficiently accurate predictions. Using this model, we predicted the queuing time in T3-C entrance
from 14 August to 18 August in real time. The minimum MAE of the predictions came from the NAR
model, i.e., 27.49% of the average actual queuing time, which was better than the Holt–Winters and
STL-ARIMA models.
Our research shows that indoor queuing time can be estimated and predicted using WiFi
positioning data. Compared with previous studies, our method has four advantages: (i) it is robust to
positioning accuracy when topological correctness is reliable; (ii) it does not require special sensors to
cope with the widespread nature of WiFi APs; (iii) it is completely passive because it does not require
individuals active participation or for them to install an app on their mobile devices; and (iv) it does
not need to consider the shape of a queue, only the individuals’ spatiotemporal location and the extent
of the queue zone. As WiFi is widely used in public areas, our method is applicable in locations such
as train stations, museums and supermarkets. However, it can only be used in places where there are
queue zones with well-defined borders. In actual application scenarios, our method is restricted by the
site environment and the drift of the WiFi positioning system. Therefore, the accuracy of estimation
and prediction results may not be fully satisfactory. In future work, a positioning algorithm with
better location accuracy and stability will be used to improve the topological accuracy. For example,
fingerprinting could be used to replace triangulation, and the deployment strategy could be improved
to reduce the impact of the indoor environment. Additionally, technical and algorithmic solutions will
be explored to alleviate the impact of drift.

Acknowledgments: The authors would like to thank Beijing Capital International Airport for providing
permission to use the security system data. The project was supported by the National Science Found for
Distinguished Young Scholars of China (Grant No. 41525004), the Science Fund for Creative Research Groups
(Grant No. 41421001) and a NSFC grant (Grant No. 41231171).
Author Contributions: Tao Pei and Hua Shu designed the model and experiments. Hua Shu, and Ci Song
performed the experiments, and analyzed the data. Hua Shu and Tao Pei wrote the paper. Lianming Xu,
Yang Ou, Libin Zhang, and Tao Li designed the hardware environment for indoor positioning and collected the
experimental data.
Conflicts of Interest: The authors declare no conflict of interest.

References
1. Li, Q.; Han, Q.; Cheng, X.; Sun, L. Queuesense: Collaborative recognition of queuing on mobile phones.
IEEE. Trans. Mob. Comput. 2016, 15, 60–73. [CrossRef]
2. Houston, M.B.; Bettencourt, L.A.; Wenger, S. The relationship between waiting in a service queue and
evaluations of service quality: A field theory perspective. Psychol. Mark. 1998, 15, 735–753. [CrossRef]
3. Maister, D.H. The Psychology of Waiting Lines; Lexington Books: Lexington, MA, USA, 1984.
4. Chan, A.B.; Liang, Z.-S.J.; Vasconcelos, N. Privacy preserving crowd monitoring: Counting people without
people models or tracking. In Proceedings of the IEEE Conference on Computer Vision and Pattern
Recognition, Anchorage, AK, USA, 23–28 June 2008; pp. 1–7.
Sensors 2016, 16, 1958 19 of 20

5. Kilambi, P.; Ribnick, E.; Joshi, A.J.; Masoud, O.; Papanikolopoulos, N. Estimating pedestrian counts in
groups. Comput. Vis. Image Underst. 2008, 110, 43–59. [CrossRef]
6. Kong, D.; Gray, D.; Tao, H. Counting Pedestrians in Crowds Using Viewpoint Invariant Training.
In Proceedings of the British Machine Conference, Oxford, UK, 5–8 September 2005.
7. Parameswaran, V.; Shet, V.; Ramesh, V. Design and validation of a system for people queue statistics
estimation. In Video Analytics for Business Intelligence; Springer: Berlin/Heidelberg, Germany, 2012;
pp. 355–373.
8. Shen, B.; Zheng, Q.; Li, X.; Xu, L. A framework for mining actionable navigation patterns from in-store RFID
datasets via indoor mapping. Sensors 2015, 15, 5344–5375. [CrossRef] [PubMed]
9. Budic, D.; Martinovic, Z.; Simunic, D. Cash register lines optimization system using rfid technology.
In Proceedings of the 37th International Convention on Information and Communication Technology,
Electronics and Microelectronics, Opatija, Croatia, 26–30 May 2014; pp. 459–462.
10. Zhuang, Y.; Yang, J.; Li, Y.; Qi, L.; El-Sheimy, N. Smartphone-based indoor localization with bluetooth low
energy beacons. Sensors 2016, 16. [CrossRef] [PubMed]
11. Nishide, R.; Yamamoto, S.; Takada, H. Position estimation for people waiting in line using bluetooth
communication. In Proceedings of the 5th International Conference on Mobile Services, Resources, and
Users, Brussels, Belgium, 21–26 June 2015.
12. Bullock, D.; Haseman, R.; Wasson, J.; Spitler, R. Automated measurement of wait times at airport security:
Deployment at indianapolis international airport, indiana. Transp. Res. Rec. 2010, 2117, 60–68. [CrossRef]
13. Brezmes, T.; Gorricho, J.-L.; Cotrina, J. Activity recognition from accelerometer data on a mobile phone.
In Distributed Computing, Artificial Intelligence, Bioinformatics, Soft Computing, and Ambient Assisted Living;
Springer: Berlin/Heidelberg, Germany, 2009; pp. 796–799.
14. Wang, Y.; Wang, J.; Zhang, X. Qtime: A queuing-time notification system based on participatory sensing
data. In Proceedings of the IEEE 37th Computer Software and Applications Conference, Kyoto, Japan,
22–26 July 2013; pp. 770–777.
15. Bulut, M.F.; Demirbas, M.; Ferhatosmanoglu, H. Lineking: Coffee shop wait-time monitoring using
smartphones. IEEE. Trans. Mob. Comput. 2015, 14, 2045–2058. [CrossRef]
16. Biswas, J.; Veloso, M.M. Wifi localization and navigation for autonomous indoor mobile robots.
In Proceedings of the IEEE International Conference on Robotics & Automation, Anchorage, AK, USA,
3–8 May 2010; pp. 4379–4384.
17. Evennou, F.; Marx, F. Advanced integration of wifi and inertial navigation systems for indoor mobile
positioning. Eurasip J. Appl. Signal Process. 2006, 2006, 086706. [CrossRef]
18. Haddadi, H.; Hui, P.; Brown, I. Mobiad: Private and scalable mobile advertising. In Proceedings of the
Fifth ACM International Workshop on Mobility in the Evolving Internet Architecture, Chicago, IL, USA,
20–24 September 2010; pp. 33–38.
19. Yoon, C.; Lee, H.; Jeon, S.; Lee, H. Mobile digital signage system based on service delivery platform location
based targeted advertisement service. ICT Converg. (ICTC) 2011, 582–586. [CrossRef]
20. Chen, Z. Mining individual behavior pattern based on significant locations and spatial trajectories.
In Proceedings of the 2012 IEEE International Conference on Pervasive Computing and Communications
Workshops (PERCOM Workshops), Lugano, Switzerland, 19–23 March 2012; pp. 540–541.
21. Manweiler, J.; Santhapuri, N.; Choudhury, R.R.; Nelakuditi, S. Predicting length of stay at wifi hotspots.
In Proceedings of the 32nd IEEE INFOCOM Conference, Turin, Italy, 14–19 April 2013; pp. 3102–3110.
22. Bulut, M.F.; Yilmaz, Y.S.; Demirbas, M.; Ferhatosmanoglu, N.; Ferhatosmanoglu, H. Lineking: Crowdsourced
line wait-time estimation using smartphones. In Mobile Computing, Applications, and Services; Springer:
Berlin/Heidelberg, Germany, 2012; pp. 205–224.
23. Wang, Y.; Chen, Y.; Yang, J.; Liul, H.; Gruteser, M.; Martin, R.P. A low-cost Wi-Fi-based solution for measuring
human queues. GetMob. Mob. Comput. Commun. 2015, 19, 10–13.
24. Wang, Y.; Yang, J.; Chen, Y.; Liu, H.; Gruteser, M.; Martin, R.P. Tracking human queues using single-point
signal monitoring. In Proceedings of the 12th Annual International Conference on Mobile Systems,
Applications, and Services, Bretton Woods, NH, USA, 16–19 June 2014; pp. 42–54.
25. Wang, Y.; Yang, J.; Liu, H.; Chen, Y.; Gruteser, M.; Martin, R.P. Measuring human queues using wifi signals.
In Proceedings of the 19th Annual International Conference on Mobile Computing & Networking, Miami,
FL, USA, 30 September–4 October 2013; pp. 235–238.
26. Gardner, E.S. Exponential smoothing: The state of the art. J. Forecast. 1985, 4, 1–28. [CrossRef]
Sensors 2016, 16, 1958 20 of 20

27. Hyndman, R.J.; Koehler, A.B.; Snyder, R.D.; Grose, S. A state space framework for automatic forecasting
using exponential smoothing methods. Int. J. Forecast. 2002, 18, 439–454. [CrossRef]
28. Holt, C.C. Forecasting seasonals and trends by exponentially weighted moving averages. Int. J. Forecast.
2004, 20, 5–10. [CrossRef]
29. Winters, P.R. Forecasting sales by exponentially weighted moving averages. Manag. Sci. 1960, 6, 324–342.
[CrossRef]
30. Cleveland, R.B.; Cleveland, W.S.; McRae, J.E.; Terpenning, I. STL: A seasonal-trend decomposition procedure
based on loess. J. Off. Stat. 1990, 6, 3–73.
31. Theodosiou, M. Forecasting monthly and quarterly time series using STL decomposition. Int. J. Forecast.
2011, 27, 1178–1195. [CrossRef]
32. Davis, R.; Rogers, T.; Huang, Y. A Survey of Recent Developments in Queue Wait Time Forecasting Methods.
In Proceedings of the International Conference on Foundations of Computer Science (FCS), Millersville, PA,
USA, 25–28 July 2016.
33. Cooper, R.B. Introduction to Queueing Theory; North Holland: New York, NY, USA, 1981.
34. Gross, D. Fundamentals of Queueing Theory; John Wiley & Sons: Hoboken, NJ, USA, 2008.
35. Gerlough, D.L.; Huber, M.J. Traffic Flow Theory; National Research Council: Washington, DC, USA, 1975;
pp. 7–70.
36. Kerner, B.S. Introduction to Modern Traffic Flow Theory and Control: The Long Road to Three-Phase Traffic Theory;
Springer: Berlin/Heidelberg, Germany, 2009.
37. Woo, S.; Jeong, S.; Mok, E.; Xia, L.; Choi, C.; Pyeon, M.; Heo, J. Application of wifi-based indoor positioning
system for labor tracking at construction sites: A case study in guangzhou MTR. Autom. Constr. 2011, 20,
3–13. [CrossRef]
38. O’hara, B.; Petrick, A. IEEE 802.11 Handbook: A Designer’s Companion; IEEE Standards Association: Piscataway,
NJ, USA, 2005.
39. Cheng, Y.-C.; Chawathe, Y.; LaMarca, A.; Krumm, J. Accuracy characterization for metropolitan-scale
wi-fi localization. In Proceedings of the 3rd International Conference on Mobile Systems, Applications,
and Services, Seattle, WA, USA, 6–8 June 2005; pp. 233–245.
40. Hightower, J.; Borriello, G. Location systems for ubiquitous computing. Computer 2001, 34, 57–66. [CrossRef]
41. Motley, A.; Keenan, J. Personal communication radio coverage in buildings at 900 MHz and 1700 MHz.
Electron. Lett. 1988, 24, 763–764. [CrossRef]
42. Liu, H.; Darabi, H.; Banerjee, P.; Liu, J. Survey of wireless indoor positioning techniques and systems.
IEEE Trans. Syst. Man Cybern. Part C Appl. Rev. 2007, 37, 1067–1080. [CrossRef]
43. Park, D.; Park, J.G. An Enhanced Ranging Scheme Using WiFi RSSI Measurements for Ubiquitous Location.
In Proceedings of the 2011 First ACIS/JNU International Conference on Computers, Networks, Systems and
Industrial Engineering (CNSI), Jeju, Korea, 23–25 May 2011; pp. 296–301.
44. Box, G.E.; Jenkins, G.M.; Reinsel, G.C.; Ljung, G.M. Time Series Analysis: Forecasting and Control; John Wiley &
Sons: Hoboken, NJ, USA, 2015.
45. Le Dortz, N.; Gain, F.; Zetterberg, P. WiFi fingerprint indoor positioning system using probability distribution
comparison. In Proceedings of the 2012 IEEE International Conference on Acoustics, Speech and Signal
Processing (ICASSP), Kyoto, Japan, 25–30 March 2012; pp. 1–12.
46. Hernández, N.; Alonso, J.M.; Ocana, M.; Marina, M.K. Impact of Signal Representations on the Performance
of Hierarchical WiFi Localization Systems. In Proceedings of the 14th International Conference on Computer
Aided Systems Theory (EUROCAST), Las Palmas, Spain, 6–15 February 2013.
47. Hernández, N.; Alonso, J.M.; Ocaña, M. Hierarchical approach to enhancing topology-based wifi indoor
localization in large environments. J. Mult.-Valued Log. Soft Comput. 2016, 26, 221–241.
48. Forecast: Forecasting Functions for Time Series and Linear Models. Available online: https://cran.r-project.
org/web/packages/forecast/index.html (accessed on 27 September 2016).
49. Team, R.C. R: A Language and Environment for Statistical Computing; R Foundation for Statistical Computing:
Vienna, Austria, 2013.

© 2016 by the authors; licensee MDPI, Basel, Switzerland. This article is an open access
article distributed under the terms and conditions of the Creative Commons Attribution
(CC-BY) license (http://creativecommons.org/licenses/by/4.0/).

You might also like