Development of Improved Acoustic Disdrometer

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

Proceedings of TENCON 2018 - 2018 IEEE Region 10 Conference (Jeju, Korea, 28-31 October 2018)

Development of Improved Acoustic Disdrometer


Through Utilization of Machine Learning Algorithm
Febus Reidj G. Cruz 1, Ma. Madecheen S. Pangaliman 2, Timothy M. Amado 2, Francis Aldrine A. Uy 3
1 School of Electrical Electronics and Computer Engineering, Mapua University, Manila, Philippines

2 School of Graduate Studies, Mapua University, Manila, Philippines

3 School of Civil Environmental and Geological Engineering, Mapua University, Manila, Philippines

frgcruz@ mapua.edu.ph

Abstract— Philippines is a tropical country and every year, bucket; (ii) few researchers make use of acoustic disdrometer
the country is experiencing typhoons, thunderstorms and because it is merely dependent on sound and it cannot discern
excessive rainfalls because of climate change. Since then, the whether the data it measures is an actual rain or just an ambient
government continuously provides efforts to mitigate natural noise; and (iii) disdrometers are paired with radar to improve
disasters through numerously growing researches that are its accuracy, however, radars are not easily accessed in the
inclined with the meteorological processes happening in our country and its components are too expensive. Such
country. There are many researches with regards to the methods observations led to conclude that acoustic disdrometers are
of quantifying the amount of rainfall but based on those studies, rendered useless because of its inability to discern an actual
the acoustic disdrometer is rendered useless because of its
rainfall sound from an ambient noise.
inability to classify ambient noise from rain types. With this, the
main purpose of this study is to develop an improved acoustic The main objective of this study is to develop an improved
disdrometer by adding a capability in which it will categorize the acoustic disdrometer by adding a capability in which it will
intensity of the amount of rainfall from ambient noise using categorize the intensity of the amount of rainfall using a
machine learning algorithm. The proposed methodology is machine learning algorithm. Thus, the specific objectives of
applied by developing a prototype with four piezoelectric sensors, the study are: (i) to develop an acoustic disdrometer using
Arduino microcontroller and ZigBee transmitter. Also, the K- piezoelectric sensors; (ii) to use signal processing and machine
nearest neighbors (KNN) predictive model will be established.
learning algorithm and its implementation using Python; and
The obtained results show that the accuracy of the predictive
(iii) to validate the acquired results.
model is 89.95%.

Keywords— rain gauge, disdrometer, machine learning, KNN, II. RELATEDWORKS


rainfall, climate change Traditionally, rain gauge such as tipping bucket is used to
measure the amount of rainfall and is subject for improvement.
I. INTRODUCTION For the past years, studies were done to improve the tipping
In the past decades, climate change has been a great factor buckets and one of these is made by Lewlomphaisarl et al. [3]
in bringing excessive rains in all parts of the world especially in which they installed an obstacle sheet inside the cone of the
in the Philippines, since the rate of evaporation from the ocean tipping bucket to break the cyclone-like behavior of the water
is increasing as the world warms [1]. Excessive rainfalls in the and improve its accuracy.
Philippines caused numerous cases of flooding and landslides, Aside from the tipping bucket, previous studies are done
that took a great number of lives, millions of pesos of with regards to another device to be used in quantifying the
properties, infrastructures and livelihood from the Filipino amount of rainfall, and one of these previous attempts is done
people. Since then, the government continuously provide by Yadnya et al [4] which is all about the measurement of the
efforts to mitigate such natural disasters through numerously rain drop distribution in Mataram, India using the acoustic
growing researches that are inclined with the meteorological disdrometer for flood prediction. The researchers made use of
processes happening in our country, such as weather the acoustic disdrometer to measure the drop size distribution
prediction, flood monitoring and prediction, hydrological of the rain in order to predict the occurrence of flood along the
availability monitoring [2], and the like. Now that the society is river of Mataram, based primarily on the two kinds of
in the age of information technology wherein data can be easily precipitation – stratiform and convective.
produced, can be readily accessed and can be easily retrieved
in a very fast rate unlike before, blooming researches are Another study is made by Cao et al [5], which is about the
growing in the field of data science, machine learning and characterization of rain microphysics based on disdrometer and
artificial intelligence. polarimetric radar observation. According to the study,
characterization of rain microphysics requires information on
There are many researches with regards to the methods of raindrop size distributions, however, measurements and
quantifying the amount of rainfall. Based on these researches, retrievals of data contain errors from a single two-dimensional
three generalizations were formed: (i) a number of researches video disdrometer alone so a joint system where a disdrometer
tries to continuously improve the accuracy of the tipping and a radar is used.

