Development of congestion state
guiding system for university cafeteria
Takafumi Doi, Hirotaka Ito, and Kenji Funahashi

Abstract We develop a congestion state guide system for a university cafeteria. Thissystem confirms the congestion state of a cafeteria using iBeacon, and displays it ona mobile device in real time. The purpose of this is to stagger cafeteria use andavoid rush hour. We had a field experiment of this system in a cafeteria, and tested
the operation of this system. Using this system, students can know how congested acafeteria is at any place outside the cafeteria, and have a lunch comfortably when it
was not crowded.
Key words: Bluetooth Low Energy, iBeacon, congestion state guide, university
cafeteria, staggered lunch time

1 Introduction
In recent years, smartphones have become popular, and services for a smartphoneand systems using its location information are widely used. Especially outdoor andwide area location data are utilized that uses GPS, the Internet access point information etc., and many applications are developed [1, 2]. However the number ofapplications using indoor and local area location data are not so many, because it isdifficult to receive GPS signal, and a device usually moves inside one access point
Takafumi Doi
Nagoya Institute of Technology, Gokiso-cho, Showa-ku, Nagoya 466-8555 Japan, e-mail:taka@center.nitech.ac.jp
Hirotaka Ito
Nagoya Institute of Technology, Gokiso-cho, Showa-ku, Nagoya 466-8555 Japan, e-mail: htitoh@nitech.ac.jp
Kenji Funahashi
Nagoya Institute of Technology, Gokiso-cho, Showa-ku, Nagoya 466-8555 Japan, e-mail:kenji@nitech.ac.jp1

2

Takafumi Doi, Hirotaka Ito, and Kenji Funahashi

area. One of the indoor positioning method estimates position information using
beacons that transmit radio waves. WSN (Wireless Sensor Networks) is also similar
technology [3, 4]. There is a indoor positioning system study using BLE beacon [5].
In order to improve the accuracy in this study, authors combined a plurality of methods. For example, there is also indoor localization method and open field trial [6].
While indoor positioning systems are gaining attention, iBeacon [7] was proposedby Apple in September 2013. It uses Bluetooth Low Energy (BLE) [8] technology,
and smartphone and tablet receive BLE signals. These devices can detect entering
into and leaving from beacon area.
Nagoya Institute of Technology has introduced a system to manage attendanceof students using ID card and a smart card reader to register their arrival at class.
An attendance register subsystem using BLE beacon and their own smartphone has
also introduced recently. It is expected that university life become more convenient.
By the way, many university cafeterias have a same problem that most students
want to have a lunch at a similar time, and a cafeterias are crowded very much. But
it is difficult to enlarge cafeteria space because the number of students is limited andjust most students concentrate there between the classes. Although simple solution
is to avoid the peak time to use and some students have a lunch before or after
designated lunch time, it is difficult to predict the peak because university classschedule with canceled and supplemented classes is unstable. Therefore we expectthat they will stagger cafeteria use and avoid rush hour by themselves if they canknow the congestion state of a cafeteria before coming there from a class room andlaboratory. Introducing internet web cameras there, they probably can know the state
if it is crowded. But it needs much cost, and the cameras are only for this purpose.
We consider to develop a congestion state guide system for a university cafeteriausing our university BLE beacon system also attached at a cafeteria. Aside to that
this beacon system is not only for attendance management, but also a guid systemfor visually impaired person, disaster evacuation guidance, etc. This system informs
the congestion situation to students outside a cafeteria in real time. We had a field
experiment of this system in a cafeteria, and tested the operation of this system.
Using this system, students can know how congested a cafeteria is at any placeoutside the cafeteria, and have a lunch comfortably when it was not crowded.
In section 2, we explain BLE and iBeacon used in our system. In section 3, we
describe the configuration of our system proposed in this paper. In section 4, we
describe an experiment and a result. In section 5, we describe conclusion and future
works.

Development of congestion state guiding system for university cafeteria

3

