1. Introduction
Noise pollution is a problem that affects millions of people worldwide. Different studies have shown that it is currently one of the greatest environmental threats to people’s health, leading to increased risk of cardiovascular disorders, hypertension, sleep disturbance, stress, etc., and it is negatively influencing productivity and social behavior [
1]. According to the World Health Organization (WHO), noise pollution is responsible for 50,000 heart attacks each year in Europe. Moreover, 1.8% of total heart attacks can be attributed to traffic noise levels greater than 60 dBA. In the particular case of Andalusia (Spain), in the studies carried out for the last Ecobarometer of Andalusia [
2], citizens considered noise pollution as one of the main environmental problems in cities and towns that has caused a considerable degradation in the quality of life.
Nevertheless, until the 1990s, policies to reduce environmental noise always had a lower priority than policies regarding the pollution of water or air. In 1993, The Fifth European Commission (EC) Environmental Action Program [
3] marked the beginning of attention being paid to the problem of noise pollution, and noise reduction programs began to be developed. The first step in the development of this program was in 1996, when the EC published the first policy to reduce environmental noise—“Future noise policy: European commission green paper” [
4].
The Environmental Noise Directive 2002/49/EC (END) [
5] required European member states to provide and publish accurate mappings of noise levels and action plans every five years throughout large agglomerations, all major roads, railways, and major airports.
Currently, noise maps can be generated with the help of noise mapping software [
6,
7], based on numerical simulations that take into account estimated parameters (such as traffic flow, the type of road, rail, or vehicle data), emission models of transportation and industrial noise sources, noise propagation patterns, and the urban topology.
However, the END required that noise maps be based on empirical measures. Moreover, in 2006, the EC working group “Assessment of Exposure to Noise” (WG-AEN) published a document called “Good Practice Guide for Strategic Noise Mapping and the Production of Associated Data on Noise Exposure” [
8], which strongly recommended obtaining accurate and real data on noise levels.
For this task, professionals have traditionally carried out measurements using instruments for noise collection and processing, called sound level meters, placed in a mesh pattern in the area to be mapped. They measure the noise using the A-weighting equivalent continuous sound pressure level, the L
AeqT indicator [
9].
However, this procedure has a series of disadvantages inherent to the technology used, such as the impossibility of making continuous measurements for long periods of time (weeks/months), the lack of knowledge of the situation in real time, and the inability to take preventive or corrective actions in real time. This traditional method also presents many technical difficulties for complying with some regional legislations [
10].
To solve, in part, these problems and inconveniences, in recent years, different studies have proposed the use of Internet of Things (IoT)-based technologies [
11].
The potential applications of IoT are numerous and diverse. In the EC documents relating to IoT [
12,
13,
14], 65 IoT scenarios were identified and presented, grouped into 14 domains. One of these domains is the so-called smart city, defined as “a place where traditional networks and services are made more efficient with the use of digital and telecommunication technologies for the benefit of its inhabitants and business” [
14]. One of the trendiest scenarios in smart cities is identified as noise urban maps—sound monitoring in bar areas and centric zones in real time.
Wireless acoustic sensor networks (WASNs) [
15] play a key role in this scenario of a smart city. Over the last few years, many researchers have devoted their attention to the design of these types of networks to monitor the real data of continuous and precise noise levels, and create noise maps in real time and space. Many research works and patents have been published [
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31], but very few real projects have been developed based on WASN approaches [
32,
33,
34,
35,
36,
37].
In the literature [
37,
38], the authors present two reviews of the most relevant WASN-based approaches developed to date focused on environmental noise monitoring in smart cities. In the literature [
37], WASNs have been classified according their data quality, scale, longevity, affordability, and accessibility. On the other hand, in the literature [
38], another classification is presented, where the sensor nodes are divided into three main categories, according to their measurement accuracy, cost, and computational capacity.
Although WASNs are becoming a reality in smart cities, in the literature [
38], the authors argue that very few projects have been deployed around the world, and they conclude that further research should be conducted to improve the performance of WASNs in real-life operation conditions. They highlight the project DYNAMAP, the objective of which is the deployment of a low-cost WASN in two different cities, Milan and Rome [
36], to monitor road traffic noise.
In this work, we present the design and implementation of a complete low-cost system for a WASN deployed in the city of Linares (Jaén), Spain, which has been running continuously for ten months. The complete system covers the hardware of the sensor nodes, signal processing for noise monitoring in the sensor nodes, network topology design, protocols, and the design of a private cloud platform with an intuitive graphical user interface to show clear and comprehensible information to the general public.
As a result, a complete system has been obtained to provide the information, shown in
Table 1, for each of the locations where the nodes are deployed.
In addition, along with this information, a map using the Google Maps platform Application Programming Interface (API) is also displayed, representing the LAeq in each location.
Based on the two classifications presented in the literature [
37,
38], the system is characterized by the following: (a) high data quality; (b) easily scalable to a large number of nodes; (c) can work continuously for long periods of time; (d) affordability due to its low-cost equipment; (e) data accessibility through a cloud web server; (f) the capacity to perform spectral analysis calculations, compute L
AeqT, and conduct real-time signal processing; and (g) high computational capacity and low-cost equipment.
The remainder of the paper is structured as follows.
Section 2 describes the complete system for the WASN deployed in the city of Linares. The experimental results are provided in
Section 3. Some conclusions and future works are presented in
Section 4.
2. The Design and Implementation of the Deployed WASN
This section describes all of the elements that make up the complete system for noise monitoring in the city of Linares (Jaén)—the network topology design, the hardware and software of the sensor nodes, protocols, and a cloud web server platform.
2.1. Design Considerations
The City Council of Linares, through the area of urban planning, established those locations of the city that were considered the most critical from the point of view of noise pollution. Specifically, eight locations were established, which mostly covered the entire downtown area. To these locations, we decided to add one more, considered as noncritical. Therefore, in total, nine low-cost nodes have been installed as measuring points.
Table 2 and
Figure 1 show the exact locations of these points.
The City Council of Linares specified the existence of a corporate Wi-Fi network deployed in the center area of the city, so that it was possible for the sensor nodes to transmit data. In addition, there was the possibility of using a power supply permanently at all of the measuring points.
2.2. Distribution of the Sensor Nodes
The topology design of a data network determines the connections between the nodes or between a node and a server. Because of the design considerations, we designed a network topology where each sensor node can send the measurements directly to a central server, which is a cloud web server in our case.
Because of the existence of the corporate Wi-Fi network that the City Council of Linares deployed in the city, as well as the absence of power supply restrictions, we proposed using this Wi-Fi network in all of the locations where this was possible. After analyzing the coverage, it was detected that, in seven of the nine locations, it was possible to use said Wi-Fi network. However, in two locations (nodes two and nine), there was no coverage. For these two locations, we decided to use 3G and Sigfox technologies, respectively. The network topology for the proposed complete system is shown in
Figure 2.
Sigfox [
39] is a reliable, low-power solution based on a dedicated radio-based network to connect sensors and devices, and it needs to continuously be on and emitting small amounts of data.
2.3. Hardware IoT Sensor Nodes
Typical IoT devices have constrained sensor resources, an actuator capacity, and local information processing, and they are able to communicate data with servers on the Internet cloud platform.
With the design considerations indicated above, when it is possible to have a continuous power supply, the chosen device is a standard hardware model (i.e., commercial sensor node) of the Arduino platform. Specifically, it is the Arduino Due device [
40], which is based on a 32-bit ARM core microcontroller, and is an open-source platform designed for the development of solutions related to sensor networks. The choice of this device is mainly due to its technical specifications, in terms of the processor and the memory, which allow for the execution of a frequency domain-based algorithm to calculate L
AeqT in real time. This is not possible on other devices of the Arduino platform. However, any other device with similar or better characteristics to the Arduino Due could be used, such as Raspberry Pi.
The Arduino Due has the following technical specifications: Atmel SAM3X8E ARM Cortex-M3 processor (32-bit, clock speed of 82 MHz, 96 Kb of SRAM, and 512 Kb of flash memory), 54 I/O digital ports, 12 input analog ports with a 12-bit resolution, and two output analog ports. Arduino Due hardware uses standard components, and its software is based on C/C++.
Related to the communication hardware of the sensor nodes, we used the following:
For sensor nodes one and three through seven: Arduino Ethernet Shield [
41] and an antenna MikroTiK SXT 2 [
42]. We used this external antenna to ensure the existence of wireless coverage for the sensor nodes, which were connected through a UTP cable to a RJ45 female connector installed in the enclosure box. The power consumption was approximately 180 mA.
For sensor node two: Arduino Ethernet Shield, a 3G router (model TL-MR3020 [
43]), and a 3G USB modem with an outdoor antenna. In this case, the power consumption was approximately 900 mA.
For sensor node nine: an 868-MHz Sigfox module for Arduino [
44], a communication shield, and a 4.5-dBi antenna. The power consumption was approximately 125 mA.
All of the nodes were powered through passive Power over Ethernet (PoE), using 12-V 1-A power adapters and PoE injectors. The electrical plugs were at a maximum distance of 20 m, and for that distance, the voltage drop in the UTP cable was 0.9 V, so there was 11.1 V to power the Arduino, enough for its operation.
The microphone used is based on a commercial design [
45]. Each sensor node is equipped with an electret microphone, 20–20 kHz (
Figure 3). It is much more than just a microphone, because it is integrated with an operational Maxim MAX4466 specifically designed for acoustic solutions (it amplifies and filters the noise). The gain is adjustable via an integrated potentiometer. Moreover, the microphones have a miniature foam windshield ball [
46]. For the outdoor enclosure for the nodes, we used IP66-rated outdoor aluminum enclosures for wireless platforms, such as StationBox ALU RF elements [
47].
Figure 3 shows some sensor nodes.
To the best of our knowledge, this system has one of the lowest economic costs per node, and this aspect is very important when implementing WASNs with a large number of nodes.
Table 3 shows the costs of each node (tax not included). Costs can be more reduced by using compatible materials.
2.4. Software Implemented in the Sensor Nodes for Noise Monitoring
For the measurement of acoustic noise and to integrate the calculated L
AeqT into the sensor nodes, it is necessary to design and implement an algorithm that runs on these nodes. In the previous work [
48], we presented a frequency domain-based algorithm to calculate L
AeqT in real time adapted to resource-constrained devices, such as wireless acoustic sensor nodes.
In this work, we improved the algorithm by introducing a new module to determine the frequencies with a higher energy and their degree of importance with respect to background noise or less significant frequencies. In this manner, we obtained the information from the predominant frequency of the noise. The optimized architecture used by the algorithm consists of four functional blocks, as shown in
Figure 4.
The sampling block is responsible for sampling the acoustic signal x(t). The IEC 60651 Type-2 SLM acoustic standard [
49], superseded by IEC 61672 [
50], established the measurement of environmental noise between 0–8 kHz, and the SLMs specified in the literature [
50] are intended to measure sounds generally in the range of human hearing. As is well known, in urban areas, the acoustic signal energy is concentrated in a low-frequency region (<10 kHz). Based on this, we configured the Arduino Due with a frequency-sampling rate,
fs, of 33 kHz, by a software function with a resolution of 12 bits. Thus, it is not possible to measure frequencies higher than 16.5 kHz. Related to the time-constant of the integration or time capture, there are two time-weightings that have been internationally standardized, namely: (a) slow response (S) of one second; and (b) fast response (F) of 125 ms.
The second block receives the audio samples from the first block. The algorithm is based on a frequency analysis, which uses the discrete Fourier transform (DFT) to determine the frequency spectrum of a segment of audio samples. Let us denote
X[
k] as the DFT of a windowed signal
x[
n], at the digital frequencies 2π
k/
N radians, where
N denotes the number of samples and
k = 0, …,
N − 1. To determine the samples of the DFT, we use the following equation:
The difference between two consecutive samples is given by the following expression:
Regarding the CPU and memory requirements, this block is the most demanding. For a computationally efficient implementation, we used the fast Fourier transform (FFT) to evaluate the DFT. Some analyzers have been designed to determine the optimal FFT length and thus achieve efficient implementation. Additionally, an exhaustive analysis has been performed using software functions to the reduce memory requirements and the execution time. The FFT length depends on the frequency-sampling rate chosen and the time capture (
), as follows:
Table 4 shows the FFT length for the two time-weightings that have been standardized and for the frequency-sampling rate of 33 kHz.
Taking into account that the FFT is more runtime efficient if a base-two sample length is selected, to reduce the execution time, we propose a length of 4096 samples (instead of 4125) for the fast response and 32,768 samples (instead of 33,000) for the slow response. This means a slight decrease in the time window at 124.1 ms for the fast response, and at 0.993 s for the slow response. Our proposal is to perform an FFT calculation for the fast response only, which uses a time window of 124.1 ms. This approximation of the time window produces an error of 0.7% (29 samples less than using a time window of 125 ms), which could be considered as negligible. Larger FFT sizes provide a higher spectral resolution, but take more resources to compute. A smaller window size means a shorter runtime, and, therefore less resource consumption.
Once the frequency components of the acoustic signal are available, an A-weighted filtering is implemented. This filtering stage allows for weighting of the different frequency components of the acoustic signal, consistent with a typical human ear response. The mathematical function used to obtain the value of the attenuation depends on the frequency, and is given by the normative IEC 61672 [
50], as follows:
In the above equation,
f is the frequency and
A(
f) is the associated attenuation. However, some resource-constrained devices have an anomalous behavior for math operations with large numbers. Therefore, we propose the use of an equivalent expression to reduce the complexity of the mathematical operations [
51].
Using Equations (1) and (2), we can determine the frequency for each sample of the FFT. After applying the filter, the obtained signal is as follows:
Finally, the last block computes the total energy of the weighted frequency components to obtain the sound pressure levels (SPLs) in dBA. Using the Parseval’s relation [
52], the total energy of the waveform can be summed across all of its frequency components, as follows:
Regarding the properties of the FFT, the samples have symmetry because they are complex conjugates, as follows:
The input samples in the time domain are real values. In the frequency domain, they are symmetrical from the sample
N/2 (
N is even). Therefore, we can calculate the energy of the signal using only the first
N/2 + 1 samples (filtered spectrum with A-weighting filter). The expression is the following:
Equation (9) is used to determine the total energy of the signal in the time capture. Taking
Tw seconds, the instantaneous average power of the signal is given by the following:
To obtain the
SPL in dBA, we applied the following expression:
where
C is the calibration constant, which will be calculated in the calibration process.
Calibration and Test Results
Before deploying the sensor nodes in the urban area, some tests were carried out in the lab and in a street to verify the quality of the noise measurements.
Figure 5 presents the lab scenario where we used an Arduino Due with the microphone, a commercial Sound Level Meter PCE-353 (SLM) [
53], and one laptop with speakers. The SLM and the sensor node were connected to the laptop using a USB connection. The sensor node and the SLM were deployed closely; the distance from the speakers to the devices was 0.5 m.
First, the commercial SLM was calibrated using the Class-2 Sound Level Meter Calibrator PCE-SC 42, at one kHz and for an SPL of 94 dB. Later, to calibrate the sensor node, an acoustic signal of a 1-kHz tone was created using math software. The volume of the speakers was raised until the SLM measured 94 dB, and the microphone gain was adjusted to give that measurement. Once both devices were calibrated, an acoustic signal composed of white noise (30 Hz–20 kHz) was generated with three noise levels of acoustic intensity: 60, 70, and 85 dBA. For each level, the L
Aeq indicator was calculated after repeating the experiment 30 times. The duration of the acoustic signal was five seconds for each test.
Figure 6 shows the results for this experiment.
Table 5 shows the average value of the 30 measurements of the L
Aeq indicator for each level of acoustic intensity, and the absolute error (Diff) between the Arduino Due and the commercial SLM measurements.
As can be observed, the differences between the Arduino Due and the SLM were lower than 0.2 dBA. For another test, we deployed the SLM and Arduino Due devices in an urban street. The distance between the devices and street was approximately eight meters. The measurements were made during one hour in daytime. Both devices calculated the SPLs each second, for four intervals of 15 min each.
Table 6 shows the L
Aeq and the absolute error (Diff) between the SLM and Arduino Due measurements.
Figure 7 shows the location where the sensor and the SLM were located.
In this case, the differences between the Arduino Due and the SLM were lower than 0.9 dBA, which represents a very good agreement.
Finally, we deployed the SLM and Arduino Due devices in the same urban street, but this time for a full day. The results are shown in
Table 7.
The differences between the Arduino Due and the SLM were approximately 1 dBA in the LAeq measured. The maximum difference was in the period Levening, being 2.41 dBA. This is because the dynamic range of the sensor is 44–105 dBA, and therefore, it cannot measure noise levels below 44 dBA. Alternately, the LAmax measured with the SLM was 88.1 dBA, while that with the Arduino Due was 90.5 dBA. The results of the previous tests indicate that the software designed for the Arduino Due has a good performance when we compare the differences between the acoustic measurements calculated by the Arduino and those of the commercial SLM.
2.5. Protocols and Platform Cloud Web Server
Many protocols have been specifically designed for communication between IoT devices, namely: Message Queue Telemetry Transport (MQTT) [
54], Constrained Application Protocol (CoAP) [
55], Advanced Message Queuing Protocol (AMQP) [
56], Data Distribution Service (DDS) [
57], etc. However, the commonly used protocol for the Internet, Hyper Text Transfer Protocol (HTTP), is used in most cases for IoT devices when they need to publish a considerable amount of data.
In fact, most of the commercial platforms that currently exist in the cloud and intend to provide services to IoT devices allow for communication from these devices through HTTP. Some examples are the Amazon AWS IoT Core platform, Microsoft Azure, Google Cloud IoT Core, and Thingworx. Each platform offers developers a series of application programming interfaces (APIs) and software development kits (SDKs) that make it possible to establish communication between the IoT devices and the cloud platform.
The use of the services of these platforms has advantages and disadvantages. Among the drawbacks of Azure, in addition to the cost involved in its use, are that the implementation of real-time data visualization systems is sometimes complex, and there is incompatibility with the Safari web browser. Google IoT Core Cloud does not support the MQTT protocol. In the AWS IoT Core, the use of services and functions is complex in some cases, and it is the most expensive option for many services.
Therefore, in our case, we decided to design and implement our own platform cloud web server using the infrastructure of the University of Jaén. The cloud web server is based on a model–view–controller (MVC) software architecture, which separates the application data, the user interface, and the control logic into three distinct components. For frontend technologies, we used HTML5, CSS3, Bootstrap, and JavaScript, and for the backend technology, we used PHP. For the database, a MySQL relational database was designed. In addition, for the representation of the LAeq values of the locations on a map with different colors, the Google Maps platform API was used.
In all of the sensor nodes, in addition to the acoustic noise monitoring software, the communication software was implemented to send data to the Platform Cloud Web Server. To send the data, we decided to use the HTTP protocol. Therefore, a web client was implemented on each sensor, except for on sensor node nine. Node nine was programmed using the Sigfox API for sending data, and a callback was configured in the Sigfox backend, so that an HTTP request with the GET method was made to our cloud web server.
As shown in
Figure 8 and
Figure 9, all of the sensor nodes calculate the SPL every second. Every 30 s, sensor nodes one–eight send the following data to the Platform Cloud Web Server:
Id sensor node
LAeq calculated for these 30 s
LAmax in the period of 30 s
Average predominant frequency of the noise during 30 s (Feq)
Higher predominant frequency of the noise during 30 s (Feqmax)
In the case of sensor node nine, Sigfox messages can carry a payload (user data) of 12 bytes, and 140 messages are permitted per day, at most (although we have verified that this limit can actually be exceeded a bit). Therefore, as shown in
Figure 9, sensor node nine sends a message every 10 min with the following parameters:
LAeq (four bytes) calculated for these 10 min
LAmax (four bytes) in the period of 10 min
Average predominant frequency (four bytes) of the noise during 10 min (Feq)
4. Conclusions and Future Work
We have presented the design and implementation of a complete low-cost system, composed of nine sensors nodes, for a WASN deployed in the city of Linares (Jaén), Spain, which has been working continuously for ten months. The complete system has covered the network topology design, hardware and software of the sensor nodes, protocols, and a cloud web server platform. The information provided for the system for each location where the nodes have been deployed is as follows: LAeq for a given period of time; some noise indicators indicated in the END (Lden, Lday, Levening, and Lnight), the percentile noise levels (LA01T, LA10T, LA50T, LA90T, and LA99T); a temporal evolution representation of the noise levels; and the predominant frequency of the noise. Moreover, a map using the Google Maps platform API has been displayed, representing the LAeq in each location.
Before deploying the sensor nodes in the city, different experiments were conducted to verify the performance of the Arduino Due hardware, together with the software implemented for the acoustic noise monitoring. The results were compared to the measurements acquired using a commercial SLM, which proved that the sensor nodes have a very good performance. However, the dynamic range of the sensor nodes was 44–105 dBA, and therefore, they cannot measure noise levels below 44 dBA. This can distort the results for measurements in non-noisy environments and especially during the night measurement period, from 23:00–07:00.
The performance of the Arduino Due is very good; the sensor nodes have been running continuously for 10 months, monitoring noise every second and sending the parameters to the cloud web server every 30 s. Some sensor nodes have presented problems derived from power outages and the subsequent restart of the devices (i.e., they did not restart properly). To solve this issue, it was necessary to mobilize technicians for a manual restart. This is a clear inconvenience if frequent power outages occur. There have also been problems with sending the data to the private cloud web server when the corporate Wi-Fi network of the city council did not work. In addition, there have been multiple hacker attacks on the cloud web server, with attempts to make insertions to the MySQL database, which succeeded in some cases. Therefore, we must increase the level of security in the cloud server.
Alternately, the amount of data received and stored has been enormous, given that every 30 s, each node sends the measured parameters. This approach is fine for analyzing acoustic noise over a considerable period of time, but it is not feasible to maintain it sustainably for many months or years.
An analysis of the results obtained from the acoustic noise in the city indicates that the variability of the acoustic noise in a specific location is very low, and therefore, a continuous measurement for one month is more than enough to characterize the noise in that location.
Although much work remains in order obtain accurate maps of noise levels in smart cities using WASN, the proposed system presented in this work can serve as an excellent starting point for this task.
Future research should aim to improve the dynamic range of the sensor nodes to be able to monitor acoustic noise below 44 dBA, and design and incorporate a fog computing platform between the sensor nodes and the cloud so as to avoid data loss due to the lack of a connection to the cloud. Security should be included in the protocols for sending the data, for example, HTTP. In addition, because the noise perception is affected by subjective factors, and there is not a direct correlation between the indicators and the subjective perception of the noise, the implementation of a module that is capable of evaluating the subjective impact of the noise annoyance is also proposed as a future work.