Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Optimization of electric lighting consumption by

monitoring vehicular and pedestrian traffic with


inexpensive items.
Allan Orellana, Leiber Rivas
Escuela Superior Politecnica del Litoral, ESPOL
Faculty of Engineering Electrical and Computer
Campus Gustavo Galindo Km 30.5 Perimeter Road. Guayaquil, Ecuador
Email: aaorella@espol.edu.ec, lvrivas@espol.edu.ec.

Summary: This project involves the implementation of a


network of sensors, which allow you to monitor the presence of II. THEORETICAL FRAMEWORK
vehicular or pedestrian traffic on city streets. The latter in order
to turn the street lighting only when needed and save electricity. PASSIVE INFRARED SENSOR (PIR)
Passive network for detecting movement of both people and
transportation means such as cars, buses and bicycles infrared Passive infrared sensors allow stopping infrared heat waves
sensors are used. The latter is done with the use of classification radiated from bodies at different frequencies without the need for
algorithms machine learning analyzing the frequency spectrum explicit electrical drive.
of both people and animals. The sensor network will allow to
implement on public lighting wirelessly and monitor the status
of each iluminaria.

Abstract: The present project Consist in the implementation


of a network of sensors, Which will allow to monitor the
presence of vehicular or pedestrian traffic in the streets of a city.
The Latter With the aim of turning on the street lighting Only
When Necessary and save electricity. In the network, passive
infrared sensors will be used to detect the movement of Both
people and Means of transport: such as cars, buses and bicycles.
The Latter Will Be Done with the use of machine learning
algorithms classification analyzing the frequency spectrum of
Both people and animals. The network of sensors to be
Implemented will allow the lighting of the public lighting system Fig. 1 Operation of a PIR sensor passing a person in their range of
wirelessly monitor the status of and each lighting system. action.