2 Bluetooth technology
2.1 Bluetooth Low Energy
In this section, we explain Bluetooth Low Energy (BLE) technology to help to understand our guiding system. BLE is one of Bluetooth standards. BLE is formulatedby the Bluetooth special interest group (SIG). BLE is installed after the Bluetooth
4.0 standard, and it is possible to operate with low power. BLE is a specification
derived from Wibree which is a proximity communication technology developed by
Nokia as its own wireless standard, so it is not compatible with Bluetooth 3.0 or
earlier. Therefore, terminals equipped with Bluetooth 4.0 or later are often implemented so that conventional Bluetooth 3.0 can also be used.
Frequency band is used by dividing into 40 channels of 2 MHz width at the
2.4 GHz band. Three channels are allocated to an advertisement channel used for
discovery and connection of BLE devices, and the rest channels are allocated to datachannels used for data communication. Frequency hopping is used as a method to
avoid interference. As a result, even if a specific channel can not communicate, data
communication can be continued if the channel is switched after a certain time.
Broadcast and connection are defined in BLE as a method between devices forcommunication. Broadcast is a communication method for unilaterally transmitting
data from one BLE device to other devices. In this communication method, a device
that transmits data is called a broadcaster, and a device that receives data is called
an observer. It is a characteristic that a broadcaster transmits the same data to unspecified observers at the same time. Connection is a communication method formutually transmitting and receiving data between a BLE device and another BLE
device. Transmission and reception of data is private only between the connected
devices.

2.2 iBeacon
We explain also iBeacon in this section. iBeacon is a technology for position detection and proximity detection using BLE proposed by Apple. This technology uses
broadcast communication of BLE. The sending terminal is called the peripheral,
the receiving terminal is called the central, and advertising that the peripheral sends
out information is called the advertisement. Central receives radio waves advertisedfrom peripherals and central processes according to the radio content.
iBeacon has two major functions. These are to detect entering and leaving fromthe area and to detect the extent of proximity between the peripheral terminal and thecentral terminal. The entrance and exit of the area is made based on whether or not
the radio wave emitted by the peripheral terminal has arrived. For the detection of
the degree of proximity, we estimate the approximate distance using RSSI. iBeacon
is compatible with iOS 7.0 or later, Android 4.3 or later.

4

Takafumi Doi, Hirotaka Ito, and Kenji Funahashi

3 System
3.1 Client application
To guide the congestion state of a cafeteria, the server to summarize it is needed.
The client application is also necessary for users to know the summarized data.
Therefore, our proposed system consists of client application and server software.
The client application should have two functions. One of them is to detect entering
into and leaving from the cafeteria, and then send the information to the server.
Another is to fetch the congestion state of the cafeteria, and then display it on theclient mobile device monitor.
In order to detect entering into and leaving from the cafeteria, it is necessary
to detect iBeacon. We use AltBeacon library published by Radius Networks [9].
When a client device detects a beacon attached in a cafeteria, the detection process
for entering into beacon area is performed, and then the proximity detection of abeacon is performed. Because the distance to the detected beacon can not be known
when it detects entering into the beacon area. A client device should judge whether
it is inside or outside a cafeteria by using the proximity detection of beacons. Fig.
1 shows the situation when the client device enters into a cafeteria. When it detects
some beacons, and the nearest beacon is at a cafeteria, it judges that it is inside acafeteria. Fig. 2 and Fig. 3 show the situation when the client device leaves fromthe cafeteria. When it detects some beacons too, and the nearest beacon is not at acafeteria, it judges that it is outside a cafeteria. And when no beacons are detected,
it judges that it is also outside a cafeteria.
The distance to a beacon is used as a criterion of this proximity detection.
The distance is obtained from Transmission Power (TxPower) and Received Signal Strength Indication (RSSI) as following equations.
T xPower − RSSI
20
distance = 10A
A=

(1)
(2)

The client application judges whether it is inside or outside a cafeteria at 20
second intervals. When the client application confirms entering into or leaving fromthe cafeteria, it is necessary to send the information to the server. In addition, it also
notifies the action to a user for confirmation.
Fig. 4 and Fig. 5 show an example of the application screen. The client displays
five items on the screen, and has one button for updating information. The five items
are:• Information on whether the user is inside or outside a cafeteria• The number of system users in a cafeteria• The number of people who use cafeteria estimated from the number of systemusers in cafeteria

Development of congestion state guiding system for university cafeteria

5• Three levels evaluation of congestion state• The transition of the estimated number of people in a cafeteria in the past
Fig. 6 shows the process of this system when the button is pressed. The client
application sends a request to the server, receives a response from the server, anddisplays each data.

Fig. 1 Situation that client device enters into a cafeteria

Fig. 2 Situation that client device leaves from the cafeteria

6

Takafumi Doi, Hirotaka Ito, and Kenji Funahashi

Fig. 3 Situation that client device leaves from the cafeteria and any

Fig. 4 An example of the application screen (Japanese version)

Development of congestion state guiding system for university cafeteria

Fig. 5 An example of the application screen (English version)

Fig. 6 Process of this system when the button is pressed7

8

Takafumi Doi, Hirotaka Ito, and Kenji Funahashi

