Content uploaded by Changmin Lee
Author content
All content in this area was uploaded by Changmin Lee on Sep 23, 2020
Content may be subject to copyright.
Self-Error Detecting and Correcting Algorithm for
Accurate Occupancy Tracking using a Wireless
Sensor Network
Changmin Lee
Korea Railroad Research Institute
Uiwang, South Korea
lcm240@krri.re.kr
Duckhee Lee
Korea Railroad Research Institute
Uiwang, South Korea
dhlee27@krri.re.kr
Abstract—For a variety of smart building applications, the
accurate occupancy counting is regarded as one of the most
important factors. This is because it becomes the basic information
of smart building applications. Most of the applications for smart
building have been operated based on their occupancy. So, many
researchers have been trying to discover reliable occupancy
counting system. But, most of their studies are focused on reducing
the device error caused by sensors and counting algorithm, using
machine learning algorithms. But, we are focusing on the
accumulated error problem of the counting system. As the
operating time increased, the accumulated error problem becomes
more serious continuously. To solve this problem, we propose a
Self-Error Detecting and Correcting Algorithm (SEDCA), consists
of a Self-Error Detecting Algorithm (SEDA) and Self Error
Correcting algorithm (SECA). All of the devices counting persons
transfer and receive the counting information to other neighbor
devices in order to sharing counting information within wireless
network. Using this wireless network property, a SEDCA could
detect and correct the counting error. In order to poof our
proposed algorithms, we consisted an experimental environment
with Passive RFID counters in our testbed. As a result, we will
expect to avoid the accumulated error problem of occupancy
counting.
Keywords—Occupancy Tracking Algorithm; Wireless Network;
Internet of things; Cyber Physical System; Smart Buliding;
Evacuation assistance
I. I
NTRODUCTION
As the next industrial generation has become more realized,
all over the world cities and buildings have been becoming
smarter with a variety of smart applications for smart city, such
as Building Energy Management System (BEMS), Cyber
Physical System (CPS) and Disaster Action System. That would
be helpful to solve the social and environmental problems [1].
Energy consumption of building in cities is closely related with
the ܥܱ
ଶ
emission quantity. BEMS is the one of the solutions to
reduce the energy consumed by building and also to decrease the
quantities of ܥܱ
ଶ
emissions. Lighting, Heating and Ventilation
and Air Conditioning (HVAC) systems are the energy
consumption factors necessarily required by any building
regardless of the use pattern [2]. Occupancy counting is one of
the most important factors because it is the basic information for
most of the smart building applications [3]. Also, the skyscrapers
and large complex facilities have been continuously increasing
in worldwide since few years ago [4]. This trend has been
emerging newly proposed issues. One of these issues is the
evacuation safety [5]. The skyscrapers and large complex
facilities have been made architecture structure more complex,
almost likes maze [6]. Because of the structural complexity,
occupants both familiar and strange with the building structure
hard to recognize the evacuation route or their position in the
emergency situations, such as fire and earthquake. For that
reason, disaster managers of skyscrapers should give the
information related with an evacuation path and disaster status
to their occupants. In this time, accurate occupancy counting can
be an important factor to assist to find occupant’s optimal
evacuation path. Most researchers have focused on the accurate
people counter, likes camera, RF and infrared and so on [7-12].
But, in this paper, we focused on the accumulated errors caused
by sustained operating time. So, this paper proposes the error
detecting and correcting algorithms for fixing the accumulated
errors. Additionally, the occupancy tracking system should be
available to operate reliably with battery as wireless sensor
network and wired energy transfer system would be damaged in
disaster environment. Otherwise, the application systems for
evacuation assistance would become impossible to operate. To
overcome this problem, wireless sensor network based on
battery energy sources must be able to maintain the connectivity
using self-organized algorithms and self-sustainable algorithms
[13]. Contributions are summarized by below:
•This paper focused on solving the accumulated error
problem unlike counting errors (sensing errors).
Although you use the most accurate occupancy counting
techniques, you do not prevent the error problem this is
because you do not avoid accumulated errors with
increasing the operating time.
•This paper proposed a self-error detecting and
correcting algorithm (SEDCA). SEDCA had been
designed that it can detect emerged errors, find the error
point and eventually fix it as it uses the wireless sensor
network with share their information of each node.
•This paper was set up the reliable models of sensor
properties, a network system and algorithms. We show
mathematical modeling of network structure and
proposed algorithm (SEDCA). Additionally, we show
the performance of our proposed algorithms.
S13 - 1570549915 - 1806 © SpliTech 2019
TABLE I. C
OMPARERISON OF
O
CCUPANCY
S
ENSONG AND
M
ONITORING
T
ECHNOLOGIES
[7-12]
Categories
Technologies Advantages Drawbacks
Occupancy
Detection
PIR Sensor Economically and technically simple, effectively
detect the people’s motion, most commonly used Not appropriate counting occupancy, low reliability
ଶ
Sensor Technically simple, estimate the number of
occupants
Sensitive the change of environment, unsuitable for
real-time application
Occupancy
Counting
Camera Very high accuracy combined with AI, appropriate
counting the occupancy with HVAC application Privacy, sensitive the light intensity and smoke
Infrared Simply designed, economically and technically
simple Low accuracy
Occupancy
Tracking
RFID Using the smartphone function, low cost, high
accuracy
RFID tag absence(additional tag), different RFID
frequency and protocol
WiFi Using originally existed access points in buildings Traffic problem, inconsistent connection, security
problem
Bluetooth High accuracy, low energy Additional tag, Massive multi-access problem
Occupancy
Behavior
Recognition
IoT
technologies
using sensors
High accuracy, environmentally flexible,
optimization to each application Costly disadvantage, high complexity
This paper is consisted with as follows Section ซ shows the
summary of occupancy counting techniques. Section ฌ
explains and defines an accumulated error and the problems of
occupancy counting. Section ญ is included our contributions,
likes system modeling, error detection and error correction
algorithms proposed in this paper. Finally, section ฎ
demonstrates the performance and advantage of our proposed
contributions.
II. R
ELATED
W
ORKS
A. Occupancy sensing and monitoring techniques
For a decade, in order to increase the efficiency of energy
management system or evacuation assistance system, many
researchers have been developing the various counting
techniques, such as radio frequency identification (RFID),
Infrared, video camera, Bluetooth (Beacon), Wi-Fi, and various
sensor utilized technologies [9-11]. In this section, we explain
and compare each of occupancy counting technologies. And
also, we would clearly define the advantages and drawbacks.
Table Ϩ shows the classified technologies by properties and
summarized advantages and drawback of each technology.
III. P
ROBLEM
S
TATEMENT
For a decade, occupancy problem have been becoming more
important and developing more complex with increasing
applications using occupancy. Many researchers have kept
trying to develop the counting techniques, such as radio
frequency identification (RFID), Infrared, video camera,
Bluetooth (Beacon), Wi-Fi, and various sensor utilized
technologies [9-11]. Occupancy counting technologies are
divided into four categories: Occupancy Detection, Counting,
Tracking and Behavior recognition.
A. Occupancy Detection
Occupancy detection problem is a basic concept. In this
problem, detecting the occupant in the building regardless of
numbers is just a whole object of the system. So, there are
simple technologies, likes PIR sensor and ܥܱ
ଶ
sensor. In this
part, the accuracy of the technology is not important since the
object of this problem knows the information which a person is
in there or not. This method can easily set up with low cost, low
technical complexity [7,8].
B. Occupancy Counting
For utilizing more diverse applications, occupancy counting
techniques are required. Needs of the accurate occupancy
counting have been being increased by optimizing performance
of the applications, for example, building energy management
system. There are diverse technologies for occupancy counting
problem. Representatively, there are cameras and infrared
technologies. Occupancy counting techniques can support
energy optimization applications, such as HVAC and lighting
system [7-9].
C. Occupancy Tracking
Occupancy Tracking is more advanced techniques than
occupancy counting. This problem not only count the occupants
in building, but also tracing each occupant, where are they and
where are moving from-to. Some applications are essentially
required the occupancy tracking information. For instance, there
is an evacuation assistance system. System managers should
have the information that evacuees in building are moving from-
to where in order to give an accurate and optimized evacuation
route to the evacuees [7-9].
D. Occupancy Behavior Recognition
Occupancy behavior recognition is needed to optimize the
energy consumption and satisfy the needs of occupants.
Managers in buildings can know about the usage status and
behavior of all occupants. Although it might be caused to the
privacy problem, occupancy behavior recognition is a necessary
technique to optimize the energy consumption. We can predict
the required and consumed energy usage in any time as we use
these behavior patterns [7-12].
IV. C
ONTRIBUTIONS
To solve accumulated error problem, we defined the
accumulated error and made a model. First, we show the
seriousness of the accumulated error problem. And we propose
S13 - 1570549915 - 1806 © SpliTech 2019
Fig. 1. This graph shows the significance of accumulated error problem
a self-error detecting algorithm and self-error correcting
algorithm based on sharing their counting information with
other sensing node. We show the algorithm’s definition and
operation flow in under section as far as details.
A. Modeling the accumulated error problem
In this section, we would define the accumulated error as
using a mathematical approach. We were considered all error
problem to the probability theory. General business and
commercial building have a similar In and Out pattern of the
occupants since utilization object and property of the residents
are fixed and do not easily change. We made the mathematical
model of occupancy using this In and Out pattern. ܺ
ௌ
ሺݐሻ is the
simultaneous In and Out pattern modeled by using the
occupancy flow statistics of each building, ܺ
ሺݐሻ is the all
occupancy pattern in building. ܺ
ௌ
ܺ
are based on
specialized probability and statistics model by each building.
Fist, we defined accumulated error probability as ܲ
ா
.ܲ
ௌா
is the
sensing error probability of counting techniques. d is the
operating days. Detailed equation in below:
ܺ
௦
ሺݐሻൌܺ
ᇱ
ሺݐሻൌ
ο
ο௧
ܺ
ሺݐሻ (1)
ܲ
ா
ሺ݀ሻ ൌ ሺܲ
ா
ሺ݀ െ ͳሻ כ ܲ
ௌா
ଶ
ሻ (2)
B. SEDA: Self-error detecting algorithm
To solve the accumulated error, occupancy counting
systems should directly know the events that the errors are
occurred in a system. In this reason, self-error detection
technique is one of the most important and basic element for
occupancy tracking. So, we are focusing on developing an
accurate detection algorithm. We are using the wireless sensor
network and sharing the counting information with every sensor
nodes for detecting emerged errors without misunderstand. We
are defined the sensor nodes in each floor started from the most
outside door classified by floor or outside in hierarchically. ܵ
ூ
is meant the identification number of each sensor nodes. Figure
2 explains details and shows an example of the proposed sensor
Fig. 2. Sensor node numbering method and information sharing machanism
Fig. 3. Example of classifing all sensor nodes to the layers
Fig. 4. The definitions of the occupancy counting system’s operation
notations and algorithm.
node’s notation method. Sensor nodes are classified into
layers according to the number of doors that pass through the
interior space. Figure 3 shows an example of how sensor nodes
can be categorized into layers. And, figure 4 shows the notation
and algorithm definitions for the operation of the occupancy
counting system. We used the concept of network access
protocol, Slotted TDMA. And also, we defined the slotted time
as ܶ
ூ
. The difference of counting numbers among the layer
means the number of persons stayed in the room between the
layers. Basic concept of this algorithm is the compare all
counting numbers going outside and that going inside. Self-
error detecting algorithm is explained in details below:
S13 - 1570549915 - 1806 © SpliTech 2019
SEDA: Self-error detecting algorithm
Classify the sensor node to the n-th layer according to the passed door
numbers.
Define the number of sensor node at each layer: ࡺ
ǡࡺ
ǡǥ.
Define the size of bits in order to express the ID of the sensor nodes:
ڿࢍ
ࢇ࢞ሺࡺ
ǡࡺ
ǡࡺ
ǡǥ ሻۀ
ሾ܊ܑܜܛሿ
Define ID of every sensor node: ࡿ
ࡵࡰ
.
Transmission the ID information to all sensor nodes.
Define data transmission intervals of every sensor node is ࢀ
ࡵ
Each sensor node’s operational algorithm is explained below:
unsined int ID = ( );
short in counting number, out counting number = 0;
boolean in detection, out detection = 0;
short counting number of upper layer = 0;
short counting number of under layer = 0;
short neighbor[ࡺ
࢞
] = {0,0,0,…};
short total number of this layer = 0;
While(1) {
if (in detection == true) {
in counting number ++ ;
}
else if(out detection == true) {
out counting number ++;
}
}
When every time at ࢀ
ࡵ
, Tx and Rx their counting inforamtion to the
next layer.
Error emerged situations :
If the total number of occupants per layer is different.
Using the SEDA, we could know about the status of
occupants in the building. We can precisely manage the number
of occupants in the building through the sum of one layer and
the difference between the other layers by separating the layers
according to the inquiry document that the attendant is overdone.
This allows us to accurately detect the occurrence of an error.
C. SECA: Self-error correcting algorithm
We were able to detect correct errors through SEDA. We
also propose an algorithm that can correct the detected errors by
themselves. This section describes in detail the SECA that we
propose to correct errors. Before we introduce the proposed
algorithm (SECA), we explain the operating mechanism of the
proposed occupancy counting system. This is described with
figure 4 in details below:
ܺ
ሺ݊ܶ
ூ
ሻൌܺ
ଵ
ሺ݊ܶ
ூ
ሻ (3)
ܺ
௫
ሺ݊ܶ
ூ
ሻൌܺ
௫
൫ሺ݊െͳ
ሻܶ
ூ
൯ܦ
௫
ሺሻ
൫ሺ݊െͳ
ሻܶ
ூ
൯
െܦ
௫
ሺ௨௧ሻ
ሺሺ݊ െ ͳሻܶ
ூ
ሻ (4)
ܴ
௫
ሺ݊ܶ
ூ
ሻൌܺ
௫
ሺ݊ܶ
ூ
ሻെܺ
௫ାଵ
ሺ݊ܶ
ூ
ሻ (5)
ܦ
௫
ሺሻ
ሺ݊ܶ
ூ
ሻൌܦ
௫ǡଵ
ሺሻ
ሺ݊ܶ
ூ
ሻܦ
௫ǡଶ
ሺሻ
ሺ݊ܶ
ூ
ሻڮܦ
௫ǡே
ೣ
ሺሻ
ሺ݊ܶ
ூ
ሻ (6)
The equation 6 are adopted same in ܦ
௫
ሺ௨௧ሻ
ሺ݊ܶ
ூ
ሻ.ܦ
௫
means
the summation value of all counter number in the same layer
distinguished In and Out values.
Error Detection Case :
ܴ
௫
ሺሺ݊ െ ͳሻܶ
ூ
ሻ൏ܦ
௫
ሺ௨௧ሻ
ሺ݊ܶ
ூ
ሻܦ
௫ାଵ
ሺሻ
ሺ݊ܶ
ூ
ሻ (7)
The system using our proposed algorithm would fix the
detected errors. In upper case, if the system would detect the
errors emerged by the counting sensor node, SECA would be
operated in this system. We describe SECA in details below:
SECA: Self-error correcting algorithm
Check the number of ࡰ
࢞
ሺ࢛࢚ሻ
ሺࢀ
ࡵ
ሻ and ࡰ
࢞
ሺሻ
ሺࢀ
ࡵ
ሻ
Define the counting sensor error probability of ࡼ
ࡱ
ሺࢉሻ
Define each counter value of sensor nodes : ࡰ
࢞ǡࡺ
࢞
ሺ
ሻ
ሺ
ࢀ
ࡵ
ሻ
and
ࡰ
࢞ǡࡺ
࢞
ሺ࢛࢚ሻ
ሺࢀ
ࡵ
ሻ
Define the array of counting number of all node in all layer:
ሾࡰ
࢞ାǡࡺ
࢞శ
ሺሻ
ሿ,
ሾࡰ
࢞ǡࡺ
࢞
ሺ࢛࢚ሻ
ሿ
int max error probability = 0;
for (i =ࡺ
࢞ା
; i <= 0 ; i--) {
if( max error probability < ࡼ
ࡱ
ሺࡰ
࢞ାǡ
ሺሻ
ሻ) {
max error probability = ࡼ
ࡱ
ሺࡰ
࢞ାǡ
ሺሻ
ሻ;
}
}
for (j =ࡺ
࢞
; j <= 0 ; j--) {
if(max error probability < ࡼ
ࡱ
ሺࡰ
࢞ǡ
ሺ࢛࢚ሻ
ሻ) {
max error probability = ࡼ
ࡱ
ሺࡰ
࢞ǡ
ሺ࢛࢚ሻ
ሻ;
}
}
We could make and use the counting sensor error probability
of ܲ
ா
ሺܿሻ to calculate the highest error probability sensor node.
The counting sensor error probability is a specification and
characteristic of each occupancy sensing techniques. SECA can
fix the counting number of the sensor node as much as emerged
errors. If multi-errors would be emerged, we would multiply the
error value and counting sensor error probability, and calculate
the proportion of errors per sensor node. According this
proportion, we adjust the counting value of all sensor nodes. As
a result, we could solve the accumulated error problem by using
SEDCA.
D. Passive RFID counting system environment
In order to test our proposed algorithm, we are set up the test
environment system using passive RFID. Object of building up
this environment is that we are counting the evacuation persons
in indoor and outdoor. Using this information, we would give
an assistance to the rescue people. We are embedding the
passive RFID Tag to the fire evacuation mask. We were chosen
the passive RFID tag considering the energy problem and size.
Figure 5,6 shows the hardware and system configuration. We
built these systems in the test-bed in order to demonstrate our
proposed algorithm. Our experiments are still ongoing. If our
experiment would be over, we would expect that we show more
accurate performance of our contribution. And we also will
adopt this system to the building energy management system or
other smart building applications.
S13 - 1570549915 - 1806 © SpliTech 2019
Fig. 5. Passive RFID tags are used our system.
Fig. 6. A smaple of RFID reader are used our system.
CONCLUSION
We have recognized the problem of cumulative error in the
system of counting the attendance and studied ways to solve it.
It is also important to concentrate on the research on error-free
counting method to solve the error of the existing single node,
but it is also recognized that it is important to solve the problem
of cumulative error accumulated in the entire system due to
continuous operation. In order to solve this problem, we
developed an algorithm that can detect and correct self-
generated errors by applying wireless sensor network and IoT
technology. Applying the proposed algorithm to the system that
counts the occupation can solve the problem of accumulated
errors. We proposed the classification method of the sensor
node in order to distinguish the building to the layer according
to the section. And using this classification method, we can
know the all people counting number of each section and
compare the total number of people inside to this layer and that
of people outside to neighbor layers. Using this method, we can
detect the error. Eventually, we calculate the error probability
according to the characteristics of the counting sensor that we
used. We find the highest error probability and fix the number
of the sensor node that has the highest error probability.
Furthermore, our experiment test-bed are still ongoing as a
project. We will expect the proof the advanced and accurate
performances of our proposed algorithms.
A
CKNOWLEDGMENT
This work was supported by the NST [CRC-16-02- KICT,
Integrated CPS for disaster / disaster response to high- rise and
complex facilities based on open platforms]
R
EFERENCES
[1] C. Lee, D. Lee and J. Lee, "Occupancy-based adaptive dimmable lighting
energy management scheme combined with cyber physical system," 2018
International Conference on Information Networking (ICOIN), Chiang
Mai, 2018, pp. 605-610.
[2] T. A. Nguyen and M. Aiello, “Energy intelligent buildings based on user
activity: A survey,” Energy and Buildings, vol. 56, pp. 244-257, 2013,
ISSN 0378-7788.
[3] Varick L. Erickson, Stefan Achleitner, and Alberto E. Cerpa, “POEM:
power-efficient occupancy-based energy management system,” In
Proceedings of the 12th international conference on Information
processing in sensor networks (IPSN '13). ACM, New York, NY, USA,
pp. 203-216, 2013.
[4] J. Gabel, “Tall trends: quantifying the skyscraper phenomenon,” E3S
Web Conf., vol. 33, 2018.
[5] J. Kang, I. Jeong and J. Kwun, “Optimal facility–final exit assignment
algorithm for building complex evacuation,” Computers & Industrial
Engineering, vol. 85, pp. 169-176, 2015, ISSN 0360-8352.
[6] M. M. Ali and K. S. Moon, “Structural Developments in Tall Buildings:
Current Trends and Future Prospects,” Architectural Science Review,
vol. 50:3, pp. 205-223, 2007.
[7] J. Yang, M. Santamouris and S. E. Lee, “Review of occupancy sensing
systems and occupancy modeling methodologies for the application in
institutional buildings,” Energy and Buildings, vol. 121, pp. 344-349,
2016, ISSN 0378-7788.
[8] H. Zou, H. Jiang, J. Yang, L. Xie and C. Spanos, “Non-intrusive
occupancy sensing in commercial buildings,” Energy and Buildings, vol.
154, pp. 633-643, 2017, ISSN 0378-7788.
[9] K. Akkaya, I. Guvenc, R. Aygun, N. Pala and A. Kadri, "IoT-based
occupancy monitoring techniques for energy-efficient smart buildings,"
2015 IEEE Wireless Communications and Networking Conference
Workshops (WCNCW), New Orleans, LA, 2015, pp. 58-63.
[10] S. Depatla, A. Muralidharan and Y. Mostofi, "Occupancy Estimation
Using Only WiFi Power Measurements," in IEEE Journal on Selected
Areas in Communications, vol. 33, no. 7, pp. 1381-1393, July 2015.
[11] B. S. Çiftler, S. Dikmese, ø. Güvenç, K. Akkaya and A. Kadri,
"Occupancy Counting With Burst and Intermittent Signals in Smart
Buildings," in IEEE Internet of Things Journal, vol. 5, no. 2, pp. 724-735,
April 2018.
[12] Yordan P. Raykov, Emre Ozer, Ganesh Dasika, Alexis Boukouvalas, and
Max A. Little, “Predicting room occupancy with a single passive infrared
(PIR) sensor through behavior extraction,” In Proceedings of the 2016
ACM International Joint Conference on Pervasive and Ubiquitous
Computing (UbiComp '16), New York, NY, USA, 2016, pp. 1016-1027.
[13] C. Lee and J. Lee, "Harvesting and Energy aware Adaptive Sampling
Algorithm for guaranteeing self-sustainability in Wireless Sensor
Networks," 2017 International Conference on Information Networking
(ICOIN), Da Nang, 2017, pp. 57-62.
S13 - 1570549915 - 1806 © SpliTech 2019