978-1-5386-5457-6/18/$31.00 ©2018 IEEE 1679


Proceedings of TENCON 2018 - 2018 IEEE Region 10 Conference (Jeju, Korea, 28-31 October 2018)

III. METHODOLOGY B. Data Gathering


In this section, the researchers propose a systematic plan, The proposed data gathering scheme involved quantifying
through methods and techniques, on how to categorize the the amount of rainfall using four piezoelectric sensors. The
amount of rainfall using machine learning algorithm. source of data was from a rainfall simulator which established
the five classifications of rainfall, namely – light, moderate,
A. Hardware or Prototype Development heavy, intense and torrential.
The first part of the study was the hardware development The rainfall simulator and the acoustic disdrometer were
of the acoustic disdrometer. The acoustic disdrometer is a both placed in an open ground, but the acoustic disdrometer
cylindrical device constructed by integrating piezoelectric was mounted 0.8 m above the ground based on the WMO
sensors, readout circuit, and Arduino Uno microcontroller. standards [6]. The acoustic disdrometer recorded the data
Data transmission was either wireless via Zigbee transmitter obtained from the four piezoelectric sensors, for every second,
or manually retrieved via SD card inside an SD card module in a comma-separated values (CSV) file which was both stored
connected in the microcontroller. Moreover, the prototype got in an SD card and was transmitted wirelessly via ZigBee
its supply from a power bank installed in the body or be transmitter [7, 8]. The acoustic disdrometer was exposed to the
connected via USB connector when needed to be charged. different ambient noises and the different levels of rain
produced by the rainfall simulator, for about 25 minutes for
The design and measurement of the device was compliant each kind of sound, producing a total of six csv files or a total
in terms of the WMO standards on precipitation gauges [6]. of 9,000 samples.
Figure 1 shows the dimensions of the prototype. The different levels of rain produced by the rainfall
simulator was based on [9] set by DOST-PAGASA. Table 1
shows the data gathering scheme used in the study.
The six csv files were imported in the program wherein the
piezoelectric sensor readings were used as predictors and the
rainfall classification were set as the target in the dataset.
After retrieving the dataset from the setup, the data undergo
data cleaning and data tidying wherein the data frame was
organized, with each variable forming a column, each sample
forming a row, and each type of observational unit forming a
(a)
table [10].
Afterwards, the dataset underwent data slicing as a pre-
requisite in making a training set. In this section, the dataset
was sampled and divided into two parts: the training data,
which was used to build predictive models, and the test data,
which was used in validating the acquired results. In the study,
the researchers adopted the standard partition for the data
slicing which was, 70% for the training data and 30% for the
test data.

(b) C. Development of Predictive Model using KNN


Fig. 1. (a) Cylindrical body of disdrometer, side view; K-nearest neighbors (KNN), a machine learning algorithm
(b) Dome and catch basin of disdrometer, top view. under supervised learning, was used to create the predictive
model for the dataset attained from the previous section.
TABLE 1. DATA GATHERING SCHEME.
1) Model training and algorithm tuning. KNN algorithm
Rainfall Classification Rainfall Measurement is one of the top 10 most significant algorithms in data mining
Light
Less than 2.5 mm or 2.5 liters [11]. It is a non-parametric machine learning algorithm that
per square meter per hour uses both nominal and numerical characteristics of data
2.5 to 7.5 mm or 2.5 to 7.5 liters through the selection of the most common characteristic
Moderate
per square meter per hour
between the k neighbors. Figure 2 shows the implementation
7.5 to 15 mm or 7.5 to 15 liters of KNN as derived from [12].
Heavy
per square meter per hour
15 to 30 mm or 15 to 30 liters For validation, the researchers used the standard cross-
Intense
per square meter per hour validation method which was the 10-fold 10 repeats, as in
More than 30 mm or 30 liters [13], in evaluating the performance of the KNN predictive
Torrential
per square meter per hour model.