3.2 Server software
The server should summarize the congestion state of a cafeteria; the number ofcafeteria users, and respond for a request from a client application. We use Apache
HTTP Server [10] published by Apache Software Foundation. The response information from a server is requires to be easier to understand. Therefore, this server
should estimate and evaluate the congestion state of a cafeteria from the turnover ofsystem users at a cafeteria. The response information should be displayed with not
only letters but also figures and graphs.
When a server gets the number of this system users in cafeteria, the number of theactual students having lunch there should be considered. So it estimates the numberof student who are in a cafeteria first, and then judges the congestion state in threelevels. It also serves the transition of the estimated number of people in the last 30
minutes at 10-minute intervals. The actual number of people there is estimated fromboth of the number of the system students using the attendance register subsystemusing BLE beacon with their own smartphone described above, and the number ofthe students having classes, it means, using the management system of attendance
using ID card and a smart card reader. The usage rate of the BLE beacon attendance
subsystem is 5% for example, the estimated number of people in a cafeteria is 20
times of the number of our system users who are detected in a cafeteria. The threelevel congestion state is decided from the ratio with the number of seats in a cafeteria. It is judged that it is a little crowded with more than 50% of the number of seats,
and it is crowded with 80% or more.

4 Experiment
4.1 Experimental method
We had an experiment at a university cafeteria using Android devices with client
application. The purpose of this experiment was to test the accuracy of the judgment
whether a client is inside or outside a cafeteria, and communication with the server.
In addition, it tested the displayed information of the congestion state of a cafeteria
at any place outside a cafeteria.
In this experiment, we asked five subjects to move as cafeteria users with Android
devices. Each subject had 2 to 5 devices, we used 18 devices totally, and they enteredinto a cafeteria through the east door one after another. Fig. 7 shows the iBeacon
positions, an entrance and an exit. No devices left from a cafeteria until all devices
entered. Then subjects left there from the east door one after another. No devices
re-entered. We recorded the actual number of the devices in a cafeteria, beacon
confirmation status of each device, and communication condition with the serveat every time of device entering and leaving. Each recording time is numbered inorder from the beginning of this experiment. Fig. 8 shows the appearance of thisDevelopment of congestion state guiding system for university cafeteria

9experiment at a cafeteria. Subjects held the devices with their hand or put them ona table in a cafeteria. After entering into a cafeteria, subjects sit apart there. At thattime we recorded the beacon detection result of each device. When leaving from acafeteria, the beacon detection results were also recorded. In addition, we checked
the server communication log of sent information from each device at each timeof entering and leaving. Fig. 9 shows the client device that displayed a subject wasoutside cafeteria.

Fig. 7 Entrance, exit and iBeacons

10

Takafumi Doi, Hirotaka Ito, and Kenji Funahashi

Fig. 8 Appearance of experiment at a cafeteria

4.2 Result and consideration
First we confirmed that the congestion state could be shown on the client screen
outside a cafeteria from Fig. 9. Experimental results of entering into and leavingfrom a cafeteria are shown in Table 1 and Table 2. We used all 18 device data at
the entering, and for leaving process we used 15 data of devices that were detected
correctly when entering.
Table 1 shows experimental results of entering into a cafeteria. The 16 client
devices judged their entering correctly. This means 88% accuracy. We guess that the
miss-judging devices were alongside the wall, then the RSSI of the beacon outside acafeteria was strong. The 10 client devices sent the entering information to the servercorrectly. This means 55% of all 18 devices, and 62% of the 16 devices that judged
their entering correctly. This communication result was far from satisfactory. We
consider the reason is that the client application tried to communicate with the server
to send the information, before the client woke up from the Wi-Fi sleep completely.
Table 2 shows experimental results of leaving from a cafeteria. The devices thatjudged leaving from a cafeteria correctly were all devices that judged entering there.
This result indicates that entering judgement is more difficult than leaving judgement, especially when a client is alongside the wall, and close to other beacon outside a cafeteria. The 12 client devices sent the leaving information to the servercorrectly. This means 80% of the target 15 devices, and it was higher than the communication result of the entering. We guess that most subjects left from there before
the devices slept down with Wi-Fi.
The client application almost could detect an entering into and leaving from acafeteria at this field experiment. The comparison of the distance between a device

Development of congestion state guiding system for university cafeteria

11

Fig. 9 Appearance of experiment outside a cafeteria

