Content uploaded by Hamada Rizk
Author content
All content in this area was uploaded by Hamada Rizk on Feb 04, 2022
Content may be subject to copyright.
Indoor Localization using Solar Cells
Hamada Rizk
Grad. Sch. of Info. Sci. and Tech.,
Osaka University, Osaka, Japan
& Tanta University, Tanta, Egypt
hamada rizk@f-eng.tanta.edu.eg
Dong Ma
Sch. of Comp. and Info. Sys.,
Singapore Management University, Singapore
dongma@smu.edu.sg
Mahbub Hassan
Sch. of Comp. Sci. and Eng.,
University of New South Wales, Australia
mahbub.hassan@unsw.edu.au
Moustafa Youssef
Dept. of Comp. and Sys. Eng.,
AUC & Alexandria University, Egypt
moustafa-youssef@aucegypt.edu
Abstract—The development of the Internet of Things (IoT)
opens the doors for innovative solutions in indoor positioning
systems. Recently, light-based positioning has attracted much
attention due to the dense and pervasive nature of light sources
(e.g., Light-emitting Diode lighting) in indoor environments.
Nevertheless, most existing solutions necessitate carrying a high-
end phone at hand in a specific orientation to detect the light
intensity with the phone’s light sensing capability (i.e., light
sensor or camera). This limits the ease of deployment of these
solutions and leads to drainage of the phone battery. We propose
PVDeepLoc, a device-free light-based indoor localization system
that passively leverages photovoltaic currents generated by the
solar cells powering various digital objects distributed in the
environment. The basic principle is that the location of the
human interferes with the lighting received by the solar cells, thus
producing a location fingerprint on the generated photocurrents.
These fingerprints are leveraged to train a deep learning model
for localization purposes. PVDeepLoc incorporates different regu-
larization techniques to improve the deep model’s generalization
and robustness against noise and interference. Results show that
PVDeepLoc can localize at sub-meter accuracy for typical indoor
lighting conditions. This highlights the promise of the proposed
system for enabling device-free light-based localization systems.
Index Terms—solar panels, deep learning, indoor localization,
device-free localization
I. INTRODUCTION
The current advances in the sensing capabilities of IoT
devices open the door for the next generation of human-
centric applications [1]–[14]. Accurate energy-efficient indoor
localization comes on top of these applications. While GPS has
mostly solved the localization problem in outdoor scenarios,
it cannot work indoors due to the absence of the line of
sight to reference satellites. Therefore, industry and academia
have been devoting immense effort to find a pervasive indoor
positioning system.
WiFi-based localization has been one of the main indoor
localization approaches due to the widespread use of WiFi
access points (APs) [4]–[7]. However, this solution suffers
from practical issues such as wireless channel dynamics,
fading, interference, and environmental noises that lead to
unstable performance. More recently, cellular signals have
been used for indoor tracking [8]–[14]. These systems are
designed to map the received signal strength from the cell
towers covering the area of interest to the corresponding user
location. Unlike WiFi-based networks, cell towers are located
outside buildings transmitting long-range signals. Therefore,
the received signals are noisy and highly affected by the
sensitivity of the measuring device (i.e., cell phone) [8], [11],
[12].
Light-emitting diodes (LEDs) is a new lighting technology
offering long lifetime and energy-saving. As LEDs are often
deployed at a much higher density compared to WiFi APs,
light-based localization can potentially achieve higher localiza-
tion accuracy. Current light-based localization techniques [15],
[16] are designed to locate the user based on the light intensity
received by the user smartphone. However, leveraging the
user smartphone limits its wide adoption to only users with
high-end phones (i.e., equipped with light sensor or camera).
Moreover, even with the availability of such high-end phones,
the localization system cannot work when the phone is not
exposed to the light source (e.g., the phone is in the user’s
pocket or bag). Additionally, the diversity of smartphones,
e.g., the sensor sensitivity, sensor placement, and sampling
rate, leads to a significant drop in the localization performance
when the testing phone is different from the ones used in the
calibration phase [8]. Finally, continuous light-sensing leads
to rapid battery drainage, especially with phones powered by
small batteries.
Recently, there has been a trend of fitting many indoor
Internet of Things (IoT) devices with solar cells to extend their
battery life or enable completely battery-free operation [17].
Inspired by this, we propose PVDeepLoc, a novel device-
free and energy-free light-based indoor localization system
that passively leverages photovoltaic currents generated by
the solar cells distributed in the environment. The basic
principle is that the location of the human interferes with the
lighting received by the solar cells, thus producing a location
fingerprint on the generated photocurrents. The fingerprints
collected at pre-defined reference locations are used for train-
Model
Creator
Data
Collector Location
Predictor
Pre-
processor
Offline
Online
Photocurrent
vector
Fingerprint
Collector
Photocurrent
vector
Pre-
processor
Fingerprint
dataset
model
Fig. 1. The architecture of the PVDeepLoc system.
ing an efficient deep learning-based localization that learns the
complex relationship between the photocurrent measurements
of the installed solar cells and the user location. Moreover,
PVDeepLoc employs different model regularization techniques
to increase the system generalization ability and select the
model’s configurations optimally.
The rest of the paper is structured as follows. Section II
introduces the detailed implementation and discusses the role
played by each module of the proposed PVDeepLoc sys-
tem. Section III validates PVDeepLoc performance with the
experimental evaluations. Finally, we conclude the paper in
Section IV.
II. TH E PVDeepLoc SYS TE M
Fig. 1 shows the PVDeepLoc system architecture.
PVDeepLoc works in two phases: an offline training phase
and an online tracking phase. During the offline phase, the
area of interest is partitioned into uniform virtual grids (i.e.,
have equal sizes). Then, the photocurrent measurements cor-
responding to the received light are obtained while the user
is located at an arbitrary grid in the environment by the solar
cells and recorded. The obtained readings are forwarded to
the Pre-processor module to prepare consistent length feature
vectors of photocurrent measurements enabling traing a local-
ization model. Next, the Model Creator module constructs and
trains a deep neural network while also selecting the optimal
parameters for the model with provisions to avoid over-fitting.
Finally, the optimal model is then saved for later use by the
online Location Predictor module.
During the online phase, the user is at an unknown location
while the solar cells receive light intensities from the light
sources in the area of interest. The photocurrent feature vector
is obtained the Pre-processor module. Finally, the Location
Predictor module feeds the processed input vector to the
localization model constructed in the offline phase to estimate
the likelihood of the user being at any grid of the already
defined ones at the offline phase.
A. The pre-processor module
This module runs during both the offline and online phases.
It processes the measured photocurrent values from the in-
stalled solar cells. Specifically, the Pre-processor forms the
photocurrent values in a feature vector (where each entity
g1
Hidden Layers
Input Layer Output Layer
g2
gn
a1
a2
an
Photocurrent features
Fig. 2. Network structure. The input is the photocurrent feature vector and
the output is the probability distribution for different reference grids. Grey-
shaded neurons represent examples of temporarily dropped out neurons.
represents a reading from a corresponding solar cell) that fit the
input length of the localization model. Then, the feature vector
is re-scaled to the range of [0,1] due to the neural network’s
sensitivity to the input scale. Finally, to handle the noise that
may be accompanied to the received light due to transient
additional light or environment changes, PVDeepLoc employs
the data augmentation framework proposed in [18] and outlier
removal [19], [20]. The framework generates synthetic data
from samples collected over a short-term that reflect the typical
variation in measurements. It offers an additional advantage of
combating the possible bias problem which may occur due to
training with a small amount of data and affect the model
generalization ability.
B. The localization model creator
This module is responsible for training a deep localization
model and finding its optimal parameters. The selected model
will be used during the online phase by the Location Pre-
dictor module to provide an estimate for the user location.
PVDeepLoc employs a deep fully-connected neural network
due to its hierarchical representational ability, enabling the
learning of complex patterns [21].
1) The network architecture: Fig. 2 shows our deep net-
work structure. We construct a deep fully connected neural
network consisting of cascaded hidden layers of nonlinear
processing neuronal units. We use the hyperbolic tangent
function (tanh) as the activation function for the hidden layers
due to its non-linearity, differentiability (i.e., having stronger
gradients and avoiding bias in the gradients), and consideration
of negative and positive inputs [22]. The network’s input layer
is a vector of length krepresenting the photocurrent feature
vector. The output layer consists of a number of neurons
corresponding to the number of reference grids of the area
of interest that is defined by the simulator. This network is
trained to operate as a multinomial (multi-class) classifier by
leveraging a Softmax activation function in the output layer.
This leads to a probability distribution for the expected grids
given an input difference vector.
During the offline phase, the ground-truth probability label
vector P(ai)=[p(ai1), p(ai2)...p(ain)] is formalized using
one-hot-encoding. This encoding has a probability of 1for the
correct reference grid and 0for others. The model is trained
using the Adaptive Moment Estimation (Adam) optimizer to
minimize the mean cross-entropy between the estimated output
probability distribution P(ai)and the one-hot-encoded vector
gi.
2) Preventing over-fitting: To increase the model robust-
ness and further reduce over-fitting, PVDeepLoc employs two
regularization techniques: First, we use dropout regularization
during the network training (Fig. 2). We also adopt early stop-
ping regularization method to automatically stop the training
process at an optimal point in time when the performance
improvements are no longer gained.
C. Online phase
This phase aims to locate the user in real-time, after
deploying the system, using the measured light intensities from
the installed solar cells in the area of interest. This can be
done by calculating the corresponding photocurrent vector as
a feature vector as described previously. Thereafter, this vector
is fed to the trained localization model obtained to estimate the
user location as one of the grids defined at the configuration
phase. The grid g∗with the maximum probability given the
feature vector (c) is selected. That is, we want to find:
g∗= argmax
r
[P(g|c)] (1)
We implemented our deep learning-based training using
the Keras learning library on top of the Google TensorFlow
framework.
III. PROO F-O F-CONCEPT IMPLEMENTATION
A. Experimental Setup
In this section, we describe the data collection setup in a real
room that spans an area of 2m×3min a residential building
(denoted experimental testbed). The testbed is equipped with
four vertically installed solar cells at the four walls of the
rooms, as shown in Fig. 3. The figure shows the 3D coordinate
of the considered cells. Each solar cell has 15.5% efficiency
with dimensions: length, width and depth of 10cm, 7cm
and 0.15cm, respectively. The room is illuminated with a
chandelier of 8lamps of 40 watt each, i.e., 450 lumens.
This light source is hung in the center of the room’s ceiling
at the height of 1.9m from the floor. The experiment area
is uniformly partitioned into 24 different grids with 0.5m
spacing. The data is collected while the user stands at the
center of each grid cell (i.e., reference points).
TABLE I
DEFAU LT PARAM ETE RS VAL UES U SE D IN TH E EVALU ATION .
Parameter Range Default
Learning rate 0.0001 - 0.2 0.001
Dropout rate (%) 0 - 90 5
Early stopping patience 1-100 40
Number of hidden Neurons 20 - 1000 220
Number of layers 2 - 30 6
Number of training samples per grid 1 - 640 640
TABLE II
THE L OCA LI ZATIO N ER RORS O F TH E PRO POS ED S YST EM .
Min 25th Perc. Median 75th perc. Avg. M ax
0.01 0.29 0.63 1.16 0.71 1.81
For capturing the photocurrent reading from a solar panel,
we connected the solar panel to an analog to digital converter
(ADC) whose output is fed to a Raspberry Pi (RPI) module.
The measurements are recorded using our Python implementa-
tion, which sends an HTTP request to the four installed RPIs to
get the response of photocurrent readings from their connected
solar panels. These readings are aggregated into one sample
stored in our fingerprint database. We collected 50 samples of
photocurrent readings while the user was standing at the center
of each reference grid. To enable the effective adoption of the
deep learning model, the number of samples captured at each
grid is increased to 400 using the proposed data augmentation
methods (Section II-A).
B. Experimental results
Table II summarizes how PVDeepLoc performs in the
considered testbed. Specifically, the PVDeepLoc’s localization
performance is evaluated by calculating the Euclidean distance
error between the ground-truth location and the estimated
user location. The reported results in the table confirm the
good performance of the system achieving as low as only
0.01m, 0.29m, 0.63m, 0.71m, 1.16mand 1.8mfor the mini-
mum, 25th percentile, 50th percentile, average, 75th percentile
and maximum (100th percentile), respectively. This confirms
the validity of PVDeepLoc as an accurate indoor localization
system for intelligent environments.
1) Robustness to density variation of solar cells: In this
section, we study the robustness of the proposed system when
fewer solar cells are considered in a real-world testbed. Fig. 4
shows the effect of varying the density of the solar cells on
the PVDeepLoc localization accuracy. For this, we randomly
removed solar cells from a total of 4solar cells installed in
the area of interest. The figure shows that the more solar panel
available, the richer input information to the model and thus
a better localization accuracy. However, even with a density
as low as only two cells, PVDeepLoc can achieve an accurate
room-level localization with less than 2m median error. This
is due to the light perturbation caused by the room’s user
presence, which can be measured by the installed few solar
cells. IV. CONCLUSION
We presented PVDeepLoc, an accurate and robust device-
free indoor localization system that uses photocurrent mea-
surements of solar cells to localize users passively without
Light source
Origin (0,0,0) X(room_length) = 3
Solar cell
Z (room_height) = 2.8
S1
S2
(0, 0.75, 0.4) (0.25, 2, 0.4)
(2.75, 0, 0.4)
(3, 1.25, 0.4)
S4
S3
(1.5, 1, 1.9)
Fig. 3. The experimental setup of the real testbed.
0
0.5
1
1.5
2
2.5
3
1 2 3 4
Median location error (m)
Number solar cells
Fig. 4. Effect of changing the number of the considered solar panels.
requiring users to wear or carry any device. PVDeepLoc
trains a deep neural network to estimate the fine-grained
user location. The system employs different regularization
techniques to enable the deep network to generalize and avoid
over-fitting, leading to a more stable model in the case of
unseen/noisy data. We evaluated PVDeepLoc in a challenging
real-world testbed. The results show that PVDeepLoc comes
with a median localization accuracy of more than 0.63m.
Currently, we are extending the system in different direc-
tions, including exploring more advanced neural networks to
improve the accuracy with fewer and heterogeneous solar
panels, studying the variation in number and type of light
sources including dimmable lights and outdoor light coming in
via windows, improving the system robustness against environ-
mental changes (e.g., furniture) and variation in reflectivity of
different objects as well as investigating the effect of ambient
human activities and tracking multiple subjects.
ACKNOWLEDGMENT
This work was partially funded by the Australian Research
Council Discovery Project DP210100904. The authors would
like to thanks Rola Elbakly for her assistance in the data
collection process.
REFERENCES
[1] V. Erd´
elyi, H. Rizk, H. Yamaguchi, and T. Higashino, “Learn to see: A
microwave-based object recognition system using learning techniques,”
in Adjunct Proceedings of the 2021 International Conference on Dis-
tributed Computing and Networking, 2021, pp. 145–150.
[2] S. Yamada, H. Rizk, and H. Yamaguchi, “An accurate point cloud-based
human identification using micro-size lidar,” in International Conference
on Pervasive Computing and Communications Workshops and other
Affiliated Events (PerCom Workshops). IEEE, 2022.
[3] H. Rizk, T. Amano, H. Yamaguchi, and M. Youssef, “Smartwatch-
based face-touch prediction using deep representational learning,” in the
18th EAI International Conference on Mobile and Ubiquitous Systems:
Computing, Networking and Services, EAI. Springer, 2021.
[4] X. Wang, L. Gao, S. Mao, and S. Pandey, “DeepFi: Deep learning for
indoor fingerprinting using channel state information,” in Proceedings
of the International Conference on Wireless Communications and Net-
working. IEEE, 2015, pp. 1666–1671.
[5] H. Rizk, H. Yamaguchi, M. Youssef, and T. Higashino, “Gain without
pain: Enabling fingerprinting-based indoor localization using tracking
scanners,” in The 28th International Conference on Advances in Geo-
graphic Information Systems, 2020, pp. 550–559.
[6] M. Abbas, M. Elhamshary, H. Rizk, M. Torki, and M. Youssef,
“WiDeep: WiFi-based accurate and robust indoor localization system
using deep learning,” in Proceedings of the International Conference on
Pervasive Computing and Communications (PerCom). IEEE, 2019.
[7] I. Fahmy, S. Ayman, H. Rizk, and M. Youssef, “Monofi: Efficient indoor
localization based on single radio source and minimal fingerprinting,”
in Proceedings of the 29th International Conference on Advances in
Geographic Information Systems, 2021, pp. 674–675.
[8] H. Rizk, M. Abbas, and M. Youssef, “OmniCells: cross-device cellular-
based indoor location tracking using deep neural networks,” in the
International Conference on Pervasive Computing and Communications
(PerCom). IEEE, 2020.
[9] ——, “Device-independent cellular-based indoor location tracking using
deep learning,” Pervasive and Mobile Computing, p. 101420, 2021.
[10] H. Rizk and M. Youssef, “Monodcell: A ubiquitous and low-overhead
deep learning-based indoor localization with limited cellular infor-
mation,” in Proceedings of the 27th ACM SIGSPATIAL International
Conference on Advances in Geographic Information Systems. ACM,
2019, pp. 109–118.
[11] H. Rizk, “Device-invariant cellular-based indoor localization system
using deep learning,” in The ACM MobiSys 2019 on Rising Stars Forum,
ser. RisingStarsForum’19. ACM, 2019, pp. 19–23.
[12] H. Rizk, H. Yamaguchi, T. Higashino, and M. Youssef, “A ubiquitous
and accurate floor estimation system using deep representational learn-
ing,” in Proceedings of the 28th International Conference on Advances
in Geographic Information Systems, 2020, pp. 540–549.
[13] K. Alkiek, A. Othman, H. Rizk, and M. Youssef, “Deep learning-based
floor prediction using cell network information,” in Proceedings of the
28th International Conference on Advances in Geographic Information
Systems, 2020, pp. 663–664.
[14] H. Rizk, “Solocell: Efficient indoor localization based on limited cell
network information and minimal fingerprinting,” in Proceedings of
the 27th ACM SIGSPATIAL International Conference on Advances in
Geographic Information Systems, 2019, pp. 604–605.
[15] C. Zhang and X. Zhang, “Litell: robust indoor localization using
unmodified light fixtures,” in the 22nd Annual International Conference
on Mobile Computing and Networking. ACM, 2016, pp. 230–242.
[16] Y. Umetsu, Y. Nakamura, Y. Arakawa, M. Fujimoto, and H. Suwa,
“Ehaas: Energy harvesters as a sensor for place recognition on wear-
ables,” in 2019 IEEE International Conference on Pervasive Computing
and Communications (PerCom. IEEE, 2019, pp. 1–10.
[17] I. Mathews, S. N. Kantareddy, T. Buonassisi, and I. M. Peters, “Technol-
ogy and market perspective for indoor photovoltaic cells,” Joule, vol. 3,
no. 6, pp. 1415–1426, 2019.
[18] H. Rizk, A. Shokry, and M. Youssef, “Effectiveness of data augmentation
in cellular-based localization using deep learning,” in Proceedings of the
International Conference on Wireless Communications and Networking
Conference (WCNC). IEEE, 2019.
[19] H. Rizk, S. Elgokhy, and A. Sarhan, “A hybrid outlier detection
algorithm based on partitioning clustering and density measures,” in The
Tenth International Conference on Computer Engineering & Systems
(ICCES). IEEE, 2015, pp. 175–181.
[20] A. Elmogy, H. Rizk, and A. M. Sarhan, “Ofcod: On the fly clustering
based outlier detection framework,” Data, vol. 6, no. 1, p. 1, 2021.
[21] H. Rizk, M. Torki, and M. Youssef, “CellinDeep: Robust and Accurate
Cellular-based Indoor Localization via Deep Learning,” IEEE Sensors
Journal, 2018.
[22] Y. A. LeCun, L. Bottou, G. B. Orr, and K.-R. M¨
uller, “Efficient
backprop,” in Neural networks: Tricks of the trade. Springer, 2012,
pp. 9–48.