Terms Index-sensors, machine learning, frequency spectrum. [[Image]. Retrieved from https://www.prometec.net/sensor-pir/]

I. INTRODUCTION Within infrared sensor a pyroelectric sensor, which consists of


a crystalline material that, when exposed to a type of infrared
Each year the rural population and growth of cities and radiation, it generates an electrical charge is that with effect
alongside these night lighting is also evident. For a large city transistor (FET) of high sensitivity it is capable of amplifying said
spending streetlights it represents millions of dollars, as in the filler to enhance the detention with the rest of the circuit.
case of Madrid in 2012 around 830 million euros [1] is coasting; Within infrared sensor a pyroelectric sensor, which consists of
in addition to certain studies suggest that light pollution from a crystalline material that, when exposed to a type of infrared
cities can bring environmental and health problems for humans radiation, it generates an electrical charge is that with effect
[2]. The project is based on reducing both problems without transistor (FET) of high sensitivity it is capable of amplifying said
resorting to infrastructure changes without limit and create filler to enhance the detention with the rest of the circuit.
foundations for the emergence of an intelligent city. Mr. PIR usually has between its elements Fresnel lens to concentrate
When using passive infrared (PIR) sensors and cameras for not the electrogenic waves to the Lord. Also has stop elements to avoid
stopping people and vehicles substantially increases the runtime producing false positives caused by solar radiation, temperature
further sensor and protects the privacy of pedestrians and vehicles. changes and vibrations.
The system is completely wireless and full-mesh, making
installation and being a universal sensor, except attenuator lamp
power that needs to be connected to it.
In a smart city data collection and subsequent analysis thus you
can be adjusted to the needs that it requires is indispensable. The
sensor can forward information through a network of sensors on the
number of people and traffic, can monitor data remotely.

Fig. 2 PIR module Arduino HC-SR501 with Fresnel lens without


Fresnel lens
[[Image]. Retrieved from https://www.prometec.net/sensor-pir/]

ULTRASONIC SENSOR
It consists of a transducer that performs distance measurements
thanks to its magnetoestáticas properties. A magnetostatic
membrane has the property of mechanically desformase using
electrical excitation and generates ultrasonic sounds. At the same
time has the property of generating electrical current to be induced
by ultrasonic sounds. There are two typical configurations for such
sensors: Emission and stop with a transducer, and stopping emission
with two transducers.

Emission and stop with two transducers


Fig. 4 Diagram offset ultrasonic waves in the ultrasonic
The broadcast system and stopping two transducers is that one of
the two membranes to generate the ultrasonic wave, with an transmitter and receiver versus distance.
electrical excitation, while the other membrane is the excitation of
[[Image]. Retrieved from http://wiki.robotica.webs.upv.es/wiki-de-
the reflected wave (echo), by an object in the path of the waveform
robotica/sensores/sensores-proximidad/sensor-de-ultrasonidos/]
generated by the first transducer and generates an electrical current
in it
FOURIER TRANSFORMS AND WAVELETS
Measurement techniques Wavelet transform is similar to the Fourier transform in some
• Flight time respects, unlike the sine and cosine basis Fourier Transform
Is to issue a pulse train and start in that this is issued, put a timer functions, wavelets are localized in space as well as on the scale.
counting. The timer will measure the time between the ultrasonic The Fourier Transform is a good choice to represent data where the
wave is emitted and when the receiving transducer receives the echo small-scale features (in this case, high frequency) representing the
wave, this time is proportional to twice the distance to the sound detail or noise originating in the signal or function, and large-scale
wave was reflected. features (low frequency) represent forms basic. However, it has the
disadvantage that the frequency information obtained from the
Fourier Transform is global, because their basic functions are sine
and cosine functions. This is not satisfactory when localization
features are required. The problem can be partially overcome by
using the Fourier Transform, Short-Time, through which the signal
to be analyzed is multiplied by a window function before computing
the Fourier Transform. However, this method has the problem that
a window of fixed size in the original domain is accompanied by a
fixture in the Fourier domain window. What is really needed is a
long window to analyze large-scale components and a narrow
window to detect the characteristics of small scale, this is what
provides the wavelet transform this method has the problem that a
window of fixed size in the original domain is accompanied by a
fixture in the Fourier domain window. What is really needed is a
Fig. 3 Diagram ultrasonic sound in time both the transmitter and long window to analyze large-scale components and a narrow
receiver. window to detect the characteristics of small scale, this is what
provides the wavelet transform this method has the problem that a
[[Image]. Retrieved from http://wiki.robotica.webs.upv.es/wiki-de- window of fixed size in the original domain is accompanied by a
robotica/sensores/sensores-proximidad/sensor-de-ultrasonidos/] fixture in the Fourier domain window. What is really needed is a
long window to analyze large-scale components and a narrow
window to detect the characteristics of small scale, this is what
(𝑐)(𝑡𝑜𝑓 )
𝑑= (I) provides the wavelet transform
2
c: speed of light
tof: Time from which the pulse train is emitted to detect the echo
in the receiving transducer. PROCESSING DATA FROM A PIR SENSOR
PIR sensors respond to heat any changes in the environment
independent of their origin, these detections occur are necessary or
not, which causes a lot of useless information and increases the
• Phase change
number of false alamas especially in security applications. To reduce
It is the continuous reception of ultrasonic waves and calculates
this problem, one must distinguish the IR radiation sources, and
the distance by the gap with the emitted wave.
between humans and pets, as required. The intensity of the signal
received from such sensors increases as the size of the IR radiation
source within range of vision. Also the distance from the source has
an important role in the amplitude and shape of the output signal as
it decreases with increasing distance. Therefore, it is expected that
the amplitude of the signal PIR is higher for a person for a pet, being
these smaller latter. So, a simple base amplitude classification is not
sufficient to distinguish the types of IR sources [3]. Then a sample
of a signal typical for a person PIR sensor and a pet shown:
[Oljaca, M. (2017). Continuous wavelet transform of two PIR
sensor signals for walking human (a), walking pet (b) [Image].
Retrieved from https://www.ecnmag.com/article/2017/02/enable-
machine-learning-advanced-motion-detector-using-pir-sensors]

It can be seen easily one or several groups in the spectra shown,


depending on the type of movement. From data obtained with the
wavelet transform, you can be applied a classification algorithm and
detect different types of movements very efficiently, and thus able
to identify the source of the IR signal analyzed. algorithm machine
learning of k-means was used in this project to identify the presence
of people and cars, which is a clustering method that aims dividing
Fig. 5 Out of a PIR sensor in detecting a human and a pet. a whole from n observations k groups, where each observation
belongs to the group whose average value is closest [5].
If we focus on other features of a PIR signal, it can be seen that
the frequency of the signal is also changing with the speed of the IR PULSE WIDTH MODULATION CONTROL INTENSITY
radiation source within range of vision. This may be another Modulating pulse width (PWM) signal, is a technique for
distinguishing factor as pets move faster than humans. This can be obtaining the effect of an analog signal into a load from the variation
seen in the image shown above. of the duty cycle and frequency of a digital signal. The frequency
By analyzing the time-frequency domain, thanks to the wavelet sets the speed with which the signal cycling, ie how fast changes
transform that provides more information about the signal, it is between high and low as it is a digital signal logic states. While the
possible to identify different types of IR sources. The shape of the duty cycle describes the length of time that the signal is in a logic
spectrum in the time domain-frequency varies motion type [4]. Next, high state, this means a percentage of the total time it takes to
examples of spectra that domain to a human and a pet walking, complete a full cycle [6].
obtained from PIR signals are shown: An example application of PWM is as follows. For a 3V signal
from a digital source that may have as high value equal to 5V or 0V
low, it can be used a PWM with a duty cycle of 60%. This produces
a 5V signal 60% of the time is generated. If it is a switched fast
enough signal, the voltage measured across the output terminals of
the device will be the average value of the signal. In the described
digital signal can be obtained by multiplying the average value
voltage 5V high state with the duty cycle, in this case a
multiplication of 5V x 0.6 = 3V which is what is required according
to the example is obtained.
In this project PWM is used to vary the intensity of each LED
diodes as the detection distance of people or cars by PIR sensors
employed. This intensity variation can be carried out also in streets
Fig. 6 Configuring Two PIR sensors to detect objects of different
and iluminarias control the energy consumption of the same. Next,
sizes
an example of a PWM signal shown:
[Oljaca, M. (2017). Dual PIR sensor coverage area [Image].
Retrieved from https://www.ecnmag.com/article/2017/02/enable-
machine-learning-advanced-motion-detector-using-pir-sensors]

Fig. 9 PWM signal with 25% duty cycle

[Duty cycle 25%. [Image]. Retrieved from


http://digital.ni.com/public.nsf/allkb/AA1BDEA4AA224E3E86257
CE400707527]
Fig. 7. Spectrum in the time-frequency domain of a human walking
ZIGBEE TECHNOLOGY
ZigBee is a wireless technology that meets a set of protocols to
produce a radio communication short range and low power
consumption.
Designed to consume the least amount of energy, ZigBee can only
transmit data from 20 to 250 Kbps and in a range of 10 to 75 meters
in a straight line. [10]
Opera in the free band ISM (Industrial, Scientific & Medical) 2.4
Ghz worldwide, 915Mhz and 858 Mhz in USA in Europe. For the
specific case of using the 2.4GHz band transmission speed is 250
Kbps of a range of 13 meters radius and a power of 1 mW.
Fig. 8. Spectrum in the time-frequency domain of a human walking
In a ZigBee network you can connect up to 255 nodes, but if it
fits properly, it is possible to build a network of 255 cluster can have Número de personas y vehículos
up to 64770 nodes. Nodes can be predisposed in star topology, star
cluster or mesh, the latter being the most popular. There are three detectados
types of nodes in this network type:
150
Coordinator: There is only one across the network and who
coordinates the other nodes 100
router: There may be more than one router node and is
responsible for routing packets multihop. 50
end device: Basic sensor network.
0
15:00 16:00 17:00 18:00 19:00

[Figure obtained from the number of people and vehicles detected


in the analyzed time]

Energy consumption for each hour period between the hours of


15:00 to 19:00 in one day. This graph can show that it is not
necessary that the iluminarias are on all the time. As observed,
analyzed every hour from 15:00 hours to 19:00 there is no full use
of the 60 minutes in the analyzed hours. On the other hand, it can be
seen that the time longer use the iluminarias have is 17:00 by the
high traffic of people and vehicles in the area under study, which is
consistent with the previous graph. With regard to energy saving,
Fig. 10 Distinction of nodes in a ZigBee network.
considering that 360 minutes 6 hours analyzed lit only 119 passed
[Martin Moreno, J., & Ruiz Fernandez, D. (2007). Example the iluminarias, one can say that there is a 67% saving in electricity
ZigBee network [Image]. Retrieved from consumption.
https://rua.ua.es/dspace/bitstream/10045/1109/7/Informe_ZigBee.p
df]

III. METHODOLOGY

For prototyping of the proposed system, data was collected at


ESPOL in stop technologies in a feasible schedule from 15:00 to
19:00. These data were processed with the Pandas Python library
that allows for this data to a CSV file format and graphics of these.
Furthermore, by taking data was performed, it was found the
performance of the other components as described below were
available a PIR sensor to detect people and cars, which were located
at a height of 90 cm to avoid detections unwanted animals. Once the [Histogram obtained ignition timing of iluminarias in minute
PIR sensor detects such an ultrasonic sensor for igniting the analyzed hours]
iluminaria, for reasons of the prototype were LEDs is activated,
depending on how close the detected target of the light source to
increase or decrease the intensity of this are. These components were V. ANALYSIS OF RESULTS
connected to a Arduino ONE, which is responsible for uploading the
data to a database for further analysis, this through a WIFI module.
Analysis of these data will define the usefulness of the project, to From the data obtained, it can be seen that the peak time for the
identify energy savings given to implement it. movement of people and vehicles is around 17:00, so control in the
ignition of the iluminarias at this time would not be as positive effect
as looking, as these remain on most of the time having people or
IV. RESULTS vehicles near them. This changes from 18:00 pm, where there may
Persons detected from 15:00 to 19:00 in one day. This graphic may be a better control in the ignition of iluminarias having no excessive
vary depending on the day, and may note that according to the traffic of people and vehicles. According to the histogram on
timetable analyzed, 17:00 is a peak time for the movement of people ignition iluminarias in minutes from 18:00 it is only necessary that
and vehicles place analyzed. This specifies that on average people iluminarias are turned on about 15% of the total time. This can lead
spend 24 per hour in the ESPOL technologies. to significant not only energy saving,

VI. CONCLUSIONS
➢ Using sensor networks can be implemented to control street
lighting and thus save environmental resources.
➢ Using inexpensive items prototyping enables sensor networks
to solve different problems required.

VII. REFERENCES
[1] Miguel A. Sanchez and J. Zamorano, "MEASURING POLLUTION
FROM HEAVEN SPACE" Physics and Society - Journal of the
Association of Physicists, 2011.
[2] R. Chepesiuk, "Extrañando darkness: the effects of light pollution on
health", SciELO Public Health, no. 52, pp. 470 to -477, 2010.
[3] Emin Birey. (2009). Pyroelectric Infrared (PIR) Sensor Detection
Based Event. 07/22/2018 of S / I Website:
https://pdfs.semanticscholar.org/cc0d/856116d7b7cdee1a16fbb76302
c54b3cb4a2.pdf
[4] Miro Oljaca. (2017). Enable Machine Learning with an Advanced
Motion Detector Using PIR Sensors. 22/07/2018 of ECNMAG
Website: https://www.ecnmag.com/article/2017/02/enable-machine-
learning-advanced-motion-detector-using-pir-sensors
[5] YES. (2018). K-means. 22.07.2018, Wikipedia Website:
https://es.wikipedia.org/wiki/K-means
[6] YES. (2014). What is a signal pulse width modulated (PWM) and What
Is Used? 22/07/2018, National Instruments Website:
http://digital.ni.com/public.nsf/allkb/AA1BDEA4AA224E3E86257C
E400707527
[7] Zavaleta Bermudez, A. (2018). Pyroelectric sensor. Retrieved from
https://prezi.com/2btp7d0ovtev/sensor-piroelectrico/
[8] PIR sensors | Store and Tutorials Arduino. (2018). Retrieved from
https://www.prometec.net/sensor-pir/
[9] Ultrasonic sensor | Robotics Wiki. (2018). Retrieved from
http://wiki.robotica.webs.upv.es/wiki-de-robotica/sensores/sensores-
proximidad/sensor-de-ultrasonidos/
[10] Martin Moreno, J., & Ruiz Fernandez, D. (2007). ZigBee (IEEE
802.15.4) (pp. 4-8). Retrieved from
https://rua.ua.es/dspace/bitstream/10045/1109/7/Informe_ZigBee.pdf
[11] Jesus Azor. (2015). WAVELET TRANSFORM. 22.07.2018, Mendoza
University Website: file: /// C: /Users/leibervicente/Downloads/22-
102-1-PB.pdf

VIII. ANNEXES

[Arduino code acquisition and data upload to IoT platform


ThingSpeak]
[Schematic of connecting sensors and Arduino]

[Charts obtained with IoT platform ThingSpeak]

You might also like