Content uploaded by Hamada Rizk
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
Grad. Sch. of Info. Sci. and Tech.,
Osaka University, Osaka, Japan
& Tanta University, Tanta, Egypt
Sch. of Comp. and Info. Sys.,
Singapore Management University, Singapore
Sch. of Comp. Sci. and Eng.,
University of New South Wales, Australia
Dept. of Comp. and Sys. Eng.,
AUC & Alexandria University, Egypt
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 speciﬁc 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 ﬁngerprint on the generated photocurrents.
These ﬁngerprints 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,
The current advances in the sensing capabilities of IoT
devices open the door for the next generation of human-
centric applications –. Accurate energy-efﬁcient 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 ﬁnd a pervasive indoor
WiFi-based localization has been one of the main indoor
localization approaches due to the widespread use of WiFi
access points (APs) –. 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 –. 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) , ,
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 ,
 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 signiﬁcant drop in the localization performance
when the testing phone is different from the ones used in the
calibration phase . Finally, continuous light-sensing leads
to rapid battery drainage, especially with phones powered by
Recently, there has been a trend of ﬁtting many indoor
Internet of Things (IoT) devices with solar cells to extend their
battery life or enable completely battery-free operation .
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
ﬁngerprint on the generated photocurrents. The ﬁngerprints
collected at pre-deﬁned reference locations are used for train-
Fig. 1. The architecture of the PVDeepLoc system.
ing an efﬁcient 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 conﬁgurations 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
II. TH E PVDeepLoc SYS TE M
Fig. 1 shows the PVDeepLoc system architecture.
PVDeepLoc works in two phases: an ofﬂine training phase
and an online tracking phase. During the ofﬂine 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-ﬁtting.
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 ofﬂine phase to estimate
the likelihood of the user being at any grid of the already
deﬁned ones at the ofﬂine phase.
A. The pre-processor module
This module runs during both the ofﬂine and online phases.
It processes the measured photocurrent values from the in-
stalled solar cells. Speciﬁcally, the Pre-processor forms the
photocurrent values in a feature vector (where each entity
Input Layer Output Layer
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 ﬁt 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  and outlier
removal , . The framework generates synthetic data
from samples collected over a short-term that reﬂect 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
B. The localization model creator
This module is responsible for training a deep localization
model and ﬁnding 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 .
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 . 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 deﬁned by the simulator. This network is
trained to operate as a multinomial (multi-class) classiﬁer 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 ofﬂine 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
2) Preventing over-ﬁtting: To increase the model robust-
ness and further reduce over-ﬁtting, 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 deﬁned at the conﬁguration
phase. The grid g∗with the maximum probability given the
feature vector (c) is selected. That is, we want to ﬁnd:
We implemented our deep learning-based training using
the Keras learning library on top of the Google TensorFlow
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 ﬁgure shows the 3D coordinate
of the considered cells. Each solar cell has 15.5% efﬁciency
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 ﬂoor. 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).
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
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 ﬁngerprint 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. Speciﬁcally, 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 conﬁrm 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 conﬁrms
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 ﬁgure 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
Origin (0,0,0) X(room_length) = 3
Z (room_height) = 2.8
(0, 0.75, 0.4) (0.25, 2, 0.4)
(2.75, 0, 0.4)
(3, 1.25, 0.4)
(1.5, 1, 1.9)
Fig. 3. The experimental setup of the real testbed.
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 ﬁne-grained
user location. The system employs different regularization
techniques to enable the deep network to generalize and avoid
over-ﬁtting, 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 reﬂectivity of
different objects as well as investigating the effect of ambient
human activities and tracking multiple subjects.
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
 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.
 S. Yamada, H. Rizk, and H. Yamaguchi, “An accurate point cloud-based
human identiﬁcation using micro-size lidar,” in International Conference
on Pervasive Computing and Communications Workshops and other
Afﬁliated Events (PerCom Workshops). IEEE, 2022.
 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.
 X. Wang, L. Gao, S. Mao, and S. Pandey, “DeepFi: Deep learning for
indoor ﬁngerprinting using channel state information,” in Proceedings
of the International Conference on Wireless Communications and Net-
working. IEEE, 2015, pp. 1666–1671.
 H. Rizk, H. Yamaguchi, M. Youssef, and T. Higashino, “Gain without
pain: Enabling ﬁngerprinting-based indoor localization using tracking
scanners,” in The 28th International Conference on Advances in Geo-
graphic Information Systems, 2020, pp. 550–559.
 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.
 I. Fahmy, S. Ayman, H. Rizk, and M. Youssef, “Monoﬁ: Efﬁcient indoor
localization based on single radio source and minimal ﬁngerprinting,”
in Proceedings of the 29th International Conference on Advances in
Geographic Information Systems, 2021, pp. 674–675.
 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.
 ——, “Device-independent cellular-based indoor location tracking using
deep learning,” Pervasive and Mobile Computing, p. 101420, 2021.
 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.
 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.
 H. Rizk, H. Yamaguchi, T. Higashino, and M. Youssef, “A ubiquitous
and accurate ﬂoor estimation system using deep representational learn-
ing,” in Proceedings of the 28th International Conference on Advances
in Geographic Information Systems, 2020, pp. 540–549.
 K. Alkiek, A. Othman, H. Rizk, and M. Youssef, “Deep learning-based
ﬂoor prediction using cell network information,” in Proceedings of the
28th International Conference on Advances in Geographic Information
Systems, 2020, pp. 663–664.
 H. Rizk, “Solocell: Efﬁcient indoor localization based on limited cell
network information and minimal ﬁngerprinting,” in Proceedings of
the 27th ACM SIGSPATIAL International Conference on Advances in
Geographic Information Systems, 2019, pp. 604–605.
 C. Zhang and X. Zhang, “Litell: robust indoor localization using
unmodiﬁed light ﬁxtures,” in the 22nd Annual International Conference
on Mobile Computing and Networking. ACM, 2016, pp. 230–242.
 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.
 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.
 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.
 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.
 A. Elmogy, H. Rizk, and A. M. Sarhan, “Ofcod: On the ﬂy clustering
based outlier detection framework,” Data, vol. 6, no. 1, p. 1, 2021.
 H. Rizk, M. Torki, and M. Youssef, “CellinDeep: Robust and Accurate
Cellular-based Indoor Localization via Deep Learning,” IEEE Sensors
 Y. A. LeCun, L. Bottou, G. B. Orr, and K.-R. M¨
backprop,” in Neural networks: Tricks of the trade. Springer, 2012,