1680
Proceedings of TENCON 2018 - 2018 IEEE Region 10 Conference (Jeju, Korea, 28-31 October 2018)

Input: Dataset A; Locate the k points B. Exploratory Data Analysis


Instance to classify z; corresponding to the The boxplot diagram is a standardized way of displaying
Value k k distances
the shape of the distribution and determines whether the data
needs centralization due to scattered points in the graph. Figure
Calculate Euclidean distance Let k denotes number of points
between the points as d(z, zi) belonging to ith class 4 shows the boxplot diagram of the piezoelectric sensors
where i = 1, 2, …n among k points reading for each rain type. Based from the boxplot diagram, the
dots, which signified the other samples, were outside the box
Arrange resulting Evaluate if ki > kj which implied that the dataset needed normalization.
Euclidean distances (n) where i  j Normalization is the center at scale of the code and currently
in increasing order put z in class i implemented to make the data structures comparable. The
dataset obtained from Piezoelectric Sensor 1 had the widest
Take the first k distance range of concentrations compared to the other three
from sorted Euclidean distances Output: zn
where k is a positive integer piezoelectric sensors.

Fig. 2. Flowchart for KNN pseudocode.

2) Model evaluation. After building and validating the


predictive model, the model was evaluated in terms of
accuracy. Equation 1 shows the formula used in calculating
the accuracy where TP stands for true positive, TN stands for
true negative, FP stands for false positive, and FN stands for
false negative.

()

IV. RESULTS AND DISCUSSION


This section presents the interpretations of the results of the
process and techniques involved.
Fig. 4. Boxplot diagram of piezoelectric sensor readings
A. Project Prototype
In implementing machine learning algorithms, it is needed
The actual prototype of the acoustic disdrometer is shown for the data to be correlated, thus, a total of six sets of
in Figure 3. The Arduino microcontroller is the main correlation graphs for comparing the sensor readings of the
processing unit in the device since it records the sensor four piezoelectric sensors were generated. For the visualization
readings in an SD card through an SD card module and purposes, since the sets of graphs were almost identical, the
controls the ZigBee transmitter for the wireless data correlation graph of piezoelectric sensors 3 and 4 sensor
transmission. readings is the only set of graphs presented in this paper. It can
be seen from the graph in Figure 5 that the sensor readings
were linearly correlated for each rain type.

Fig. 3. Photo of improved acoustic disdrometer protoype. Fig. 5. Correlation of Piezoelectric Sensors 3 and 4 at various rain types

1681
Proceedings of TENCON 2018 - 2018 IEEE Region 10 Conference (Jeju, Korea, 28-31 October 2018)

C. KNN Implementation Results ACKNOWLEDGMENT


Figure 6 shows the tuning graph of the predictive model. This work is related with the project funded by the
Based from the tuning results of KNN predictive model using National Water Resources Board (NWRB) and by the
the standard partition of 10-folds, 10-repeats, repeated cross- Philippine Council for Industry, Energy and Emerging
validation, the accuracy of the predictive model occurred at a Technology Research and Development of the Department
value of 0.8995. of Science and Technology (DOST-PCIEERD) with
Project No. 3982 and year of Project Start 2016.