and a detected beacon also worked well to judge whether the device was inside oroutside a cafeteria. However, some clients could not send an entering information toa server. It is necessary to solve this problem because the reliability of a congestion
state would become wrong. A client should send the data after the confirmation of
Wi-Fi communication, and should confirm the acknowledgement from a server, thenretry to send it again if necessary. An exact judgement is important of course, and an
exact data transfer is also important to make a guidance of congestion state better.
Table 1 Results of experiment when entering into a cafeteria
Recording time number

12 3 4 5 6

Total number of devices entered cafeteria

2 7 10 12 15 18

Number of devices judged an entering correctly 2 6 9 11 13 16
Number of devices sent an entering data

2 4 5 8 9 10

12

Takafumi Doi, Hirotaka Ito, and Kenji Funahashi

Table 2 Results of experiment when leaving from a cafeteria
Recording time number

7 8 9 10 11

Total number of devices left cafeteria

3 5 10 12 15

Number of devices judged a leaving correctly 3 5 10 12 15
Number of devices sent an leaving data

3 5 8 9 12

5 Conclusion
Our final goal is to make a cafeteria more comfortable without waiting time forhaving lunch. In this paper, we proposed a new guiding system of a congestion
state for a university cafeteria using our university BLE beacon system. We built thesystem that consists of client application and server software. The number of people
having a lunch in a cafeteria can be counted, then the congestion state of a cafeteria
can be provided onto a mobile device.
We also had an experiment for our proposed system, then the proximity detectionof iBeacon worked well to accurately judge whether a client is inside or outside acafeteria. And the system user could know the congestion state of a cafeteria also
outside a cafeteria. Although clients could not communicate with a server to send
entering and leaving information of client because of Wi-Fi sleep probably, the experiment result was, on the whole, satisfactory.
For future work, we should consider that a client tries to send entering and leaving
information to a server after waking up from Wi-Fi sleep, and a server accurately
count the number of people in a cafeteria. After improvement this, we should havean experiment again. We also would like to rebuild an application to save power
consumption. The client application described in this paper is only for Android OS.
Therefor it is necessary to build an iOS application. Finally we will have a fielddemonstration, we expect that students will stagger cafeteria use and avoid rushhour by themselves after getting the congestion state of a cafeteria before coming
there from a class room and laboratory.
Acknowledgements The authors would like to thank our colleagues in our laboratory for useful
discussions. The experiment of this work was supported in part by NTT DOCOMO, INC.

References
1. Fawzi M. Al-Naima, Ramzy S. Ali, Ahmed J. Abid: Design of an Embedded Solar Tracking System Based on GPS and Astronomical Equations, International Journal of Information
Technology and Web Engineering, 9(1), 12-30 (2014)
2. Bin Zhou, Jeffrey Hsu, Yawei Wang: GIS and GPS Applications in Emerging Economies:
Observation and Analysis of a Chinese Logistics Firm, International Journal of Information
Systems and Social Change, 1(3), 45-61 (2010)

Development of congestion state guiding system for university cafeteria

13

3. Ruiling Gao, Alva Couch, Chorng Hwa Chang: An Innovative Positioning System with Unsynchronized Interferometric Modulated Signals in Wireless Sensor Networks, International
Journal of Networked and Distributed Computing, 5(2), 101-112 (2017)
4. Zhongwei Zhang: Modeling Performance of CSMA/CA with Retransmissions in Wireless
Personal Area Networks, International Journal of Networked and Distributed Computing, 1(2),97-107 (2013)
5. Daiki Kudou, Mitsuyoshi Horikawa, Tatsuya Furudate, Azuma Okamoto: The proposal ofIndoor Positioning System by Area Estimation Using BLE Beacon, The 78th national convention of Information Processing Society of Japan (IPSJ), 3,245-426 (2016, in Japanese)
6. Hiroki Ishizuka, Daisuke Kamisaka, Mori Kurokawa, Takafumi Watanabe, Shigeki Muramatsu, Chihiro Ono: A Fundamental Study on a Indoor localization method using BLE signals and PDR for a smart phone: Sharing results of exmeriments in Open Beacon Field Trial,
IEICE (The Institute of Electronics, Information and Communication Engineers) Technical
Report MoNA (Mobile network and applications), 114(31), 133-138 (2014, in Japanese)
7. Apple Inc.: iBeacon for Developers,
https://developer.apple.com/ibeacon/
8. Bluetooth SIG: Bluetooth Low Energy,
https://www.bluetooth.com/what-is-bluetooth-technology/how-it-works/low-energy
9. Radius Networks, Inc.: AltBeacon,
http://altbeacon.org/
10. Apache Software Foundation: Apache HTTP Sever,https://httpd.apache.org/