REFERENCES
[1] E.G. Bi, P. Gachon, M. Vrac, F. Monette, “Which downscaled rainfall
data for climate change impact studies in urban areas? Review of current
approaches and trends,” Theoretical and Applied Climatology, vol. 127,
issue 3–4, pp. 685–699, 2017.
[2] C.E.F. Monjardin, F.A.A. Uy, F.J. Tan, F.R.G. Cruz, “Automated real-
time monitoring system (ARMS) of hydrological parameters for
Ambuklao, Binga and San Roque dams cascade in Luzon Island,
Philippines,” IEEE Conference on Technologies for Sustainability
(SusTech), pp. 1–7, 2017.
[3] U. Lewlomphaisarl and P. Saengsatcha, “High accuracy tipping bucket
rain gauge,” SICE Annu. Conf., pp. 372–375, 2012.
[4] M. S. Yadnya and I. W. Sudiartha, “Measurement of drop size
distribution rain in mataram utilize disdrometer acoustic for floods
prediction,” Proceeding - 2016 Int. Semin. Intell. Technol. Its Appl.
ISITIA 2016 Recent Trends Intell. Comput. Technol. Sustain. Energy,
pp. 107–110, 2017.
[5] Q. Cao, G. Zhang, E. Brandes, K. Ikeda, T. Schuur, and A. Ryzhkov,
“Characterization of rain microphysics based on disdrometer and
Fig. 6. Algorithm Tuning for KNN Predictive Model Polarimetric radar observations,” Int. Geosci. Remote Sens. Symp., pp.
523–528, 2006.
[6] World Meteorological Organization (WMO), “Part I. Measurement of
Table 2 gives the confusion matrix corresponding to the Meteorological Variables, Chapter 6. Measurement of Precipitation,” in
overall statistics of the KNN predictive model. Indicated in the Guide to Meteorological Instruments and Methods of Observation,
table are the different types of rainfall (RF), starting from no WMO No. 8, 2017.
rainfall condition (N), to light rainfall (L), to moderate rainfall [7] C.N. Cabaccan, F.R.G. Cruz, I.C. Agulto, “Wireless sensor network for
(M), to heavy rainfall (H), to intense rainfall (I), and to agricultural environment using raspberry pi based sensor nodes,” IEEE
torrential rainfall (T). 9th International Conference on Humanoid, Nanotechnology,
Information Technology, Communication and Control, Environment and
Management (HNICEM), pp. 1–5, 2017.
TABLE 2. CONFUSION MATRIX [8] R.B. Anire, F.R.G. Cruz, I.C. Agulto, “Environmental wireless sensor
network using raspberry pi 3 greenhouse monitoring system,” IEEE 9th
RF N L M H I T International Conference on Humanoid, Nanotechnology, Information
N 91 11 0 0 0 0 Technology, Communication and Control, Environment and
Management (HNICEM), pp. 1–5, 2017.
L 11 647 40 0 0 0 [9] R. Manzanas, S. Brands, D. San-Martín, A. Lucero, C. Limbo, and J. M.
M 0 36 887 59 0 0 Gutiérrez, “Statistical Downscaling in the Tropics Can Be Sensitive to
Reanalysis Choice: A Case Study for Precipitation in the Philippines,” J.
H 0 0 38 558 45 0 Clim., vol. 28, no. 10, pp. 4171–4184, May 2015.
I 0 0 0 11 182 25 [10] H. Wickham, “Tidy Data,” J. Stat. Softw., vol. 59, no. 10, 2014.
T 0 0 0 0 1 56 [11] R. Agrawal, “K-nearest neighbor for uncertain data,” Int. J. of Computer
Applications, vol. 105, no. 11, 2014..
[12] J. M. Cadenas, M. C. Garrido, R. Martinez-Espana, and A. Munoz, “A
V. CONCLUSION More Realistic K-Nearest Neighbors Method and Its Possible
Based from the obtained data results, it can be concluded Applications to Everyday Problems,” in 2017 International Conference
on Intelligent Environments (IE), 2017, pp. 52–59.
that the development of acoustic disdrometer using K-nearest
[13] S. Borra and A. Di Ciaccio, “Measuring the prediction error. A
neighbors (KNN) as machine learning predictive model was comparison of cross-validation, bootstrap and covariance penalty
implemented successfully with an accuracy of 89.95%. The methods,” Comput. Stat. Data Anal., vol. 54, no. 12, pp. 2976–2989,
types of rainfall considered in the predictive model included 2010.
the no rainfall, light, moderate, heavy, intense and torrential
rainfalls.

1682

You might also like